Game Architecture | Tom Davies. In all the games I have made I have never been that happy with the architecture. Using PureMVC and more recently Robotlegs on a more or less daily basis has shown me the benefits of a well designed common framework. The down side of MVC which both are based on is that its not suitable for game development it’s ideal for the into screens and menus and perhaps even the UI but its not designed for problems found in game development. So what do you do? Well if you like me then you will probably come up with something like this. OK details may vary but it should be familiar to most people who have built games.
So we have a nice inheritance tree and its all looking pretty straight forward. But then may be you decide actually what your game needs is moveable platforms. So what’s the issue? Let me put another way would it be better if you could pick and choose the attributes you want for each item in your game. So this is the ideal how can we do this in practice. Read more: Evlove your Heirarchy. Tom Davies | Freelance flash and flex developer. PushButton Engine 2.0. Entity Systems | Tom Davies. “Favour composition over inheritance” If you haven’t already read my previous post on the problems of traditional game architecture and why entity systems are needed. I’m going to cover the basics of an entity system before we look at 3 different implantations and the pro’s and con’s of each. What is an entity? An entity (sometimes called game object) represents something in the game. For every tree,tank or ninja we have an entity. This is the basics of all Entity systems one of key feature is the ability to create entities and change there components at run time.
Spotter guide. There are 3 main ways to implement an entity system I have seen and I’m going to quickly out line them all and take a critical look at the pro’s and con’s. “Common” Most common implantation you are going to come across. How it works All components have a common interface normal with a function update(). Pros Simple and fast. Cons Scalability and flexibility (how easy it is to make changes). “Almost” “True” Conclusion. Src/strategy/controller/commands/bootstraps at master from Stray/robotlegs-demo-StrategyGame - GitHub. Crocus Modeller - robust UML tool for AS3 & Flex developers.