Beginning GameDev : Shooter 2D!

Matteo Lo Piccolo
4 min readApr 10, 2021

--

Ok, I’m ready to start with this incredible path! First of all, I delete the scene from Scene folder.
Then, I go to File, new scene, don’t save, and here we go, we have a new scene!

Using the shortcut Ctrl + S will open a path window for where to save the scene. To keep everything in order, I go into the Scenes folder, and I rename my scene: Game.

Now that I have my new scene, I need a player! Obviously in video games, there are a lot of models and often incredible effects, but we are only at the beginning and we are creating a prototype, so we will settle for a primitive for now: our classic Cube will do just fine!

I change its name from Cube to Player.

To rename it, there are some ways : double click it, right click and Rename or I can highlight it and press F2.
We can also change it directly in the Cube inspector.

There is always more than one way to do things!

Now create a material for our Player and make it blue.

Since my game will be 2D (even though I created the project in 3D), I will need to set up the main camera. In the room inspector there is an entry called Clear Flags. If I move the mouse cursor over the text, a small window comes out with the various explanations.

It is currently set to Skybox, which is usually used for 3D games. In my case I will have to set it to Solid Color. After that, I set the color to black.

Obviously I have set the blue color to my Player, but if you don’t like it you can change it at any time!

Important thing : SAVE OFTEN!

To do that, we can easy use the shotcut CTRL+S!
Or go to File, Save.

Unity informs us of the changes that put a small asterisk next to the scene name (we will see that it will be the same when we start coding with Visual Studio!)

Whenever we see this near the scene’s name,

it means we have made some changes.
After you save, the asterisk vanish.

I use Ctrl+S

A little extra for this section is the Aspect ratio of our project.
The ideal is to set the aspect ratio at the beginning of the project, in order not to run into problems or errors.
The rule, unless very particular or dedicated projects, is to set the aspect ratio on the HD standard, that is 16: 9.

In the Game window, click on the drop down free aspect, and choose 16: 9

This is important because if I enlarge or shrink the window, everything remains “anchored” to that ratio

Now that we have the basics of the project, from the next article let’s start using Visual Studio and creating code!

--

--

Matteo Lo Piccolo
Matteo Lo Piccolo

Written by Matteo Lo Piccolo

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!

No responses yet