collision detection...laggy game?

BlitzMax Forums/MiniB3D Module/collision detection...laggy game?

Pragun(Posted 2007) [#1]
hi. i posted in the beginners forum but just realized that this post might be more relevant to the minib3d forum. i'm creating a space shooter game. here is a link to my code:

www.mytempdir.com/1300200
download password: bmax

if you hold down spacebar and move around a bit...every few seconds or so the game crashes for a split second. any ideas?

if anyone can help w/the freezing issue/can tell me a way to speed up the collision detection, thanks in advance! (i know absolutely zero about collisions and have never used blitz3d)


ima747(Posted 2007) [#2]
don't have a chance to look right now, but using octrees with minib3d collision made my game go way faster. look up help entry for CreateOctree(). I still don't really understand the exact effect changing the numbers has on the system but it's a place to start...

Also make sure you don't have any programs running in the background etc that could be causing hickups that arn't your fault.


Pragun(Posted 2007) [#3]
thanks for your reply.

well it's not other programs...the program behaves really oddly. you can continue to move the ship and the screen updates that but the bullets pause out for a second or a two and new ones aren't created. then, all of a sudden, the bullets are created and the rest keep moving. i'd understand if there was lag and the whole game froze for a second or two...but the fact that you can still visibly move the ship confounds me.