Hello
Guess Who!
In the DBPro version of Iron Infantry, I too realized that SOMETHING was dogging my framerates when I added a few to many tanks/heli/infantry. Like you GeeBee, this frustrated me and I did try various things to speed it up and eventually came to the conclusion that the amount of processing that was going on to provide the "gameplay" and "physics" of the vehicles imparticular seemed to be the culprit. By limiting the number of tanks and vehicles.... I'd get a noticable increase in frame rates, and by adding more I'd lose those framerates.
One thing you might try (if I haven't got code in there for this yet) is to add a flag to a tank for example - that is the sum of all thats going on with it - that is simple - "NO MOVEMENT" flag. This would be set to true when the tank was going slowenough that you consider it "stopped"... you set this flag... then subsequent loops - you just check if new motion commands issued, if not - SKIP all the positioning, tread animation, "motion physics" math etc. This is only a SMALL "gain" however this kind of approach applied to "everything" will at least buy you some CPU however it will not be a static saving - the game will speed up or slowdown (from a Frame Rates point of view) depending on how much is going on at one time.
I tried using shaders at one point - these were a FPS killer! I also now have a better graphics card and might find that my other card was just not good enough - but I came to the conclusion that DarkBasicPro is not a monster for processing lots of code - but then - I'm not a perfect coder by any stretch and I might have bogged down the game using a certain math function to much or some other thing I never identified.
Regardless, this is why I switched to DarkGDK & C++ and I found that processing these kinds of things was perhaps more work to setup - ran faster.
As of late I have been swamped with my day job and my other coding efforts have been rendering 3d using directx directly because DarkBasic or DarkGDK do not render points... Well thats not true - I can get DarkBasic to render points using a shader - but that same code won't run in DarkGDK - so I went to pure DirectX as there is a rendring mode just for points - and using the DirectX indices for poly generation - well - its neat.. though other things are not so easy as in DarkBasicPro and DarkGDK.
In short - I think you will need to look for as many CPU process saving tricks you can to get the extra "oomph" from DarkBasic.
From your screen shot - it looks like you have done very well with that code base and I'm guessing you are learning a lot!
You CAN pull off a game in DarkBasic Pro and DarkGDK for that matter - you just have to constantly make tradeoffs between "looks" "gameply" and "Performance" which is true for ANY game you make using ANY "engine" or kit.
Keep up the good work!
Best Regards,
Jason P Sage