Skip to content
Benedikt S. Vogler edited this page Apr 22, 2017 · 3 revisions

The map is stored via chunks.

The coordinate system is:

  • x is left and right
  • y ist back to front
  • z is bottom to top.

Wurfel Engine keeps every loaded chunk in memory. You can set the maximum amount of bytes which the engine can use for storing chunks with the CVar mapMaxMemoryUse. By having several thousand chunks in memory it is possible to calculate actions by blocks or entities very far away. Objects outside the area near the camera keep active. This is different from other game engine, where only the area near the camera is kept alive.

The accessible area is limited. The available space of the map is set via the CVar mapIndexSpaceSize. Half of mapIndexSpaceSize is in each direction for the x and y axis. Chunks with coordinates outside this range may be not accessible or the performance degrades. This has to be further tested. Internally a hash map is used and collisions happen outside.

A RenderChunk is created for a chunk once it is near the camera in a 3x3 radius.

To display a minimal showing the loaded chunks set the CVar showMiniMapChunk to the value 1. RenderChunks are displayed in the color yellow.

Clone this wiki locally