I uploaded my game on Unity Play so it can be easy for users on different OS to play it without any hassle. Click here to play.
How did I make this game ?
I started to learn how to make simple prototypes in the Unity Game Engine through the Create With Code online course which is free for anyone who's just starting with Unity.
After completing the free course, I imported some free assets from the unity store and also borrowed some assets from the course materials, and then started working on the idea for my own first game.
After some brainstorming, I stumbled upon an idea of a farmer dodging mad cows who are constantly rushing towards him. And this farmer is burdened with the task of avoiding radiation falling from the sky and also collecting stars and extra lives falling from the sky.
Then it merely took some days to code and animate the farmer and the cows, add the soundtrack, make the menu for the game. Finally I published the game on Unity Play.
Preview of the Game
The controls of the game are as simple as it could get (although I forgot to specify controls on the menu of the game).
A for Moving Left.
D for Moving Right.
Space Bar to Jump.
Here are some gameplay images:-
Where can you see my code ?
Open the Assets folder -> Go to _Scripts -> Here you can see the code for various things happening in the game.
For example, the PlayerController script is pretty self explanatory ie. this script is used to control the player movement.
Similarly scripts such as SpawnManager help to load different entities into the game whereas the DestroyOutOfBounds script is used to destroy the prefabs which have left the scene so as to make the game functionable without excess load.
What did I learn while making this project ?
I learnt how to handle the Unity Game Engine and write basic scripts for player movement and so on.
I also learnt a tad bit about the C# Programming Language and how this language is used by the Game Engine.
Apart from learning, I enjoyed creating my first game! The process was frustrating at times but the curiosity behind making an idea work really kept me going and left me with a sense of accomplishment at the end.