Cosmicat
Platform:
Windows PC
Engine:
Unity 3D
Team Size:
4
Role:
Programmer
Language:
C#
Year:
2015
Description
Cosmicat is a 2D isometric game I coded in Unity3D. Everything is 2d sprites except for the main character which is a 3D model rendered to sprite in real-time to achieve better animations and more view angles. Everything was made from scratch including the ground and jump systems. To create a 3D appearance within 2D space, I gave each object a local z variable, and made the image a child of that object and moved it up or down based on that value. I also changed the alpha of objects much higher or lower than the character.
It was tough getting collisions to work properly. Using Unity's built-in physics and making colliders the same shape as the images caused the character to slide in unexpected ways. To get around that problem, I stretched the colliders so it would look like a top-down game to the engine and adjusted to positions of the sprites to compensate.
To get bridges to work, I simply enabled and disabled colliders based on their z value compared to the character's. However, colliders couldn't be used for the ground, so I had to write the logic for gravity and landing (the z variable came in real handy here).
I also made a rudimentary level-builder so that it was easy to place and adjust ground and environment objects.