I must apologise..
I assumed I was right.
Never assume you’re right!
I tried and tested, over and over, and I couldn’t find a fault.
And then, this morning, I received an email, and through a couple of back-and-forths discovered that, indeed, there was something really really really quite wrong.
I made myself a new fresh install, and tried to find the bug.
The bug happened!
I saw it!
I thought “WTF!?!” and then tried again, with another fresh install.
And it didn’t happen!
And so I tried again..
And again and again..
No bugs at all..
I must admit, at this point I was truly baffled.
And then, hunting through the code, I noticed why it was happening, and also why I hadn’t noticed it earlier.
To start a game, I’ve been hitting Spacebar. It’s right under my thumb, it’s quick to get to, and I don’t need to find it with the mouse… It’s handy to have..
The bug happens when you, instead, click the start button on the menu.
In order to traverse from “Clicked Start Button” to “Start Game”, I reused a variable. I made editmode=2, because editmode=1 is how the Editor’s button also works.. When it gets to the “Check the keys” bit of the code, it also checks editmode, to see if the buttons have been clicked.
Nice and simple, and a quick way to make clickable buttons work.
Or so I thought.
What actually happens is that the editmode variable doesn’t get reset when the game gets going, and because the game think’s you’re in editmode, it won’t save a score..
Damn and blast!
So, now it resets, and everything’s the way it should be.
Note to self : FFS, check your buttons occasionally, and stop relying on keypresses!!
Same link, now working!
Now that the code’s opened up again, and I’m in the mood for tweaking, I might as well carry on and play with a few things, so expect another update later on tonight. .. Maybe..