How I created my own mobile game + FREE download
As a hobbyist game developer, I initiated many game dev projects whenever inspiration hit me but never managed to conclude any of those. Then one day, I decided to commit myself to a single project, taking one whole month to make everything from scratch and to deliver a finished game by the end so that I can publish it for the world to see. This article is about my journey through building it. If you want to download or play the game right now, please find the links at the bottom of the article.
As always, I took a piece of paper and a pencil and started jotting down ideas. The theme was simple. I decided to recreate one of my old unfinished projects; “Unmasked” but this time with a Japanese twist (as you may know, I’m a serious Japanophile). And for the ease of level design, I thought of using platformer-style 2D graphics. My plan was to draw the assets myself, compose game music with the help of my sister, code the behaviour, design the levels and ultimately build the game to Android for it to be released on the Google Play store.
My new game “Unmasked Sakura” had similar thematic features as Unmasked. The player had to go through levels defeating masks. To make things interesting I decided to add boss levels as well. I chose the player to be gender-neutral with their face covered. And since the Japanese culture offers a plethora of traditional mask designs, creating diversity among enemies was a piece of cake.
From strokes to binary beings
Creating graphical assets was the easy part. But drawing a number of frames for each entity in the game was tiring. As before I used Krita for designing and animating.
After creating the player character, I launched Unity and quickly set up a 2D project. First I designed the game for the PC platform, knowing I only had to change the build settings to Android once I finish the game. I imported the frames to Unity and started creating and animating the player game object. I quickly sketched down some ground tiles and imported them using Unity Tilemaps.
I also started drawing the enemies. First I drew basic enemies with different masks. They didn’t need animations since I can make these masks float using Unity’s in-built animator. Here are some of the mask designs I came up with, after hours of researching Japanese traditional masks.
To spice things up and breach my comfort zone I added boss levels as well. I designed 3 bosses based on Japanese mythology. The first was based on a combination of the Japanese mythical creatures Tengu and Shinigami. The second was a Geisha with a Kitsune (fox) spirit. And the final was a Samurai demon.
Unpleasant Harmonies
Since I wasn’t gifted with musical skills, I consulted my sister (who was a prodigy in eastern music) to make some music for my game. First, we thought of using Bosca Ceoil to make 8-bit music but realised it didn’t match our genre. So we used Garage Band to make some synth/pop music while adding some ornamental instruments as well (to preserve the Japanese theme). After many sessions of trial and error, we came up with some okay-ish tunes for peaceful levels as well as for thrilling boss fights. I downloaded other sounds for the game from free stock sound effects suppliers.
Giving life; one line of code at a time
After the first batch of assets was done I started setting up some basic code in Unity. After generating some terrain with tilemaps, I coded up the physics and player movement. I often referred to videos by Brackeys for help and used their player movement script for my ease.
I decorated the base with some flowers and trees and the first level was done. I’ve always wanted to test the lighting in Unity so I imported the 2D lighting package with the Lightweight Render Pipeline (This is enough for 2D games). Using point lights I made some elements glow and added a bloom effect for a nice aesthetic.
Soon I made the player, enemies and other objects into Prefabs so I can use them again and again in the future. Using Unity’s Prefabs (Pre-fabricated game objects) you can instantiate the same object repeatedly in multiple scenes. This came in handy when placing enemies. Also, I could take a base enemy, change its skin and add more functionality to create a stronger enemy. I didn’t need to write all the code again, just had a change some parameters. This was the magic of prefabs!
I added more content level by level, giving life to a world inside my Unity editor. I added birds, and butterflies and scripted them with movements. And also added a health system along with a health bar. I designed level 5 as a boss fight. This was my first time using Unity’s State machines, and setting things up was kind of confusing. But soon I got the boss animator working perfectly.
I then decided to change the environment a bit; so I added a spring-themed terrain with foxes.
I used the Unity Particle system to generate a waterfall. It seemed to be the only efficient method I could make a waterfall in my game. It didn’t seem much natural, but for me it was okay and it matched the art style. After this set of levels was done, I added another boss level featuring the fox spirit. I also made lanterns which swayed when the player touched them.
The next set of levels needed to foreshadow the final, most difficult boss in the game. So I made the environment a night/Halloween-ish theme. This level came out very attractive with the glow lighting and the bloom effect.
Final touches…
After I made the final boss level, I worked on making a pause menu and a title menu. I thought the same title screen will be boring after a while, so thought of generating random title screens each time you open the game. I used a randomizer function to generate 27 different title screen backgrounds. Then added a credits menu and the game was almost done. I switched the platform to Android in the builder. I used a free Joystick Pack from the Unity Asset Store for player movement. This was the only change I had to make because all clickable buttons in Unity automatically change to touch buttons when you switch to the mobile platform. This is how it looked on my game,
Now the joystick and everything were working, but only on my computer. I had to do play-testing to fix the bugs and ask for feedback. Since this was a hobby project I asked my friends to play-test for me. I sent all of them a .apk file of the game and asked them for feedback. And soon they returned to me with wonderful supportive comments.
So I fixed the issues pointed out by them and made the final Android build. Since I was unable to build for iOS but still wanted all my friends to play my game, I built the webGL version of the game. I also found out that I can naturally host the webGL build on GitHub pages. To launch the game properly, I needed a few extra things.
Putting it on the market
To publish my game to Android (Google Play Store), I needed a Google Developer Account. It cost me $25 to make an account and the registration process was very simple and intuitive. Even though it took me several tough weeks to develop this game, I wanted everyone in the world to play it. Therefore I set up a store listing for free (and without Ads). The store listing process should be done carefully and attentively but it is pretty straightforward. Along with all this work, I recorded some gameplay of my game and took some screenshots. I rendered a small trailer video using Adobe Premier Pro and made some graphics using Adobe Photoshop. I uploaded these promotional materials to social networks and officially released my game to the world.
The wholesome comments started flooding in. And throughout this journey, I learned many new things regarding game-dev and Unity. I also decided to open-source my game project folder on GitHub so anyone can use my graphic and sound assets for free. You can find them here.
And finally, the stuff you’ve been waiting for;
Download on Google Play Store: https://play.google.com/store/apps/details?id=com.DevnithWijesinghe.UnmaskedSakura&hl=en&gl=US
Play online at: https://devnithw.github.io/PlayUnmaskedSakura
If you have any inquiries about my game feel free to contact me at devnithw@gmail.com.