Skip to content

[Populate] Ep. 3: Circles, circles, circles everywhere!

Posted in My Projects

Loading Likes...

Good news: I’ve finished steps 6, 7 & 8 which means I’m almost done with my initial agenda! I have a menu and UI and now that it’s all dressed up, my game is starting to look like a “real” app. I’ve thought of some new features I’d like to add though, so I’m not going to stop after implementing bonuses.


The first thing I added since the last update was the points system. I changed it repeatedly but I finally settled for this equation:

O² * sqrt(t) / x + n * m

With O the number of organisms, t the time since the beginning of the game (in seconds), x and m  variables that I chose, and n the number of pieces of food eaten.

That way, the more organisms you have to deal with, the higher your score goes up with time, time is important but your score doesn’t grow linearly with it, and each piece of food you eat is an added bonus.


Calculating the score and displaying it was a piece of cake, but I had some trouble trying to record the best score to display it on the home screen. I knew I had to write the high score in a file, read the file at the end of each game, and replace the value if needed. But what I didn’t know was that there’s a specific folder on mobile platforms in which you can read and write files, and I spent some time trying to get this read/write thing to work on my smartphone. I finally found this article which explains what to do pretty clearly and it worked.


Then, I added the home screen, and the Game Over and Pause menus. No issue there – positioning UI correctly and creating the assets was time consuming but scripts were fairly easy to write:  I used the scene management pre-built functions to load scenes when buttons were clicked. To pause the game, I set the timescale to 0, and change it back to 1 when I quit the game, restart or continue.

On the home screen, as well as on the splash screen, I put several circles that have a random sinusoidal vertical movement, which adds a nice touch in my opinion because there aren’t circles moving everywhere but you can feel that it’s not static either.

I haven’t decided which sounds and music I’m going to use yet, but for now I use a “pop” sound that I found online to test the sound on/off feature (there’s a pop when a baby organism is born).


One other thing I changed in this new version is that there are now 3 organisms at the beginning of the game. After having some people test my game, I realized that it was way too easy to survive if your organisms didn’t reproduce, and when there are only 2 on the screen you can control one and make sure the two circles never touch. With 3 though, you have to be really careful if you don’t want 2 organisms reproducing while you’re feeding a third one.


No more suspense, here’s what my game looks like after completing these steps:


My next step is to add bonuses: lives, slowdowns, something that would make more food pop up, and something that will make circles disappear. I think that with these the game will be less frustrating, because for now it’s hard to last more than a minute. I knew from the beginning that I would be adding these bonuses so I tried to write my code accordingly and it shouldn’t be too complicated to make in-game changes when a bonus is activated.


Something that wasn’t planned but that I’d like to add are challenges, which I think are motivating when playing a little game like this one. The ones I’ve thought of for now are reaching a certain score/lasting a certain amount of time without reproduction or while keeping some organisms monogamous and feeding an organism a certain number of times in a row. If you have other ideas, tell me in the comments!


When this is done, it will be time for the final touch (well, music apart): animations. Instead of just having organisms go over each other when they cross paths I’ll add some animations on collisions, as well as when a baby is born. Maybe I’ll also change the aspect of the circles a bit, so that you can better distinguish them when there are several in the same place.


I’m going to try and wrap this up as quickly as possible so that I can focus on other projects: the ones I’ve left alone for a while as well as new ones.

Stay tuned,

A girl in tech.

Be First to Comment

Leave a Reply