Game Progress Update #53
Hello world! And welcome to the fifty third Dev with Dave Game progress update!
This is the first update since I’ve been back after Christmas. I’m happy to tell you that my girlfriend has made a complete recovery after her stay in hospital.
We had a brilliant Christmas and the best New years party I’ve been to in a long time!
I hope 2023 has had a great start for you guys as well!
Anyway, lets get on with the update..
Tidying Up
It had been a few weeks since I’d last turned the PC on to be honest, so I took a little time first off to refamiliarize myself with what I’d done already and what I was working towards.
It seems I had been quite sloppy when I had written the trophy functions. They were ambiguously named, and didn’t have comments 😕 So fixing this felt like a good place to start.
//********************************************************************************
// void = FunctionName(value as integer)
//********************************************************************************
// A few lines to describe the function, and explain its usage
//********************************************************************************
I prefer to comment at the top of the function as shown above. The first line shows the syntax of the function, and the second block of text details what the function does, and how it’s used.
I left the three function names as they were as once I better understood what each function did, the names became a little clearer. Lets hope the comments I’ve added prevent this confusion in future.
Trophies
Next off I did some more work on the Trophies. I’d previously got the first four trophies working. Two for distance travelled, and two for coin collecting.
I worked on the ‘Play x number of games’ trophies next. This simply involved adding a line in the play game button function, which increased a counter. Once this counter reached the target, then the trophy was rewarded.
The next two trophies were the ones relating to unlocking all the powerups and upgrades. Again this was a fairly simple job of adding a line to the button functionality of each purchase upgrade button. This checked to see if the item had been upgraded before, and if not to add one to the counter.
Once the counter reached the required value, then the trophy was awarded.
The last trophy I completed was the one relating to the player coming back to life using the “Second chance” boost. Again, I achieved this by adding a line of code to set a flag indicating the player had resurrected. This flag was checked for and the trophy awarded.
This left one trophy remaining, which is the one relatiing to watching the about text. Which currently doesn’t work so I was unable to do the last one.
More trophies
I did notice a new bug. I reached 25 distance and won a daily mission, but I didn’t get awarded the trophy for the same thing. This leads me to believe that the two systems are measuring distance differently some how.
I also managed to win several trophies at once when I wrote all the functionality but had neglected to set the target values to anything. Lol!
As you can see in the screen shot above, I also have decided on some better names for the trophies rather than “Test trophy 1” etc.
About Text
Since I needed to have this working in order to finish off the trophies section, I decided to get this working next.
I had already programmed a working example of what I wanted and Included it as a separate source in the game. So in theory it was a simple case of calling the function.
In theory…
What actually happened was slightly different. I called the function, and nothing happened! Nothing at all.
I managed to fix it in the end, but it took my remaining couple of hours time yesterday and I was unable to get the final trophy working. I still need to code a bit to signify the end of the text and to award the trophy, but that’s a job for another day.
The problem was caused by a depth issue, the about text was appearing behind the paralax scrolling images. And was resolved by hiding all the assets while the text was being rendered.
I did actually record some videos of the about scroller working badly or with unintended results, but I wanted it to be a surprise, so I won’t reveal too much just yet.
That’s all for now.
That’s all I have time for this week. I’m happy in the knowledge that at least this blog post will go out on time (It’s about an hour away from deadline now as I’m writing this last paragraph or two)
I will be back in a couple of weeks with another update.
Until then, good bye 🙂
Comment (1)
Game Progress Update #54 - Dev with Dave| February 3, 2023
[…] I started by going back to the About text system which I had left unfinished at the end of the last Progress Update. […]