Game Progress Update #49
Hello World! And welcome to the forty ninth Dev with Dave Game Progress Update!
I definitely get the feeling that I underestimated the amount of time that getting the rest of the scratch cards working. Although I have made great progress this time round, I’ve not managed to complete the scratch cards entirely.
I had hoped to get done a few other things done for this update, but sadly I didn’t get to touch on these too much.
Anyway, let me tell you about the stuff I have managed to get done.
Carrying on from where we left off in Update 48, the first job this time round was to take my pen and paper sketch of the Daily prizes screen and mock it up in an art package. I do this so I can work out the exact size of the UI elements
The important elements on this page were as follows
- The total count of scratch cards the player has
- Time remaining until another free card is awarded
- Play scratch card button
- A list of fruit combinations and prizes
Which I think I have managed to do quite well.
(Sorry the font looks funky, I couldn’t find the correct font details and rather than delay things by having a proper hunt for them, I just pressed ahead using something similar from memory)
Creating the screen
Having created the graphics and saved out the individual sprites I needed, it was time to start creating the screen inside the game.
I cannot state enough how handy the Percentage Resolution Tool was for loading and displaying the sprites correctly using AGK Studios percentage resolution system.
This looks great so far I think. Once I had the buttons and stuff in place it was time to make them all functional.
When I implemented scrolling to the page I found a minor issue with the ui element depths, but that was quickly sorted out.
All the other UI pages need the top bar sprites to have the depths adjusted otherwise the rest of the page elements appear over them when scrolling. This has been a thing since the beginning and I have a function which sorts it automatically. I just needed to add the new page to the list of sprites to have the depth adjusted.
I could not decide whether to create the prize list in the art package or to create it programatically, so instead I just created a temporary graphic so I could get a feel for the size of the image. The current temporary image has a 16px margin, 32px for text at the top, then twenty 32px panels of alternating colour. This will do until I can decide how best to do this. (I’m leaning toward programatically at present)
I created a few new variables in the scratcher type. These are to store the number of scratch cards that the player currently owns, the time that the next free scratch card is to be awarded, and another timer which is to limit the number of rewarded ads the player can watch in one day.
It was quite easy to hook the play scratch card button up to the code I had previously used to start a scratch card as I had simply commented it out.
I also added code to update the scratch card count on the display, and to decrease this value whenever a scratch card is played.
There was a little difficulty getting the rewarded ads to work properly, but this turned out to be a case of me needing to RTFM.
I also added functions which loaded and saved the data relating to number of scratch cards and rollover times.
Lastly I added the code necessary to complete the daily mission to get a daily prize (play a scratch card). This was straight forward to add because I had already written most of the code and simply needed to add a line of code to call a function.
As an encore (and so I could move the card from the in progress column to the completed column of the Trello board) I found and implemented a chip-tune style fanfare to play whenever the player completes a daily mission.
Things I didn’t manage to do..
As I said above, I fear I underestimated how long this would take to get working.
I couldn’t decide on the best way to determine winning combinations of fruit in time. The fruit are currently chosen at random, and the IDs are stored in an array in the scratcher type, and there is no code to determine if the card is a winner or what the prize will be.
I still need to devise and implement some method to notify the player of what they won. This will probably be a panel which appears over the scratch card when the player scratches 80% (ish) of each panel off.
And I didn’t get the timed stuff working with the scratch cards. Although this should be straight forward enough to copy/adapt from the code which resets the daily missions.
Thats all for now
Sadly, I’ve run out of time. I was hoping this update would be done for the 4:30pm deadline I aim for every time, but today had other plans! Still I’m only a few hours late today 🙂
I will be back as always with another update for you, where I’m hoping to have finished the scratch cards, and maybe even made a start on getting the IAP of currency to work.