A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
8th April, 2011
Add a simple pause menu.
That was task number one, this morning, on a 5 item tasklist.
The stupid menu took 5 hours!
View on YouTube
The new Pause menu pops in at about 33 seconds.
You'll notice that I opted to do a nice gameplay fade-out when the menu plops down.
This was a simple case of adding a Darkness variable to all the drawing functions, and then turning the brightness back up again for the actual menu!
Could be handy for other things, perhaps?
No idea! Right now it's just slapped into the Pause bit!
The Mute button is also visible when paused, and does exactly what it looks like it does.
Any/all Sound functions get suitably stfu'd when it's on mute.
.. not that there's many Sound functions, just yet.
It'll do for the moment.
I've also sorted out a quick settings setup, with Set[0-20] being usable to store whatever settings you need. Set is the mute setting.
.. This morning, I had another 5 things to shove in behind #5, but they've all escaped me, right now!
I'll probably move the mute back to 0, then!
Anyhoo, if you can set it, and you want to save it, that's where you do it.
First, there's a High[BigNumber] array.
0-4 = Best 5 plays
5-9 = Last 5 plays
And then there's 25 of those little groups.
So, if your game only has Easy/Medium/Hard modes, you'll only use 30 slots, but if you have, say, 25 minigames in a minigame collection, each one can have it's own 5/5 score system!
..there's also a LoadScoreGroup and SaveScoreGroup which.. well.. you can probably guess those bits..
Not that all that matters, anyway.
This is a Jay-Be-Lazy Framework, and Jay's FAR too lazy to faff about with Which Game's score goes in which slot, and how high..
Instead, set your group using the GameType variable. ie, Easy=0, Medium=1, Hard=2
Ingame, set Score=Whatever your score currently is.
End of the game, the GameEnded() function is called, and the score will be automagically slopped into whatever bits of whichever where in the array it should go to.
And then the scores are saved.
.. You don't have to do ANYTHING.
God, I'm lazy!