Skip to content

World Parameters

PaulHaeussler edited this page Jun 24, 2020 · 2 revisions

The World uses its own unit of measurement, derived from the size of a single block and its texturesize: 1U = 16px The lowest Resolution without information or FoV-loss will be 1080x1920. Below this, the view will have to be zoomed in order not to lose information(render the blocks with less than 16x16px). The maximum (farthest) zoomlevel will therefore show 1080x1920 / 16px = 67.5x120U of blocks. A single chunk will measure 32x32U.

From the camera-position(x, y) can a Rectangle be constructed with screenheight and width. Chunks will be kept in two Arrays for Rows and Columns. Active chunks are kept in a Collection, and the highest and lowest values for both Row and Column are kept. On camera movement new chunks can be easily loaded by accessing the row or column array with currentMaxColumn++ or currentMinColumn-- and Rows respectively.

There will be different Ranges in place at which certain events will trigger.

  • Zone I - Chunks that intersect with the current camera window and have to be drawn
  • Zone II - Chunks that are in close proximity and will have to be updated
  • Zone III - Chunks that are further away and will be put to sleep
  • Zone IV - Chunks that are very far away will be removed from memory and saved to disk
Clone this wiki locally