Optimizing frame rates
These are some of the ways that I've found to keep frame rates from going
down.
Segments and objects
Even though the example shown above is a fairly busy and large outdoor
level, the frame rate is fairly good. I get about 27 frames per second on the
average, which is livable. FPSC tops at 33, I believe. The thing to keep in
mind is that there should be less than meets the eye.
The facades are just that: facades. They are like the Hollywood sets where there's nothing behind. There's no point in having back walls for the simple
reason that they will never be seen. Also, the level is so constructed that it
never shows the majority of objects at any given time.
Another way to improve frame rates is to make sure that all the objects
that will not move have their physics turned off in their properties list. FPSC
will, by default, have them turned on. This will slow down the engine as it
calculates, weight, friction, etc. Also, set them to be immovable. There's no
point in calculating that.
Enemies
One more way to improve frame rates, is to activate entities as you go
along. Enemies need not exist if you are not going to encounter them for a
while. Yet the engine will calculate every entity's position for every frame if
you activate it from the start. Not only that, but you will hear it's footsteps
throughout the entire level, long before you get to it. It gives away the game
and is annoying. Also, don't have too many enemies in one room at the
same time. 3 is about tops for me. Any more, and it slows down big time.
Load an entity, and give it a unique name, say, Enemy_1.
set it's "Spawn at start ?" property to NO. You can even create a set of
waypoints for it. By the way, I've found that the entity is more likely to
follow the waypoints if you set it ever so slightly above the ground. I don't
know why, but it works better.
Now place a trigger zone.. In the trigger zone's "If activated ?" field, type
the name of your entity, in this case Enemy_1.
In the trigger zone's main script box place the "plrinzoneactivateused.fpi".
Now, when the player crosses into the trigger zone it will bring up the
enemy. Trigger zones, also, have a sound file associated with them. I like to
leave this field blank most of the time. It warns the player that he has
triggered something which you may not want him to be aware of.
Set the enemies to disappear when they are destroyed. I do it because I
believe it helps the frame rate, and because they have a strange way of
dying stuck halfway through walls. Getting rid of them as soon as possible
is the best way to avoid this illusion killer. They still will do it but it will not
be so obvious.
Use Static Lights
Dynamic lights are frame rate killers. For my part, I've never got them to
work properly. I don't know if it's a video card issue or not. It doesn't matter.
The good thing about static lights is that you can use them to your heart's
content. Of course, when it comes to compiling time, the lightmaps will take
forever. But this something that you can do overnight.