Game Progress Update #41
Hello world, Welcome to the forty first Dev with Dave Game Progress Update!
Summer time is well and truly upon us this week. My phone is saying it’s currently 30° outside, and the car agrees. It is definitely a very hot day today.
I’m currently sitting at my desk in front of the fan as I write this and I’m still an unpleasant sweaty mess.
I got a good few hours of work done on the game this time around. Mostly more Daily Missions stuff.
Daily Missions
All the work I’d done on the Daily Missions in the last Game Progress Update had introduced a couple of new bugs. I worked on these things first
Daily Mission Selection
I’d made a rather simple error with this. There are 5 mission types currently, which range from 0 to 4. When I’d coded the bit which selected new missions at random, I’d simply set the maxMissionTypeCount constant to 5, the number of actual mission types currently. However when I used this in the Random() function it ended up returning values ranging from 0 to 5! This is the cause of the occasional blank daily mission.
I fixed it by simply changing the value to 4 and making a note in a comment above the constant.
Daily Mission Reset
Another problem with the code turned out to be with the way the new reset time was calculated. I found that if you ran the game after the reset time that day, every time you clicked the game icon you would get a new set of daily missions.
This was one of those problems which I had to sit down and think about with a pen and paper. I worked out that the problem was that the game was choosing the new reset time to be 8pm on the same day. Meaning that when you started the game after 8pm, the game would decide the timer was over and refresh the mission list.
To fix this issue, after the existing code. I added a check to see if the hours component of the time was 20 or greater, and if it was then to add 24 hours to the reset timer. I’ve tested this and it appears to work.
Targets and Rewards
The other thing I’ve gotten done with the Daily Missions is decide on a way to determine the target values and reward amount for the missions.
I decided to expand on the missionTotals[] array data, by changing it from an integer array to a typed array and adding variables to store the minimumTarget and the maximumTarget, as well as the step value. As well as the minimumReward and maximumReward also.
The system record the number of times a mission type is successfully completed. This value is used with the step value to determine how far between the minimum and maximum values the target value and the reward is.
These values don’t change and will be stored in the array but not saved to the missions save file.
The Alpha test
I also have officially launched the alpha test. This is an exact snapshot of the current build of Flappy-vaders so some of it doesn’t work and some of it doesn’t work very well.
Those who have provided me with an email address will be receiving an email with instructions on how to download and play the game.
Don’t worry if you haven’t, there is still time! Just let me know either by email or social media, what google mail address is associated with your android and I’ll add you to the list of testers.
I’m actually excited to get some new perspectives on the game.
That’s all folks
And that is all I have to share this time round. I’ll as always be back in two weeks with another update for you.