This is my old post (2015-09-20) on my old abandoned blog where Mr. Jiang and I created a small mobile game. It was one of my early creation at the beginning of my game development career. I re-post it right here because the development was one of a kind for me. The technical difficulty was fun, I even made a level editor for this game. Unfortunately the game is no longer available. Well, but it was a cool journey though. Enjoy!
Hello! It's been a while since I post something to my blog. On this opportunity I'd like to tell my technical story about Sweet Tooth Adventure, a mobile game I recently made.
Brief of the Apps
Sweet Tooth Adventure is a bubble shooter mobile game. The gameplay is pretty much like other bubble shooter game you've found. You control the cannon to shot everything above. When there are 3 or more bubbles with the same color, those bubbles will explode. The player wins after get the candy placed among the bubbles (which have to be exploded beforehand).
This game was an idea from Mr. Dicky Jiang, the artist for this game. He asked me to assist him to do programming stuff on this game.
Bubble shooter game is a simple game. Everybody knows about it. So no amazingly-strange and new game mechanic should be researched. The biggest research for this game was the circle packing of the balls.
Oh, we are using Unity for the game engine.
Every bubble on the board should snapped smoothly each other. You cannot simply shoot the bubble and stop it after colliding with other bubble. The result will be quirky hanging ball. Fortunately there are tons of bubble shooter example game (even an open sourced one!).
The kind of circle packing we want was triangular packing arrangement. This kind of packing is common in bubble shooter game.
After some readings and code, I could gather the idea to snap the ball was "find the snapped position and smoothly move it to that place."
Well, but how we know the exact snapped position? There's a great explanation about it from Feronato's book by using Pythagorean for this problem. By knowing the height and width of the ball, we can find where's the row and column by the distance from each ball. To find the desired position, we could simply divide the current position to vertical distance from top of the board and round it to nearest number (using ceil or floor). Here's some explanation about it in diagram.
The other thing I researched was the Flood fill. It's an algorithm to fill specific area within boundaries. In this case, the boundaries were other ball. Fortunately I have ever used this algorithm for another problem. So it's only a matter of "tweak" the code a bit to change ball colors and its usage (such as bomb ball, rainbow ball, etc).
I realized we need some kind of editor for bubble placement, for the sake of game design comfort. After some difficulties to create the editor, I gave up. I asked Mr. Dicky to simply made the drawings for each level and I'll manually wrote the array of the level. But Mr. Dicky encourage me to finish the editor, because, yeah, it's actually almost done. I need some time to work on it, and the editor finally can be used for level creation.
I'm glad Unity editor is very easy to extend.
These tools helped us to make the game:
- Facebook Messenger as the main communication.
- Trello for the cork board everything should be done.
- Dropbox for asset repository. Unfortunately Mr. Dicky's storage was full, so we also use Google Drive.
- Bitbucket for private repository of Git. We used SourceTree to access the repository.
At first we learned to use the tools. After some moments later we could worked together smoothly.
- Do not use single branch of development, so the developer can make changes and push to repository without conflict too often.
- So many things learned if you make the game from scratch.
- ...but of course it's easier to buy a game template and re-skin it.
- Make the content can easily be accessed and modified by the artist or game designer.
And We are Done!
After about 6 months, we finally managed to get things done! Well.. not everything is done. Still some feature and bugs swarming around the game. We also need to improve the intuitiveness of the interaction.
And again, you can visit the game's landing page here (Yay! Promo!). Expect the update from us. Apologize for any grammar mistake :p . Thanks for reading!