Game engines: Eating your Dog’s food

What are game engines ? Any aspiring game developer setting out to make their own may think they know, but are bound to realize how fuzzy of a concept it really is. The game engine would be the part of the game that’s not the game, the technical foundation on which it’s based. That intuitive definition is however insufficient, as then the entire stack, down to the graphics driver and kernel scheduler would then be part of the engine. In most settings we assume game engines to hold broad responsibilities with regards to rendering the graphics and audio, gathering input, simulating the gameplay systems and handling asset management. Added to this is often a networking play layer, frameworks for user interfaces, serialization etc.

To come out and say you’re making a game engine is quite a bold thing, as you’re announcing to your peers you plan on solving at least most of those problems in a somewhat comprehensive way. If you are only concerned with graphics, one would be advised to speak of “graphics engine”, “physics engine” and such. Sadly we also lack a term for the stuff in-between, thus anything that covers at least two areas tend to be called a game engine nonetheless.

Continue reading “Game engines: Eating your Dog’s food”

Chunk Stories’s new Graphics API (Part 1)

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.

The xyz.chunkstories.rendering package has been simply deleted and redesigned from scratch into the brand new 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)”

An entity system that doesn’t suck

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”