BertilBraun / MyClone

MineCraft Clone
https://github.com/BertilBraun/MyClone
MIT License
4 stars 1 forks source link

Updating Chunks / Sections #9

Open BertilBraun opened 6 years ago

BertilBraun commented 6 years ago

Chunks which have to be updated, like chunks with furnaces, get added to a queue.

All of those get updated ~20 times a second?

(Multithreaded?)

BertilBraun commented 6 years ago

Each Section has a queue of blocks which have to get updated.

Blocks with extra features taht have to get Updated are being extra constructed, using a class inhereting from a base block.

Base blcoks have to get Update / Tick functions.

F.e. furneces ticking or tree saplings growing.

On break also all 6 adjecent blocks Update functions get called.

Falling sand and flowing water should be possible.

BertilBraun commented 6 years ago

loading more chunks than are getting rendered to make smooth transitions.

also only delete them after they move more than 3 chunks out of render distance