U-turn
First of all before you go any further, you must read this. I am making a small change, but it will greatly affect my final project. Originally I wanted to make a demo game, I still am, but I am not going to be focusing on the game content as much as I am now going to be focusing on the idea of the game. Creating an original idea, that could actually be marketed, because creating a game is one thing, but being original is a whole different thing. I already know I can make a game, but I want to see if I can make a good game, instead of the ever so common zombie survival games.
Mini Project
When starting you adventure of making a game in Unity, you create a new project, when creating a new project, you use the setup wizard, this will prompt you for a name, file folder and what assets you would like to use. In this I used my first asset file, a file provided by Unity on their asset store, where you can buy assets.
My second step I imported a ship, that wasn't to hard. I then modified the camera and the lighting, for the camera I used one main camera, and positioned it above the ship, and it also wouldn't move, this gave it an arcade game look, and for the lighting I used three things, one main light which is a bright white light to make it look like there is a close star shining upon it, the second was a complementary green light for it too look like the background was reflecting off of it, and the third a trim light to distinguish it from the rest of the map. I then imported a background, it took a bit of trial and error to resize it, but I finally got something I liked. This is what it turned out to be.
![]() |
| What it looked like in the editor |
![]() |
| What it looked like in game |
My next step was making it move, this required me to make a new script that is attached to the player's ship. The scripting language used was C#. It is quite lucky that is because of computer programming class I was easily able to understand syntaxes because it used the same ones as C++.
While doing this I also learned how to make it tilt in the direction that you are going.
![]() |
| What the script looked like |
The next step was to create shots that the ship would fire from the ship. This was quite simple all I did was import a bolt image, then put a mesh around it so you could see the colliders, and then make it go forward. The next part of it was much more difficult, it required you to make a shot spawn entity in front of the ship, then have the laser start from the shot spawn and then fire. For this it originally used "mouse 1" or the "left mouse button" to fire, but I did some additional research and made it so it would use space bar to fire. This is what it created:
![]() |
| An independently moving ship with independent fires |
With the last step there was one large problem. These entities never disappeared, they kept going infinitely on the z-axis. So this step was done to stop that. What it did was make a boundary that engulfed the map, so if en entity would hit the edge of it, that entity would be destroyed. I don't have a picture for this because, how am I going to show that unless you wanted to read a console.
In the next step I finally was able to create some sort of challenge for the player. I made my first asteroid. At the first part of it all I had was the mesh and it didn't do anything besides rotate, even if you hit it, neither object did anything, though both had a hitbox, they wouldn't collide because they are both triggers (I will not go into that because not even I know what that means).
![]() |
| An asteroid doing nothing |
In this step I fixed this by creating a script. This script allowed the two too collide, in this script I also added code to make it so they are destroyed. From there I added the core feature of waves, using for loops, while loops, and functions I was able to make a randomly generated wave of asteroids that in between waves they would have a four second delay to get the player ready for the next wave. It also Included a two second wait period before the game started so you weren't bombed with asteroid right away.
![]() |
| Me exploding and a barrage of random asteroids |
The next step was linking each game effect to an audio file. This wasn't particularly difficult besides the shooting of the bolt, because of me having to go into to the script and adding a few more lines of code. Obviously since you can't really see sounds, here are the sound files and waves:
![]() |
| Musicians probably understand this, I do not |
After this was just counting score, seeing if you died and making it say game over, nothing to special. To view my final product go here (It takes a bit to load the first time around): Download
Extract the zip file and read the READ ME!!







This game looks pretty nice, considering it took only one cycle. You mentioned programming in c#, how different is that from c++? I realize that once your learn basic programming logic it's easy to pick up other languages, but what are the main differences between the two languages? I wish I could play the game at school. I wish you the best in your future game-making endeavors.
ReplyDeleteHonestly, I really don't know the difference off the top of my head, I know that C# is based off of C++, and parts of java, but that is all I know I will probably inform all of you of the difference between the two. Also thank you for your gracious comment on how good it looks.
Delete