I’ve started developing my mobile game and I must say that defining a plan really helped me. It’s much easier to get work done when you know exactly where to start. So, here’s my first update: steps 1 to 3 are completed!
I was a bit wary at first as I had never developed a mobile game with Unity before and I had no idea how to use touch. But it’s actually pretty straightforward: Input.touches lets you access the positions of the user’s fingers on the screen.
For the 1st step – moving circles with your finger, I used raycasts to determine if there was a circle hit by touch, and if so, I update the position of the circle so that it follows the finger. If you’re interested, I’ve shared this on Github.
So that was pretty easy, but I actually had a hard time getting started because I couldn’t test my game at first. I use the Unity Remote app to test directly on my phone without having to make a build, which is really convenient. But after a few tries, it stopped working. It took me a while to find out what the problem was: my android device wasn’t recognized anymore because the adb.exe file in the C:\Users\[user]\AppData\Local\Android\sdk\platform-tools folder disappeared. If you encounter the same issue, know that you can’t just paste the file into that folder as you won’t have permission. You’ll have to delete the folder and then reinstall it from Android Studio.
For the 2nd step – getting organisms to go hungry, I defined a score representing hunger and the colors of the organisms change when the scores reach certain thresholds. To change colors, I used the lerp function so that the change is not brutal, but rather one color fades into another.
For the 3rd step – getting food to pop up, I detect when there’s a collision between an organism and food, and I simply feed the organism by updating its hunger score, before I make the food disappear.
Without further ado, here’s what these first steps look like for now:
Once I’m done with step 5, I’ll be able to start adjusting variables so that the game has the right pace and is playable.
Still a long way to go but I’m satisfied about what I’ve done in a short amount of time, I’ll try and keep it up!
A girl in tech.