I started building my own game. Here, I am going to show the first prototype of the game. This game is still in progress. I am still working on the game designing elements and also artwork.
Game Mechanic: I started with the most simplest form of game : A Verticle shooter game. The most basic mechanic of moving around in the space, and shooting at objects. If rocks are shot, the players looses points and if the score goes less than 0, the game is over.
Platform Used: Unity3D
Screenshots of the game:
Models used for the prototype:
credit: Digital Tutors and TurboSquid.
Things that I learnt while making this game:
1. Unity Physics : concept of Colliders [with/without Trigger]
The first thing I started in this game was spawning the bolt. So, I created a empty gameObject and placed it right at the edge of the player's spaceship. So, when the bolt started spawning it self, it started doing two things:
1. started pushing the player back
2. they started going in random direction
Both of these happened due to the same reason. The spawn position of the bolt was too close to the player's spaceship. Thus, when the bolt spawns, the collider on the bolt and the collider on the spaceship collide with each other, thus causing it to push the player back. Hence, the bolt after a while, started spawning in random direction. So, there were two fixes to this: 1. change the position of the spawn object. 2. Convert the collider of the bolt to trigger, thus, it will not push back the player.
2. Events,Game States and Co-routines: These concepts can be overwhelming when known for the first time and also at the time when you are trying to execute them. But these make the code look much readable and easy to understand.
I was working with game states like : Start -> GameOver -> Restart -> Start. Every update it needs to check the game state. Between GameOver and restart there is a slight pause, which lets you load the game again and thats where coroutine into picture. It lets you wait for "x" amount of time, till it resumes the execution of the function.