Technical Topics

Technical Topics/ Performance

 

This is some background on how I managed to keep the framerate high

- The Map is made out of an 56x56 Vertices Terrain with a 3 pass Pixelshader and 3 256x256 pixel textures. A higher count of vertices would have needed much more FPS without splitting up the terrain. Since I wanted to have 1 terrain for 1 level I had to choose that vertic-count.

 

- The whole map has been split up into 144 single sector parts. Only the 9 parts around the player are loaded into the map to save performance. When leaving a sector the parts further away are cleared and the new sectors are loaded from mapfile-data.

 

- The plants on the map make an OnScreen()-check every half second, only if they are visible they do their animation.

 

- The level geometry objects deactivate their collision detection and visibility if they are not seen by the camera.

 

- Enemies are spawned around the player during runtime and removed if getting to far away from the view, resetting their spawn point.

 

- Weather effects only occur in close distance around the camera.

 

- Water is no part of the map, but a dynamic entity fixed at the camera.

 

- The models have textures as small as possible, no texture is bigger that 256 pixels in one direction. Often the size is smaller down to 16x16 pixel textures.

 

- Many functions as the plant’s functions use delays for visibility and other checks. Most functions don’t need a every-frame check, so a few hundred control-functions are scattered over one second.

[Home of Dragonrise] [Startup Controls] [About Dragonrise] [Little Story Background] [Walkthrough] [Further Information] [Enemies] [Technical Topics] [Development]