ridiculous amount of different tiles? no thats not really a problem... but in some cases, height factors into damage, you can only jump so high, falling damage, etc. So that is 5 bytes per 16*16 area? (4 for tiles, one or two for height cause the tiles are arranged weird) An uncompressed map in the current system is 4 bytes per tile. compressed, its about half that, depending on the map. so its more of a memory problem than a speed problem, I think.
Also, what about when people/the cursor goes behind something? That's the main problem I'm having with animation... how exactly would you test for it?
I just ran a test, and looping through an array of 120 compressed tiles 100 times (without writing anything to buffers) takes a fraction less than a second. I'm satisfied with that, as I only hope to do that around 5 times a frame, and 10fps is pretty good... i think :P (thats twice phisical attacking, once moving, one to shift the screen, and once drawing the screen normally, but twice if you try to push the cursor off the edge of the map :P)
so yeah, the slow framerate is caused more by the totally unoptimized sloppy and excessive routines I use to write to the buffers. After all, pt-mask writes to BOTH buffers (only using one), has to check if it needs to shift the sprite, has to load all the arguments, and repeat 3 more times. Plus, I'm using Rect( for the sides, which could easily be simply loading $8181 in a column...