Project Structure
Let’s learn about Murder’s Architect system.
In some game engines, the game editor is a standalone, proprietary piece of software. In Murder, we not only have full control over the Architect’s code, but it’s an integral part of the game ecosystem.
Murder game solutions consist of two project deliverables:
- The “game” project, which is shipped to players
- The “editor” project, which includes the “game” and the “Architect” editor.
In this section, we’ll:
- Learn about project architecture
- See how code generation benefits us
The Architecture
For the Murder workflow, you’ll typically use the Architect to build out your game’s entities out of the various components and systems available.
- Art and music assets will be built externally using whichever software your artists and sound designers prefer.
- Once placed into your project’s resources/ folder, your game’s assets will become available to the Architect.
- The Architect makes it easy to build levels and entities out of these assets. This data is stored in .json iles.
- Your game’s components and systems are authored in C#.
- Analyzers and generators powered by .NET run alongside your game code to ensure your programming IDE has an up-to-date view of your available code.
So, with that brief overview, let’s take a brief look at our project structure.
- Bang is the ECS engine for Murder.
- Gum is the dialogue engine for Murder.
- Murder meshes Gum and Bang together. Murder abstracts the code beneath, so you can focus on building your game.
- Murder.Editor doesn’t provide any in-game logic – it provides the Architect that allows you to build your game.
- The HelloMurder project is where you’ll build your game-specific logic.
- The HelloMurder.Editor project extends the Murder Editor. If you’ve got any Architect extensions to add, they’ll go here.
In short, HelloMurder – or whatever you want to rename it to – will be the core executable for your finished game. HelloMurder.Editor attaches to the editor and provides editing capabilities. Generally, you’ll only provide the editor to end-users if you would like them to mod your game.
Code generation
One big feature of Murder is that Bang writes code for you. In other words:
- If you build a new Component, Bang will generate the code needed to allow adding the component to an Entity.
- If you build a new System, Bang will generate the code needed to show it as a dropdown in the Features and World assets.
- If you build a new Asset type, Bang will generate the code needed to add assets of that type in the Architect.
While other game engines might make it difficult to add UI support for these components and systems, Murder keeps it simple. This code generation is handled by the Bang.Analyzers, Bang.Generator, Murder.Analyzers and Murder.Serializer projects. Generally you shouldn’t need to know how these work – just that they do.
Next steps
Next, we’ll assemble the tools we need to get started.