This article is about a topic that is one of the pillars of writing good code: Error reporting. It is what a programmer does when he or she thinks that there’s something wrong which should not go wrong. And because professional programmers want to know when something goes wrong, it’s incredible important to do error reporting right.
There’s a common problem in software design that doesn’t only exist in game development called code dependencies. In a project, small or big, every developer comes to the point where several modules depend on each other: The GUI renderer depends on the health points and inventory, the inventory depends on the object pool and player state, the rendering engine depends on the object pool, textures, geometry, and much more.
One goal of object-oriented programming is to write modular (thus flexible) source code, and one of the biggest rules is to keep dependencies low. This article will talk about a system that implements a message bus with fire-and-forget behavior, with the main target being eliminating dependencies in the sources.
Welcome to another article in the Game Development Design series. This article covers good habits, techniques and workflows which are important for a general programming behavior and how to approach developing games (or even applications in general) in a way that will improve your progress.
We will talk about some well established techniques in the field of rapid development, which will move your programming focus to implementing features that are really required, and that those implementations are guaranteed to work as best as possible by automatically checking them.