sigh
Been fiddling with my timers and main loop with regards to the timers and now have a loop which boils down to:
From reading forums this was said to be the recommended way of carrying out the game loop (if you haven't noticed it is also based on the Allegro 5 tutorials). But for some reason there is a lag in the timing (speeds up and down), not big, but noticeable. Plus the screen flickers slightly as it scrolls.
I thought that this would be down to loading memory bitmaps rather than video bitmaps. But they are only a few 100kB! I loaded the bitmaps for the player sprite AFTER I created the display anyway to make them video but to no avail. I checked the flags of the bitmaps and they came out with a flag that I couldn't identify.
So...
Is there something wrong with my loop?
Why would my bitmaps say they have a flag of int value 1056 when I check? What type of bitmaps are they?
Flags are stored bitwise
You must use something along these lines:
if (myFlags & FLAG_SOME_FLAG) { // Flag is enabled }
Thank you, that sorts out whether I have video/memory bitmaps
Anything wrong with my loop though, as the glitch still remains?:-/
Is there something wrong with the way the updates and redraws are called? Updates and redraws are done 60 times a second and I have a separate timer for each.
EDIT
Sorted it Needed to use interpolation to get things running smoothly. That'll teach me to code after a few beers hic