I am currently writing a basic game engine in JavaScript - and I am importing large amounts of data from a third party editor as part of this process. I have separated out the model/view for the game objects (I.e. PlayerModel / PlayerUI).
Where I am stuck is how to bind the model to the view, in terms of appropriate patterns. I currently have a gameobject factory that creates the models - and another factory for the UI - but this seems really inflexible.
Other than a basic factory pattern, is there are pattern better suited for creating and binding model/view objects like this?
Aucun commentaire:
Enregistrer un commentaire