Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Bitmap Drawing Inconsistencies

3 replies · 1,397 views · Started 15 September 2012

Bitmap drawing still seems to be really messed up.

In my tests, I noticed that bitmaps act entirely different when they span multiple frames.

If you constantly clear out and draw to a bitmap every frame, bitmap drawing starts at the top left of the game window (0, -56). The colors are also correct.

However, if you draw to a bitmap one frame, then wait and draw it in later frames, things get really weird. Bitmap drawing starts at the top left of the screen (0, 0). The colors also get really messed up.

Are bitmaps not supposed to span multiple frames? If not... that... honestly ruins most of their purpose in my eyes, which was to save processing power by drawing to a bitmap in one frame and using that bitmap in later frames.

User Bitmaps should never be touched by ZC in any way outside of appropriate draw calls, so they should never become corrupted. They are still subject to all the internal palette rules governed by allegro, so the only thing I can think of is the combination of colors (translucency color persistence problem?) you're producing looks bad in other palettes.. maybe?

Yes, they allow complex drawing to be cached for performance.

For everything else you mentioned I have no idea how that could happen so it's either a bug in ZC or your scripts.

If you constantly clear out and draw to a bitmap every frame, bitmap drawing starts at the top left of the game window (0, -56)

Can this be reproduced?

Urgh. I tried reproducing it in various different scenarios, but no such luck. I'm sure it's something weird with all the junk happening in Fairy Dream's global loop, but I can't seem to pinpoint it outside of where I was testing with before. :shrug: So I guess this can be closed. Thanks, though.

No problem. Bitmap drawing should work correctly so if it is not it /might/ be something else entirely. Question: Are you using arrays for arguments? (ex; Func(Screen->Var[arr[i]], arr[n+arr2[1]] ...) I don't know if that is still problematic in rc4 or not.