VOX
A little voxel engine
|
Our design is the fruit of a lot of discussions and headaches.
It is based on 4 "control" threads + a thread pool for parallel tasking.
All of the control threads inherit the AThreadWrapper class
This is the main execution thread.
It is not used for any "gameplay" whatsoever it only setups and instanciates other threads to do these tasks
This is the "gameplay" thread it runs synced with the render thread.
During all these tasks this thread will modify the scenes classes for the render thread to use. \ The update threads interacts a lot with the World class that contains all the blocks chunks, entities and the player data.
This is the thread where the magic happens it runs synced with the update thread.
The render threads interacts with the renderAPI to render frames using the scenes classes as input
This is the thread where blocks are updated... duh. It is capped at 20 iterations per second
For every calculations that can be done in parallel
We use std::async.
Wich uses a thread pool internally