I found these goobers...
1 - set camera range 1,5000
change this to
set camera range 3,3000
this probably will not improve speed much, but it should help.
Generally, set camera range to be "in front of the camera"
hence 3 and about 50% farther than the fog range (you have fog at 1000)
2 - It is not required to repeatedly call Loop object.
Set a flag (interger) to track if you should be looping or not.
Checking you flag is much faster than commanding the Loop and repeatedly setting the play speed. Instead check it this way
If Looping=0
Loop Object .....
Set Object Speed .....
endif
then, to handle the die animations...
if Looping=1
Play object .....
Set Object speed ....
endif
You may also need flags for each animation type (idle,walk,...)
But this should improve speed some.
3 -
Also, make your matrix smaller. 70x70 may seem small, but consider this 70x70=4900 plains, 2 tringles per plain = about 10000 polies
and you still don't have effects and critters ....
Keep the size at 10000x10000 (if you want) but lower the "grids" to about 20x20 and see the speed increase.
4 - Hard to tell from your code, How many DB primatives
are you using? DB does not like primatives. You would be better off making your trees and houses in MS3D and loading them as an .x file.
That will speed things up a bit.
5 - How many Zombies?
Looking at your code it looks like alot
"for r=1 to (10*a#)"
if you really need that many, just make 4-5 and have a "clone" value.
You know, to track how many times a creature was actually killed.
Lets say for example you use a max of 6. Then each time this creatured is killed, you dec the clone value and relocate the creature out of view in a random location. If the counter goes to zero, the creature will no longer be respauned. This will increase game speed alot.