0

Cardinal Engine: Editor & Toolset

If you’d like to read a full blog post on the Cardinal Engine architecture (and a more in-depth features list), you can read about that here.

This is the editor and toolset of the Cardinal Engine. Cardinal is the engine that I’m currently building in my spare time for Pepper Wars 1.0. It’s built ontop of SFML, the C++ 2D framework that does a lot of low-level multiplatform work (such as rendering, audio) that can otherwise be repetitive and grating on development time.

The tools and editor were actually built inside of the games application, as I wanted the game to have first-class mod support using both our in-game-editor-tools for both our designers and end users.

The editor consists of a Tilesheet ImporterTilemap EditorActor/Prefab Editor, Level/Scenario Designer and Animation Editor.

The tools consist of an Event LogDebug LogActor Hierarchy Browser and Process Editor.

I’m currently working on more features for the editor, such as: a lua command lineAI Behavior Tree Planner and a Network Packet Log.

Here are some of the tools in action: (if you’re having trouble viewing a gif, just click on it and it will take you to the full-screen version)

Tilesheet Importer

The user can import a tilesheet to the importer, then define the tile size and spacing between the tiles. This is later used by the tile editor.

Tilemap Editor

The tilemap editor allows the user to use the tilesheets they’ve imported to build a tilemap. Tilemaps have multiple layers, individual tiles can be selected and edited at the actor level (this means the game designer can set behaviors of individual tiles). Tilemaps can then be imported into scenes, where they can be reused for individual scenarios.

Actor Prefab Editor

The actor prefab editor allows the user to define actors, their behavior and components in a standalone environment. These are later reused by importing them into scenarios and inside of Lua Scripts. It also allows us to link actors to scenarios, so if we need to change an animation we just need to change it in one place and not in every scene/scenario that the actor is in.

Level/Scenario Designer

This editor allows us to import our tilemap, our actors and edit our actors inside the hierarchy in order to put our scenarios/scenes together. Scenarios can later be loaded by a Lua script in a single line of code.

Animation Editor

This tool allows us to import a sprite, either manually or automatically split the sprite up into frames and define our animation options (such as the time between frames). This is quite a bare-bones tool at the moment, but I will later implement more complex options such as changing the transform of the actor in each frame or triggering an event/Lua script when a frame is run.

Event Log

A simple debug tool that keeps a track of all the events fired in the scene (and allows filtering of them, as well). As you can see here, when we load our scenario – the ‘CreateActorEvent’ triggers four times for the actors that have loaded from the scenario file.

Actor Hierarchy Browser & Filter

During the runtime of the game, an actor might be behaving in a strange way or a script can’t find a certain actor component it required. The actor hiearchy browser allows the user to keep a track of every actor in the scene and filter them by the components that they both do and do not have. After an actor has been selected, you can introspect that actors components data, giving the user a better idea of what might be going wrong internally.

Process Editor

A lot of our core ‘systems’, such as the animation system, all runs in the games background as a ‘process’. Sometimes a process might be continued from one scene to another, or might have been accidentally paused. Either way you can view all active processes inside the game in this window and complete/fail/pause and unpause them. This is also good for debugging some areas of code, as you can pause a process that might be interfering.


Engine/Framework & Language

SFML & C++

Project Goal(s)

Learning C++, engine, editor and tools development.

Development Time

4 months, 2-3 days a week.