Chunk Stories’s original graphics API was essentially slowly carved out of a set of helper functions and OpenGL OOP wrappers. While it did make OpenGL code more bearable to read, it operated in a very explicit way, expecting more or less direct translation to actual GL calls, making things like implementing instancing tricky and not transparent at all to the end user, not to mention it was still very complex for what it did.
This will all changes in Chunk Stories Alpha 1.1.
xyz.chunkstories.rendering package has been simply deleted and redesigned from scratch into the brand new
xyz.chunkstories.graphics package. This new API has been designed with the goal of allowing users to express what they want to get on the screen in simple terms, and to include nothing irrelevant as the previous one did. So, how does it work ?
Continue reading “Chunk Stories’s new Graphics API (Part 1)”
One of the more complicated things that I’m slowly getting better at with Chunk Stories, is how to arrange code for complicated systems into a pattern that is both concise, clear to understand and easy to maintain. By far the most complicated type of objects in Chunk Stories are the Entities. Entities are any complex object that exists in the world and isn’t part of the voxel grid/terrain. Entities have to be serialized, both on disk and over the network, they have to be rendered using very specific rules for each of them, but also rendered fast, they can represent anything from an item on the ground, a mob roaming the world, a vehicle you can drive or a player model with many abilities ( mining, using items etc ) and properties ( rotation, food level etc ).
Continue reading “An entity system that doesn’t suck”