Ga naar inhoud


Foto

Guide: Tips on game performance


  • Please log in to reply
No replies to this topic

#1 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 20 januari 2014 - 01:24

Although Emergency 4 was released in 2006 and is about 8 years old, certain alterations to the game using mods may cause performance issues or CTD's, even on brand new and fast systems. Despite its age, Emergency 4 isn't a game that is optimized for high end graphics. Certain newer games such as GTA IV, have functionalities which try to increase the performance (like draw distance). Emergency 4 lacks a lot of functionality to 'automatically' improve performance realtime when you are playing. It was never intented to have functionalities like that, because of the simplicity of the original game.
 
While it's advised to always update video drivers and to have an external graphics card to play this game, it is very likely that a modification itself can still cause a wide range of different issues, no matter how good your computer system is. Especially computers with AMD hardware seem to have more issues trying to run modifications. The random crashes look like memory leaks, which may be a flaw in the game's engine, but there's nothing we can do about that. In my opinion, a lot can be done to prevent crashes and issues by changing the modifications itself. Based on my own experience, and with MikeyPI's help, this guide will give you some useful insight how to deal with performance in modifications.
 
I've divided the tips into 7 subjects and sorted them on priority.
 
1. Textures
Textures are rendered dynamically in this game, so when you zoom in it gets more sharper for a better focus. That process, especially with bigger textures takes more of your computer system. Some texture formats (common formats in Emergency 4 are dds, png, bmp, tga and jpg) also require more resources than others. While bmp files have a great quality, they are larger in size and problably require more resources to load. Take into consideration that a 2,048 by 2,048 (4.16 million pixels) pixel sized texture is 16 times (!) larger than a 512 by 512 (0.26 million pixels) pixel sized texture. Thats a big difference. I strongly advice mod-creaters to seriously consider using lower resolution textures whenever thats possible. For example, a 1,024 by 1,024 (1.05 million pixels) pixel sized texture for a person model is redudant. A texture that's 4 times smaller (ie 512 by 512 pixels) will almost always suffice for a person texture. A texture with that size still contains plenty of details and you will NOT notice the difference in the game, because the game is played from a birds-eye view.
 
2. Lights
A lot of people like to add a lot of lights to vehicles because of realism. There is, however, a risk of lag since lights are updated realtime on every vehicle (when a vehicle moves, the lights move instantly too). Especially radiation (light glow) may cause an FPS drop, because they're always transparent and therefore, the game needs to render more. Especially at night, radiation can cause severe lags. There's been a couple of reports on the forum about this. The same thing generally applies to polygon lights.
 
3. Particles
Each effect, like smoke and fire, consists of particles. Although particles are in fact 2D effects, a wide range of settings and effects are used to make it look 3D. Depending on the quality, rate and other settings, particles can cause severe lag. The forest fire mission in the Los Angeles Mod by Hoppah is a great example of how bad particles may cause performance issues, so be careful when using (new) particles.
 
4. Models
Models aren't that bad on performance, since they have nothing to do with physics/collisions ingame and they are all precached before you start playing.
That said, take into consideration that Emergency 4 is not really optimized to deal with highly detailed models. 20,000 polygons for a vehicle is alot for Emergency 4. 
It's proven that big models or big textures take longer to load (see below). In case you have weaker hardware, try to load up a high polygon model in the editor and you will notice a slight lag. When you're a modeller, take into consideration that a lot of details on a vehicle (like doorhandles) can be added to the texture too and you will barely notice a difference in the game. A single highly detailed model will not take a hit on any computer system, but do not forget that that model is part of a whole modification. It adds up very very fast if a 20,000 polygon object is placed 20 times ingame. Also, the more single textures a model is assigned to, the longer it takes to load each independent texture.
 
5. Scripts
Timers (for missionscripts) and scripts that are repeated in a loop (like the siren and water supply scripts) may cause a drop in FPS depending on the total frequency they are run. 
 
6. Mod Loading times
In my opinion, it is a wrong thought that the total loading times are only caused by the size of the entire modification.
A mod precashes and loads all playable units (both vehicles and personnel) which are assigned to a unique 'UNIT ID' via the 'Units' folder upon loading a modification.
Therefore, all prototypes and the assigned models of those playable units are precached. The logfile keeps track of this process.
Using less detailed objects will decrease loading times.
 
Note: the game also checks the scripts for icons and certain scripting errors when loading a mod.
 
7. Map Loading times
It may a very long time to load a map sometimes. The reason behind this, is that the game loads all objects that are placed on the map. The logfile keeps track of this process.
Using less detailed objects will decrease loading times.
 
Note: when loading a mission, the game also precaches the missionscript or builds a more efficient version (pscript format) in case the missionscript got changed.
 
Conclusions
It aint hard to draw your conclusions based on what's written above. Emergency 4 is a game that is not optimized for highly detailed stuff. High end computers will probably run all modifications fine, but it's likely the game will CTD after a while. Possibly due to memory leaks and/or the absence of an external graphics card. AMD hardware seems to have more issues than other hardware brands. It's therefore advised to take the tips above into consideration if you want to build a modification that will work fine for most players, especially those regarding textures and lights. A smooth modification will greatly improve the image/reputation of the modification and the team behind it. You cannot simply expect that people should just get better, brand new hardware, while the original game runs fine on eight year old systems. Emergency 4 is not first person shooter, going for as much realism as possible by building highly detailed models/textures is not necessary. With this guide and tips, I hope I have given you some insight regarding performance for this game. In most cases simply common sense and logical reasoning applies to deal with possible performance issues.
 
Recommandations
none yet
 
I may update the guide with new information later. You're free to ask questions or to start a further discussion regarding this topic.
 
 
Hoppah