Original Post
Just bought the original book (not the new re-written one), and have been playing with the simple game engine developed in the last few chapters... As I know that quite a few people use the book for learning to program I though that a thread looking at some fixes to the engine would be a good idea (i knw the book is old, but there are still quite a few copies floating about). The main fix that speeds up the engine significantly is by removing a loop in the collision detection which causes every collision to be tested twice (which is a huge slow down when you have large numbers of mobs spawned as each is checked against every other). Remove these lines from the ProcessCollisions method in the object.h file and see the FPS rocket!! // test child collisions with obj if (HasChild()) ((CObject*)childNode)->ProcessCollisions(obj); // test sibling collisions with obj if (HasParent() && !IsLastChild()) ((CObject*)nextNode)->ProcessCollisions(obj); Has anyone else managed to eek out some more FPS from this engine? More FPS means I can pack in some more new features... Iso