sbuller / divided-posterity

An online multiplayer browser based bonanza.
4 stars 0 forks source link

Combat symmetry #25

Closed sbuller closed 15 years ago

sbuller commented 15 years ago

In beginning to implement team based combat I realized our problems stem from the dichotomy we're forcing on the design. We insist on combat being symmetric, yet utilize it directly from a hero centric point of view. All access to combat MUST be through the combatant so that the data held by the combat can be appropriately translated for the POV requested. Fixing this is where the bulk of effort will be in implementing teams.

sbuller commented 15 years ago

This effort is yielding all sorts of fallout. The change I committed earlier has a bug - the OneToOneField on Hero is incorrect since a Combatant is not necessarily a Hero. The other direction works however. Unfortunately, I'm having difficulties making that change - it's not going to be trivial. Anyways, in investigating the OneToOneField, I have started thinking about Inheritance. It would make a lot of sense for Hero to inherit from Combatant. The database structure would remain more or less the same, but the usage would be different. Things get a little fuzzy with Enemies though. A 'proxy model' might do the trick, but I'm thinking a custom manager and queryset might be necessary to make that work naturally.

frazazel commented 15 years ago

I believe that combat is as symmetrical as it's going to get at this point. Closed.