Severe slowdown with B3D and MD2 after v1.88

Blitz3D Forums/Blitz3D Bug Reports/Severe slowdown with B3D and MD2 after v1.88

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Some years ago I was working on a game which involved hundreds of characters on screen, and I coded a small stress test in order to see how much animated models Blitz3D could handle. It turned out that the best choice was to use MD2's, which at the time enabled me to have about 300 models on screen while keeping about 35 frames per second on a Athlon XP 2700mhz with a Radeon 9600 Pro. This simple technique involved loading a single MD2 ("dragon.md2" from the Blitz3D examples) and then copying the mesh as many times as needed. The same method applied to B3D's as well, though I obviously obtained a lower frame rate.

Recently I tried to run the old demo again, and noticed that the frame rate on the same system dropped to about 7 frames per second (five times slower!). After some tests, it turned out that the same code compiled with any Blitz3D version after v1.88 gave that awful slowdown. The changelog for Blitz v1.89 only mentions a "Fix for 'vertex glitching' issue with latest nvidia driver and skinned/md2 animating entities.", though the bug applies to B3D models as well (which in the test dropped from 15fps to 3fps, about the same slowdown).

I have created two small demos in order to see if it was common on other configurations as well, and it looks like all share the same problem.

I also tried with different models from different sources with the same results.

Here you can find the two examples:
http://www.break-in-games.com/workspace/B3D_slowdown_demo.zip
(B3D slowdown demo - source + compiled .exe from v1.88, v1.89 and v1.98)

http://www.break-in-games.com/workspace/MD2_slowdown_demo.zip
(MD2 slowdown demo - source + compiled .exe from v1.88, v1.89 and v1.98)


Keep in mind that while the stress test had 300 models, the slowdown is still serious with far less objects on screen: with 40 B3D's the difference was of 55fps against 35fps, with 100 B3D's of 53fps against 18fps (!).

I hope this issue can be easily addressed, since it would force to compile with v1.88 for anything which has a decent amount of animated 3D models on screen.