I’ve encountered a very strange problem (and the roots actually lie in the decision to continue with the upgraded physics system with Leadwerks – and possibly with the upgraded BlitzMax version). I explain this in as non-techy way as I can – and I go in the very, very beginner basics.
First the basics: when one creates games, they compile the code which is like “from human to computers translation”. The .exe files are understood by the computers, and the code files are understood by human. Now, in order for humans to find bugs and errors a “debug mode” was invented, so that humans can see what’s going on in the game while playing it. This error mode means slower performance (for example, a game might run at 50% speed), but it makes it easier to locate bugs and correct them.
After errors have been fixed (most of them anyway…), the game can be compiled in “release” mode.
Release mode is the one that you customers use, the debug mode is for developers only.
Now my “small problem”
About a week ago, I spotted a problem: my release mode wouldn’t work right. The collisions were “broken” and acted really weird. I hadn’t spotted this earlier, since I hadn’t compiled release mode for some time. Since I never had any problems with debug versus release modes, I simply hadn’t felt need to do that (game runs fast in debug mode in my computer, so it wasn’t necessary – I was concentrating on other issues).
– Debug (slow) mode works
– Release (fast) mode is broken.
I have zero errors. Zero warnings. All my code is 100% the same for both debug and release modes. No threads.
I’ve upgraded to the latest Leadwerks (LE2.24) and I’m using BlitzMax (1.33 RC5). In earlier versions (LE2.18 for example) there wasn’t this problem, but I had to upgrade to the latest version to ensure compatibility (that’s another long story which was discussed some time ago here on my blog).
It’s pretty hard thing to tackle. I’ve never faced anything like this, and the bad thing is that there is no errors. Nothing about uninitialized variables. The only error is that the collisions between the player controller versus everything else acts weird. Other collisions (like boxes against ground or boxes to boxes) all work perfectly in both modes.
I’ve used the past week to locate this error and trying to isolate what the problem really is, but so far no luck.
This actually didn’t turn into Rant ^ 3, but I can now say that this is quite horrible problem that comes in horrible time (this has now turned into the biggest task left to be able to release the game. I have some other tasks on my list, and was hoping to release the thing already – but now my energy goes into solving this nice little thing).
I know that this will be solved, one way or another – but it can be… slightly annoying not to be able to release your game since the release version compiles differently from debug version. (I know that of course the problem can lie in my code – and I’d hope it would be there – but still it’s really strange that same (collision) code is treated differently depending on the compile mode)
Oh well, I’ll just take a deep breath and continue…