How I created my first video game with UNITY and C#

siddhant khariwal
Games Development Journal
4 min readSep 11, 2021

To get started with game development in UNITY first you need to have these basic skills:

  • Programming language either javascript or more preferably c#.
  • Proficiency in mathematics and physics.
  • 2D and 3D image editing(only basics nothing complicated).

While you create a game, it is important to think about the game mechanics, rewards, player engagement, and level design. A game developer is not only limited to code the game. A game developer could be a programmer, a sound designer, an artist, a designer, or many other roles available in the industry. Artists may create and design assets, while developers might focus on programming a health bar. A tester may get involved to see that the game works as expected.

Games can be made by big game studios or they could be indie(individually made) games. In this particular blog, we’ll be focusing more on making indie games. Now you may ask why game development? well, Game development can Develop problem-solving skills, Enhance your designing skills, You can earn from it, and Generate Team-Work skills.

For creating indie games In unity these are the steps:

  1. First, it is important to learn a language in my case, I chose c#.
  2. You can check out this quick playlist on youtube for learning c#
  3. To learn the basics of any game engine preferably unity or unreal engine, In my case I chose unity.
  4. To incorporate unity and c# together
  5. To implement basic physics like gravity and friction in the game.
  6. To implement objects and render objects in any blender.
  7. I also found this roadmap made by bits goa which you can follow.

To create your first game you can take up a course from Coursera or udemy or you can take up a free course/playlist from youtube. I picked the latter one and I was not disappointed. Here is the playlist that I followed —

Now, let's start with how I made my project =

At the Start

At the start

I added a ground object which is the long white slab. Then I added another element which is a cube. I gave color to the cube and ground.

After 1 Day

Here I added physics to the cube. Gave it rigidity and coded gravity in it.

Starting Screen

I created a start screen for the game and added a Start button to it. I coded in c# to move the cube left and right with ‘A’ and ‘D’ keys respectively. Created another object, a cuboid that is stable and non-movable, and made many copies of it for level designing. Added a collision element to the cube and obstacle which stops the cube when it collides with the obstacle. Adjusted the main camera to follow the cube wherever it goes. Now I added some other elements like score, UI, and graphics.

End screen

I added a GAME OVER screen if you die in the game and level completed if you complete the game. In the end, I incorporated all of these things for a swift user experience. And finally, I added a final credit screen for the completion of the game.

Here is how the game finally looked like :

For a complete step-by-step tutorial, you can watch the above playlist mentioned above by BRACKEYS.

Scope of work in game development:

  • High growth and more platforms:- International gaming sector is moving towards becoming a multi-billion dollar industry with an expected worth of 117-billion in the next two years.
  • No longer confined to platforms such as gaming consoles or computers. Smartphones, tablets, and other portable devices have made way for more opportunities for game developers.
  • Many more positions rather than just programming and designing like audio experts, writers, concept artists,2D and 3D artists to name a few.

Resources:

Asset download links:

--

--