flora icon indicating copy to clipboard operation
flora copied to clipboard

Model separation is lacking

Open eevee opened this issue 12 years ago • 0 comments
trafficstars

Currently the data is all stored in YAML, which is loaded into dicts half-assedly wrapped by "model" classes, except when it's not.

Yes, lovely.

There should be three distinct layers here:

  • code for loading game data (and, once there's an editor, mutating and saving it)
  • code for representing the game data in-process
  • cocos

Perhaps the trickiest (ickiest?) part is that, if entities were to become distinct model objects, they'd have to be kept in sync with cocos nodes—and cocos is much better equipped to know where objects are located. Suppose I could write custom actions for e.g. walking that updated both the cocos position and the model position, or rig the entity to update the model automatically.

eevee avatar Nov 25 '12 08:11 eevee