Hi
Some of you may know about the Lemmings demo in DBPro I put on the 'work in progress' forum a while ago. I'm in the process of modifying the backdrop handling since older graphics cards had a problem with it.
The original method I used was to have one massive bitmap (2048 / 1024 pixels) however not all graphics cards can handle bitmaps that large. I used the 'copy bitmap' command to shift a piece of the backdrop onto the main screen. This worked perfectly on my system with little slowdown so reworking it for better compatibility was my next issue.
My new method is to contain the bitmap data in a memory chunk using the 'make memory()' command and then use the 'copy memory', 'lock pixels' and 'unlock pixels' commands to copy the appropriate data onto the screen. This method was obviously going to be much faster at handling modifications to the backdrop since there's no messing around with a second bitmap.
However, when I tested this new technique I found my system starting to struggle when it came to copying the data from the memory chunk into the screen bitmap. At 800/600 it managed 60fps but at 1024/768 it shot down to 40fps and 1280/960 slowed to nearly 30fps. I realise that a lot of people would call those frame rates fairly acceptible, but my aim is to made this game run on systems much slower then mine without much trouble. Here're my specs:
CPU - AMD Athlon 2000+ 1.7ghz
Ram - 512mb
GFX - Gforce FX 5600 256mb APGx8
The problem comes from the fact that 'copy bitmap' is a very fast command for copying large chunks of bitmaps, and in order to use the 'copy memory' method I have to copy each line of the screen separately which seems to seriously add to the cpu time. If it was possible to copy a chunk of memory like the way 'copy bitmap' does, it could save me a lot of hassle.
I have considered splitting the backdrop into eight 512/512 bitmaps and copying the appropriate pieces of each onto the screen, however the theory behind the code for that seems like a lot of hassle for something that should be rather simple.
Has anyone else got any suggestions, I'm a little stuck for alternative methods.
Thanks
Avan
Not everything in life is as it seems...