Image for post
Image for post

One of the key design goals of Flecs is to enable reusability. When we talk about reusability, it is often the reusability of code. While that is a big part of it, reusability of data is just as important, especially in games. Data comes in many forms, like models, materials, textures or data for game mechanics.

Most, if not all games have elements of repetition. Whether it is shapes in a Tetris games, units in an RTS game, decorative assets like plants, mailboxes or refrigerators or just about any particle system, repetition is everywhere. …


Image for post
Image for post

It has only been one month since version 2.0 came out, and yet Flecs 2.1 has lots of improvements that makes building games with C and C++ easier than ever! Let’s go over some of the new developments, starting with:

This is not strictly part of the Flecs core, but still worth noting as a lot of progress has been made on several flecs modules, like the new sokol-based renderer, object transforms, window creation and a Lua binding. …


Image for post
Image for post

Edit: a previous version of this post contained a description of a naive sparse set implementation, whereas actual implementations use more optimal solutions. I changed the post to reflect this.

Disclaimer: I am the author of Flecs, a C/C++ Entity Component System. Flecs Discord: https://discord.gg/ZSSyqty

If you are using an ECS (Entity Component System) for the development of a game, chances are that at some point you had to ask yourself whether you wanted to store the state machine in ECS. I have, and I reached the conclusion that it was a bad idea, for more than one reason. …


Image for post
Image for post

Link to the Flecs Discord. Link to the repository.

After having been in development for almost a year, Flecs 2.0, an Entity Component System for C and C++ is finally out! This release is almost a complete revamp of the internal data structures, and comes with many new features that make it easier than ever to build games with an Entity Component System.

Here are the some of the highlights of v2:

Building C and C++ code can sometimes be a chore, especially if a library doesn’t use the same build system as your own project. For this reason Flecs v2 is now packaged in just two files, flecs.c and flecs.h. …


Image for post
Image for post

Disclaimer: I am the author of Flecs, an Entity Component System for C99. Discord: https://discord.gg/ZSSyqty

If you are writing your own ECS framework (or are about to), there is a good chance you are designing your entities as unique integer values. One of the simplest ways of implementing an ECS is to create an array for each component, and to use the entity identifier as index in each of these arrays (often combined with a bitset to test if the entity has the component). …


Image for post
Image for post

Disclaimer: I am the author of Flecs, an Entity Component System for C99. Discord: https://discord.gg/ZSSyqty

When I started writing my first ECS a year ago, I was excited. It seemed to do something unique by offering more flexibility and performance to a developer at the same time. Also, having high-level design primitives that translate well to cache- and vectorization friendly code sounded great.

This has all proven to be true, at least for me. And yet.

First I have to preface this blog with something. There are two ways you can look at ECS. One is that it is a data container, like a vector or a hashmap. The other is that of a design pattern. The line between the two is often blurred as ECS heavily relies on data, and this data needs to be stored somewhere. …


Flecs Discord: https://discord.gg/MRSAZqb

This is the second in a series of posts about the guts of Flecs, an Entity Component System for C and C++. Each post will cover a different part of the design and turn it inside out, so that at the end of each post you will have enough information to implement it yourself.

The blog is intended both for Flecs users as well as people interested in ECS and game design. …


Flecs Discord: https://discord.gg/MRSAZqb

This is the first in a series of posts about the guts of Flecs, an Entity Component System for C and C++. Each post will cover a different part of the design and turn it inside out, so that at the end of each post you will have enough information to implement it yourself.

The blog is intended both for Flecs users as well as people interested in ECS and game design. …


Image for post
Image for post
http://eldjazairmag.com/wp-content/uploads/2016/02/

Working with projects that need multiple Git repositories can feel a bit like herding cats. For every breaking API change, chances are multiple repositories need to be updated. If this happens somewhat regularly, mistakes are bound to happen. Even if you are the sole developer of all those repositories, keeping them in a state where somebody else can just clone and build them is a chore.

I have been on the receiving end of this problem multiple times with Flecs, an entity component system for C99, that consists out of a main repository and a handful of “modules”, which live in their separate repositories. …


Image for post
Image for post

In the month and a half that has passed since bake’s initial release in January, an incredible number of things have changed. The latest 2.3 release of bake contained over 200 commits, over one third of the total number of commits in the bake repository! It was the most complex and time consuming release to date which involved multiple people, a huge platform port, an overhaul of the package store, and tons of improvements and new features that will make building C and C++ projects effortless!

Without further ado, let’s take a look at what bake has been up to.

Windows support. This is no doubt the headline feature of bake 2.3. …

Sander Mertens

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store