Allegro FIX: Programming Hanging Up & Freezing at Random

Comments 2 Standard

Okay, so I’m 99.9% positive that I’ve found the problem. It has to do with showing the mouse to the screen (although I’m not sure why its affecting everything now when it wasn’t having issues earlier).

If you show the default mouse after you acquire the screen to lock it for drawing to the buffer the program freezes up at random intervals. If you move the show_mouse() call before acquiring the screen or after acquiring the screen the mouse works fine (but flickers).

So I think the best way around the problem is to simply create my own mouse icon and see if that gets rid of the freezing up.

PLEX Update

Leave a comment Standard

Time Spent – 6 hours

So I’ve been working on fixing the map file for the first level… however, now that I’ve switched the game over to my horrible Vista PC its freezing even more often then it was before. It’s getting to the point that I’m going to have to figure out what is causing the freezing problem if I want to keep developing this.

First I tried removing the newer version of allegro (4.2.2) and putting it back on the older version (4.2.1) and there didn’t seem to be any difference between them. So, my next step is getting Allegro working on .NET 2003 so I can use a *cough* working debugger. Sorry Dev-C++, your debugger sucks.

For the rest of the night I’m going to be working on trying to figure out what the heck is causing this problem. I’m going to strip out all the classes and functionality and put it back a piece at a time. Tedious work but if I can’t catch something with the .NET debugger I don’t think I have any other choice at this point.

If I can ever get past this freezing problem I’d like to start working on the store and receiving gems from moving blocks around on the game board. I’m thinking it doesn’t need to be anything too complicated at this point. Initially I’ll just put some randomization in there, so as they move blocks they randomly get gems. However, in the long term I’d like to give certain spots on the maps a “weight” and a “optimal block” so if they put the optimal block over that spot they get the number of gems according to the weight for that spot.

I have a few more issues to work out of the selector as well as far as blitting goes. Sometimes I don’t think its blitting correctly when you move outside of the main window section so I’m gonna play around with it to double check.