Last post we showed how we created a MOBA in 24h using Unity, giving the project’s sources for free in the end. The day before we got into that project, we’ve also coded another game for a fast workshop we gave at that time, a very simple maze shooter intended to show how easy one can create a fun and challenging game. We called it Spooky:
We’re also giving this one for free for beginner game developers and programmers who are interested in using Unity for their 3D games.
The game was made without the use of any 3D model besides Unity’s basic cubes and a single texture (for bullets). The cubes were coloured and scaled to represent the player (blue), walls (gray) and different enemy types (yellow, orange and red), each one increasingly more difficult to defeat.
Our inspiration came from a youtube video that showed how you can make a fun game using very simple graphics. We made it much simpler than the one in the video, so inexperienced programmers can still understand the code. You can always try to improve it and make it as complex and challenging as the one in the video.
The game consists of a single level/maze, that is populated by many enemies. The yellow enemies are almost harmless, except if the player touches them, going back to the beginning of the level. The orange and red ones also shoot the player, while the later one includes a screen-shield (meaning it has to be shot twice to be defeated). The enemies are positioned in the maze in order to give an increasingly difficult challenge level for the player.
The game uses only a handful of different object types, which we stored into prefabs. There’s the player, two bullet types (only the color changes), three enemies and a particle system (bullet explosion/sparks);
We only needed to write 5 very simple scripts:
- player movement input;
- player gun control and input;
- enemy AI (shared for both enemy types that shoot – orange and red);
- bullet script (that triggers sparks and object destruction on hit);
- A test to check for victory condition;
Besides being just a handful, we made sure the scripts are also very simple to understand, nor having many lines of code, neither using any fancy/magic stuff.
So, what are you waiting for? Go to our Github page and download Spooky’s project sources and modify it at will. We hope you find it useful.