Ok, so I had a closer look at your code and found the problem. Your bullets were not freed when they left the 'top' of the screen...
In your THBullet.doMove you had the following:
[pascal] If X < 0 then Free;[/pascal]
This must be changed to:
[pascal] if y <= 0 then // not x!!
dead; [/pascal]
Furthermore you need to add Engine.Dead in your procedure TfrmDXTest.MoveTimer
This works and your fps don't drop after a long period as before but I'm not entirely convinced that your code is 100% correct. Use the method as described by user 137 to see if you free objects correctly. A more OOP approach would be better; once you have the hang of it it's easy and more manageable. I also suggest you take a look at the shoot example which ships with unDelphiX.
Looks good so far
Bookmarks