Background
Tamadoggy is a single player dog simulation game. The purpose of which is to take care of a virtual pet dog. It is a native android application, coded with Android Studio using Java.
The app begun as a individual course project. Using the ever popular tamagotchi game as inspiration, I wanted to create a fun yet casual real time app that would engage users to continue playing.
Process
Initially I started off brainstorming ideas for the app that would fit course requirements but still be a fun as a standalone game. I then went on to define features I would like to see in the game, sorting them into basic, standard and advanced functionality. After, I planned out the site map of the app, and the database structure I would require for the basic functionality. When coding the app, I had to research and learn many different coding techniques since Tamadoggy is the first native android application I have worked on.
One of the issues I faced was establishing a continual degradation of stats, even when the player wasn't using the app. To solve this issue I created a time stamp for when the degradation of stats should occur. Stats degrade at different intervals but I thought it best to calculate everything at the same time, once per hour. When a user re-opens the app, we check how much time has passed since the last degradation has occured. We update the stats based on how many hours have passed, and update the time stamp to when the last degradation should have taken place.
private int calculateStatValue() {
Date currDate = new Date();
long timeDiff = currDate.getTime() - lastDate.getTime();
int intTimeDiff = (int) TimeUnit.MILLISECONDS.toMinutes(timeDiff);
if (intTimeDiff >= 60) {
valHunger = valHunger - (2 * (intTimeDiff / 60));
valFun = valFun - (3 * (intTimeDiff / 60));
valFitness = valFitness - (2 * (intTimeDiff / 60));
valHygiene = valHygiene - (1 * (intTimeDiff / 60));
lastDate = new Date(lastDate.getTime() + TimeUnit.HOURS.toMillis(intTimeDiff / 60));
}
return 59 - (intTimeDiff % 60); //remaining time until next update;
I wanted to keep the UI simple, fun and friendly without being too childish. With that in mind, I chose a more rounded font as well as a bright and warm colour scheme. For my colours I selected a warm orange as the primary and a vibrant pink as secondary. I chose sans-serif fonts for readibility, with the main font having a more playful feel.
The app was a great learning experience for me. It really helped me advance my skills in mobile development. I got to spend time really understanding the android life cycle and learning best practices of app development. Though I didn't get to complete all the functionality that I would have liked to see in the game, I definetly would like to revisit Tamadoggy in the future to refine it. One of the main things I would like to do, is spend some time developing the game mechanics more and testing amoung users.