Posted January 20, 2023 by TheWrongJohn
#2.5D #game design #prefabs #code
Here is a link to the original blog post
https://redninja83882493.wordpress.com/2023/01/10/rockit/
Introduction
Just a quick post to reflect on my latest game on Itch. This was made thanks to the second project on GameDevTV’s 3D Unity course. Although I am still heavily dependent on tutorials, I’m glad to say it’s getting easier and quicker for me to finish games and publish them. That said, this game does feel just finished than some of the others I have made. For example they is no menu and more thought could be put into level design. My aim at this point is to complete short projects and learn more, even if 3D is not really the direction I want to go in.
2D, 3D, or 2.5D
This game is 2.5D, which means gameplay takes place in 2 dimensions but the graphics are 3D. I personally prefer the aesthetics of purely 2D games, but you can get more impressive results easily using simple 3D objects in Unity. With this game I played with the transparency of materials to make the glass domes. 2.5D reminds me of PS1 games back in the 90s, which incidently I have been exploring on OpenEmu, for research purposes of course. At this point I find 2D pixel art more difficult to create, but also more rewarding.
Prefab use
The workflow suggested for this project was slightly different to what I have experienced so far. I made prefabs of all the main objects before finishing them, and then edited the prefabs. Previously, I would finish the objects in the scene and then make them into prefabs when they were complete. Perhaps this kept the objects safe and left me open to experiment in the scene and then override the prefab to save. Another interesting of prefabs was to use them as persistent game objects to attach music and/or persistent code.
Code
Without going into detail, one of the most interesting aspects of the code for this project was the use of Mathf.Sin. Not that I pretend to understand it, but it had something to do with using sine waves to create oscillations which were used to move my UFOs back and forth. Another novelty for me was the use of Switch statements rather than If statements to set up a range of conditions, or cases as they are called with Switch statements. This was used for detecting collisions with different objects.
Conclusion
Sometimes the more you learn the more you realise what you don’t know. I think I might be approaching this point, which is good but also daunting. After completing this course, I feel it will be time to put my skills to the test by taking part in a game jam. More on this next!