Notifications
Article
My first 2D game: Ruby
Published 4 years ago
59
0
I made my first 2D game and ... I liked it
After completing the Create with Code Live, I continued to prepare for the Unity Certified User: Programming exam. I took the Unity C # Survival Guide course and realized that I needed to consolidate the acquired knowledge in practice. The choice fell on the Ruby's Adventure: 2D Beginner project. He was in my favorites for a long time.
Before I started working with 2D in Unity, I thought working with 3D was much more interesting, but how wrong I was. In the process of working on this project, I understood the principles of rendering in 2D and what opportunities it provides for creating a game.
After going through all sections of the project, I mastered the basics of working with Tilemaps, animation in 2D, felt Cinemachine and much more. After completing the project, I got a small scene in which the player moved, throwing cogs at robots.
But I decided that I want to arrange all this into a full-fledged mini-game with a menu and additional game conditions. Moreover, it was a good reason to learn some more things in Unity.

From a mini scene to a mini game

To make one mini-scene turn into a mini-game, I learned to work with Audio Mixer and added a lot of audio clips. Added a display of the number of cogs that Ruby has, added a panel with a display of the number of broken robots and telegraph towers, as well as a timer.
Added a settings screen where you can edit the volume and screen settings.
Added a screen with the main menu, a pause screen with the ability to pause the game and also added screens in case of defeat and winning.
The project stipulated that Ruby should fix the robots, I added a background to this: as if lightning had struck one of the telegraph towers and Jambi (the frog) asked Ruby to help repair all the robots and telegraph towers that had failed due to a lightning strike.
This prehistory was reflected in the game: a mini dialogue with a frog was added (though hey only listens, she doesn’t like to talk a lot), which puts the player in the know and in order to win the player you need to fix all the robots and all telegraph towers in a certain amount of time, located all over the map.
If we talk about programming, then I used the Singleton pattern and the system with events.
I especially liked how, using a change of colors and sizes from several assets, it was possible to create different locations on the map with an impression (somewhere all the plants were in blue, somewhere in red and pink, etc.) This can be seen in the screenshots at the bottom of the article.
Rate the game here: Ruby game.
Some gameplay screenshots:

The game was made as part of training to create 2D games on Unity (based on the Ruby's Adventure: 2D Beginner educational project)