- Portability to allow testing of console and mobile games in a PC environment, plus the ability to offer games to a broader market.
- Performance to utilize resources economically, allocating them to the game code as much as possible.
- Extensibility to provide simple hooks and interfaces for connecting game code and other custom components without excessive coupling.
After doing some reviewing, pondering, and literally sleeping on it, I think I have a pretty solid idea. Here I will attempt to describe it and how I arrived at it.
First, the top priority is portability, which implies to me that we must follow the old object-oriented design principle of separating the parts that vary (those relating to the platforms) from the parts that stay the same (the core of the engine). The part that varies here also represents a dependency of sorts because it provides the link between the application code and the operating system. So if we step back and look at this from a distance, we see that layers become visible -- the hardware supports the OS supports the platform layer supports the engine core supports the game code. A layered architectural structure emerges on its own, very naturally.
A fortunate side effect of this layered architecture is that it produces a modular structure, which goes far to support the goal of extensibility. If I were to refine this (which, of course, I will), the game engine itself would also be broken into layers, from lower-level interfaces with third-party libraries, all the way to up to higher-level services such as artificial intelligence support and custom UI components. I will document these things in greater detail as the project progresses.
The only high priority attribute remaining is performance, which, although not expressly encouraged by the layered approach, it isn't necessarily hindered either. Within the engine's layers, there will be countless decisions to be made that will affect performance. The architectural structures used in various parts of MHFramework (particularly for shared data and object caching) are likely to survive into this engine as well, with an attempt at compromise between high performance and loose coupling. Easier said than done, I know.
TL;DR: A layered architectural structure will directly support at least two of the three driving qualities for my new engine.
No comments:
Post a Comment