Architecture wrangling...

Published April 26, 2007
Advertisement
Have gotten a fair amount of work in recently..
We had ANZAC day here yesterday, so with a day off contracting it gave me another opportunity to work on the game.
Spent the first part of it tweaking the software architecture. This is really a bad habit of mine that I'm trying to avoid!! I must confess, I'm an architecture junkie.. could happily tweak the design for days and still not be satisfied :P

Fortunately I was able to restrict my latest relapse to half a day and I think the new design is better for it.

The original design was based on the popular Model-View-Controller architecture pattern.

I think this is a good choice for games as it forces the separation between the "presentation" - the rendering engine that displays graphics to the screen and the "model" - the part of the engine that handles the rules of the game and other calculations.

Ironically (maybe) through the Wikipedia link to Model-View-Controller, I discovered this excellent link on GUI architectures and ended up modifying my design slightly to be more in line with the Model-View-Presenter pattern with a passive view. (these terms are described verbosely on the website above)

Due to an implementation constraint caused by driving the game via Python (another story altogether), I've already been forced to implement a "form server" as a stand-alone COM server, which is driven by a Python extension module which is, in turn called by the main module running in the Python interpreter.

The new design introduces the concept of a "Presenter" module which is (amongst other things) responsible for organising the layout modes of the form server. Up until now this handling was implemented in the form server itself, but now it has been reduced to a dumb slave that must bend to the whim of the Presenter!

The presenter will be written as a pure Python module, with the form server a python extension module written in Delphi that calls COM, the advantage of this is, if the game is ported to another platform, only the "view" (form server) of the M-V-P architecture need be rewritten and it is now "dumb", so should take minimal work. Well at least in theory :P
Previous Entry Easter cramming
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement