summaryrefslogtreecommitdiff
path: root/src/chunk.c
Commit message (Collapse)AuthorAgeFilesLines
* Add chunk_unloading on chunk ChangesAaditya Dhruv2 days1-6/+29
| | | | | If we change a chunk, unload all chunks. This removes block GPU data (vbo, ebo, vao). We anyways redraw so we don't lose anything
* Update chunk rendering, improve chunk loadingAaditya Dhruv2 days1-10/+44
| | | | | | | | | | - On world_init, LOAD_CHUNK amount of chunks are preloaded - Chunks are loaded around the player's current chunk, in a square shape. The size of the shape is controlled by CHUNK_DISTANCE - Allow chunks struct to be independent of a position. We load a chunk TO a position in the world chunk grid (x, y). This allows us to "wrap" chunks, so we have an endless world, but we are really just wrapping around
* Move chunk to be 0,0 alignedAaditya Dhruv4 days1-1/+1
|
* Add World and multi-chunk renderingAaditya Dhruv5 days1-7/+23
| | | | | | | - More than 1 chunk can now be rendered with the help of the world struct - Block coords are now in world space, not local space - Engine init code cleaned up for cleaner world/chunk handling
* Add support for chunk and worldAaditya Dhruv5 days1-0/+107
- Chunk is a array of blocks - World is a array of chunks - Basic chunk plains generation based on simple linear functions - Bunch of functions still not implemented, in design phase