Software architecture
2025/12/27
- Type
- Learning Resource
- Format
- Glossary Article
- Version
- General
- Subject Tags
- Created
- Updated
- 2026/02/16
- 2025/12/27
Just like an architect designs a building by planning the structure and room layout, software architecture is about designing the structure of a program. This notion encompasses:
Software architecture concerns itself as much with the production of code as it does with the performance of code.
It's everything we do to ensure the code we write is easy to update, change, navigate, and builds fast.
It is also everything we do to ensure the code runs fast, has few bugs, and accomplishes its stated goals.
Good software architecture is all about trade-offs. Rather than "good" or "bad" software architecture, it is more productive to talk in terms of "fit for purpose."
Often, different goals of architecture can be incompatible. For example, we usually have to choose between production speed (how fast we can ship new features) and performance (how fast the program runs).
Good software architecture is about finding the right balance between different aspects of a program. Here are some of the most important ones:
When you work with a game engine like Godot, the engine provides you with a wealth of architectural tools. This means that, as a developer, you can focus more on the creative aspects of your game rather than getting bogged down in the technical details, making your life much easier. This is why, generally, people use engines like Godot.
Even in the editor, Godot provides many patterns and tools to help you structure your project. Scenes, scripts, and resources promote composition. Signals are the engine's version of the observer pattern, and autoloads are a version of singletons. Many programming patterns you'll find online often require little extra code when applied to Godot.
So, when users of an engine like Godot talk about software architecture, they're usually referring to the high-level structure of their game. They're talking about how they organize their scenes, scripts, and other assets to make their game efficient to iterate on.
It does not mean that software architecture is simple: it takes experience to keep code manageable as a program scales and increases in complexity.
However, it's important to note that while many architectures and programming patterns you can learn about online have a place and use, they may have limited value when applied on top of a large game engine like Godot. For instance, implementing a different architecture, like ECS (Entity Component System) or the "clean code architecture," can conflict with the engine and unnecessarily complicate your code.
When you're a beginner, it is very hard to understand the reasons behind specific code structure advice and whether the recommendations apply to your case. Don't hesitate to try things out and experiment! When you see someone talking about a pattern, try it, play with it, and see if it works for you.
Just be careful not to turn patterns into dogmatic gospels. Some people think there are strict rules to follow regarding software architecture and that different patterns and approaches are right or wrong, but this is not how it works. Software engineering is all about being mindful of the problems of a given project and choosing the most appropriate tools and solutions.
You should do your best to stay pragmatic and prioritize the software's goals. It is not possible to nail every aspect, so you'll need to make choices about where to focus your efforts. This is as true for 3-hour game jams as for AAA games that take years to make.
It's better to think of software architecture as an ongoing process rather than a plan you set early and blindly follow afterward. Building good software is a craft, and the needs of projects evolve as you work through them. Structures and patterns that make sense to start with on day 1 may not be the most appropriate anymore on day 100 when the program's design has evolved.
One piece of advice generally holds true: Keeping the software as lean as possible is a major plus. Lean means keeping the code as straightforward as possible. It also means not adding unnecessary features or optimizing pieces of code that you have yet to identify as a problem. In other words, it's trying to write the simplest code that solves your problems.
By keeping the codebase as small as possible, you facilitate a number of the other goals:
Here is Wil Shipley's similar advice in his "Be inflexible" blog post, and here is Jeff Atwood agreeing in "the best code is no code at all".
Simplicity is... Hard! As programmers, we tend to always over-complicate things. How can we do better?
We can have an aversion to rewriting code, as it feels like we're redoing work we've already done. But rewriting is a crucial part of software development. Like artists draw many sketches before painting a masterpiece, we often need to iterate on our code to find the most appropriate solution.
So, you should always consider rewriting code as a serious option. Your first attempt at building a feature is an exploratory process. It's very hard to understand the requirements of any software before building it and getting it tested, so your first draft is generally about figuring out your program's requirements and constraints.
At this stage, you generally shouldn't embarrass yourself with considerations other than making things work. Write the code as if you were going to delete it, as an artist may throw away a bunch of sketches.
It can also help to write the new code in an isolated prototype so you don't have to deal with the rest of your codebase and have it slow you down.
Once your code works, start rewriting. During this phase, you should simplify as much as possible. Try to remove options you put in, reduce potential arguments, reduce potential states. Your goal in this second phase is to:
if statements as possible.Then, integrate the feature you wrote in isolation from the rest of the software.
Don't stop here. Step-by-step tutorials are fun but they only take you so far.
Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…