Previously, I was calling a function that would clear the backbuffer before rendering the frame -- this was nescessary, when there wasn't floor or ceiling, but isn't anymore... so I disabled it, and to my amazement:
(1ghz 256mb ram):
320x240: 150->170 fps (increase of ~30)
640x480: 50 fps (increase of 10)
1024x768: 20 fps (??)
( http://lithium.zext.net/asmcast_test.zip )
anyway, I'm doing the sprite system now... in contrast to the previous engine, sprites in this one will be added on a per-frame basis.. sounds like a lot of work, but the idea is to mimic the traditional 2d 'PUT' concept, which should be more intuitive to some game programmers (including myself).. this also got me thinking about how the api will work, here's an example in pseudo code:
Code: Select all
set_light ( &H004000, 3.0 ) ' 64 green (0 red, blue), intensity 3.0
set_map ( varptr(mapData), 64, 64 ) ' set map of size 64x64
do
set_buffer ( varptr(offscreenBuffer), width, height ) ' width and height can change per/frame
set_position ( player.x, player.y, player.angle, player.z, player.look )
bb_sprite ( varptr(someMonster), 10, 10, 0 ) ' x, y, z
bb_sprite ( varptr( .... etc
render_frame
put (0, 0), offscreenBuffer, pset
loop until multikey(VK_ESC)
any thoughts?