summaryrefslogtreecommitdiff
path: root/src/world.c
Commit message (Collapse)AuthorAgeFilesLines
* Update chunk rendering, improve chunk loadingAaditya Dhruv2 days1-9/+28
| | | | | | | | | | - 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
* Add camera handling and movementAaditya Dhruv4 days1-2/+3
| | | | | | | | Camera related movements have been moved to camera.c - it tracks the matrices as well so we don't have to call it in block_update The player class is empty right now, but the camera will be a child of the player, and the player a child of the engine
* Add World and multi-chunk renderingAaditya Dhruv5 days1-0/+28
- 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