The Level Builder
For the Common Wealth has 25 levels (at the moment) and every one of those levels is hand-made in this desktop editor.

It’s built in C# and Avalonia, and as you can see, a complete mess, like all internal tools should be.
It’s called “BIABuilder” because the working title of FTCW was Brothers in Arms, which I still like as a name, but Dire Straits have a monopoly on it.
This tool lets me lay out all graphical content, sound areas, reactive areas (i.e. something happens when you walk into it), NPC locations and routes, mission objectives, hostage locations, player start positions,collision, and hooks into the game.
Sprites
There are two types of sprite, plain graphics, and animated. Plain graphics are for background, anything that doesn’t move, animate or transform. Animated sprites can have spritesheets, move, have transforms applied and can be referenced in-game.
There is no tile system, all graphics are freely positioned. There are 8 levels of sprite. Sub-background (earth, grass), Background (anything above the grass/earth, like a path), Ordered background, which is above background but handles ordering, so anything that needs to appear 2.5D. All these layers are plain graphics.
Above these layers are floor, raised floor, ordering, overlay, and sky. These layers provide floor to sky layers of animated sprites for the illusion of depth. The notable layer here is ordering, which is where players and NPCs are, along with trees, cars etc. Anything that is at the same height as a player, and the player may have to walk behind or in front of it. The ordering layer is the only layer where ordering changes in-game based on the position of the players and NPCs.
Hooks
Hooks are a big part of how BIABuilder connects into the game. They are simply named C functions that take a bunch of parameters. C doesn’t have reflection, so hooks are registered with names in-game and looked up on entering the level. Almost everything that happens in the game that is configured in BIABuilder works using hooks.
Collision
FTCW has 7 types of collision for everything from physical collision (can you walk there), to bullet collsion, NPC patrol collision (i.e. they can run there in an emergency, but won’t casually walk there, so they can run through a shallow stream, but won’t patrol down a stream). There are a few other collision types for obscured vision and things like that, i.e. you can hide behind a bush or a wall, but a bush does allow some vision through.
Collision is designed in BIABuilder as polygons but exported as a 1-bit image, i.e. a pixel collides or it doesn’t, and the 7 layers of collision combine into a coherent map where NPCs can see over a river, shoot over a river, but not walk over it. Or they can shoot through a bush, but not see through it.
Export
BIABuilder’s native format is JSON, but exports a level in plain serialised memory that the game (in C) just read in order.