Buggy, bug, bugs!

Today has been one of those strange days that just leave you scratching your head!

I’ve had two hard crashes today while working on Chaos Groove. Both times neither Alt-tabbing, pressing ‘Control, Alt, & Delete’, or physically pressing the power button on my machine worked. I’ve had to manually unplug the PC and then replug in just to escape from the frozen game. The strange thing is I think that the error is not just due to my mistake, but due to the MSDN debugger. The second error when I reran in a windowed mode (to try to be able to get back to the OS), showed a simple undefined variable being added to, while not being used in an array or anything else like that. This time the debugger caught it, whereas just one minute earlier in fullscreen it hard crashed the PC when running in Debug mode.

About halfway through the day today I got a very strange thing happen with my particle effects. They were being drawn at the wrong angles after a creature attack effect, and even the spell beam effect was wrong. I couldn’t understand it and tried tracking it down, but it seemed that PTK’s blit was at fault because I hadn’t changed anything to do with the code in the particle side of the game, yet suddenly it was using the angle values passed to the blits very wrongly indeed. Despite double-checking the actual values passed (which were correct and hadn’t changed), the angle values were being treated as twice as large as they were. I.e. if I passed 0, it was correct, but passing 45 was treated as 90 degrees and passing 90 was being drawn as a graphics rotated to 180 degrees. A simple divide by 2 fixed this error.. But this is not an answer and makes the whole code feel far too fragile!

Finally I noticed something was a bit wrong in the config file reading for the new display code. It seemed that due to a comment error in the display.ini file, PTK might have been asked to open a fullsized 1280 x 1024 window instead of a fullscreen mode. I certainly never noticed any window gfx previously, but it seems for some unknown reason this completely screwed up PTK’s angle code. I haven’t got a clue why.. It’s now all working perfectly again.

It’s just been one of those days where I suspect I’ve attracted the attention of a malicious gremlin. 😛

Advertisements
Posted in Bugs. 6 Comments »

6 Responses to “Buggy, bug, bugs!”

  1. Nick Stevens Says:

    Aren’t all gremlins generally malicious? 😉

  2. oddbob Says:

    It wasn’t me, guv! I was nowhere near it!

  3. happymonster Says:

    Naw, it wasn’t you. I didn’t get motion sickeness from watching the game.. 😉

  4. kreezer Says:

    Malicious Gremlin sounds like a creature that could be added to Chaos !

    If this weak creature moves on the same square as an enemy wizard, it attaches itself to the wizard and confuses the spell-caster when he tries to cast a spell. This causes the unfortunate wizard to cast a random spell instead of the spell selected !

    The only way to get rid of this menace is to move into a magic wood where the Gremlin will lurk until another wizard enters there…

  5. Adam Jimenez Says:

    I’m running 1360×768 on my LCD TV. I can see that the game is not in fullscreen – but windowed. I get the top and bottom of the window cut off, and I can see my desktop on the left and right side.
    I’m hoping this will be resolved by the display.ini bug.

    It makes it a bit awkward to play at the moment. From what i’ve seen it looks good tho.

  6. happymonster Says:

    Hmm.. That is an awkward screensize. All standard screensizes (640 x 480, 800 x 600, 1024 x 768 & 1280 x 960) have a 4:3 aspect ratio. Yours being widescreen would have to be run in 1024 x 768 with borders either side.

    The next demo will have a display.ini file where you can pick a width, height and whether to do the display windowed or not. Hopefully that will work better for you..


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: