Over the years of developing object oriented (OO) software, many software engineers have come the paradigm that, in most cases “It’s just a view”. This is especially well described in Andy Hunt’s classical Pragmatic Programmer (ISBN: 020161622X) and this stuck with me. (Chapter 29: It’s just a view.)
But what I have trouble reconciling this idea with game logic.
I implemented my musing from yesterday. The only change is, that I kept the names InputSystem and GraphicSystem, instead of OisSystem and OgreSystem respectively. The rationale behind this is that it makes more sense to use a name that describes what they do and not what they are.
Interestingly, it suddenly dawned on my how the Law of Demeter works in practice.
Well, I must confess, this is actually the post for two “half” days. With sickness, social obligations and the release of Hart of the Swarm and BioShock Infinite it is really hard to get work done. But that is the bane of the hobby developers.
First I got the Scene / Entity concept implemented. I implemented a TestScene object, that should contain a smallish physic test scene. To exit the engine in full screen mode, I implemented the logic in the TestScene. But I don’t know if it even belongs there.
There are some issues that are nagging me about this design. How do you implement logic that is not bound to one scene and transport (store) the data from one to the other? I think a “cloud” of entities in the engine may make sense, the scene is just a special entity. This allows for special entities to live longer then the scene.