> Date: Tue, 12 May 2009 10:26:36 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: [qi4j-dev] Pattern for modeling Roles, State, Entities
> 
> This is a little late but I wanted to jump in with respect to the
> Flail example. Most of my modeling experience is in relational
> databases so bear with me :)
> 
> interface WeaponType {
>     ManyAssociation<WeaponCharacteristics> characterisics();
>     Property<String> name();
> }
>
> interface Weapon {
>      Association<Player> player();
>      Association<WeaponType> type();
>      ManyAssociation<WeaponCharacteristics> customCharacterisics();
> }

So the weapon always has the default characteristics, and then possibly some 
extra ones? In my mind, I have situation, where Weapon would, for example, 
temporarily lose some of its default characteristics. I am not sure if this 
situation is entirely possible - theoretically maybe, but would it be of any 
use in some actual game? I don't know. One way around this would be to create 
"counter-characteristics" which would somehow counter the effect of some other 
characteristic. But that sounds complicated.
I'm not saying your solution is bad. It is just a little more constrained - it 
does not allow certain situations. Maybe it is good to have some permanent 
things, which we always can be sure of. So I really don't know. :)
 
> interface Player {
>     ManyAssociation<Weapon> weapons();
> }
> 
> interface WeaponCharacteristics {
>     Property<Integer> boom();
>     Property<Integer> pow();
>     Association<WeaponType> weaponType();
>     Property<Boolean> default(); // whether or not this is an allowed
> custom one or a part of the basic weapon model
>     Property<Boolean> active();
> }
> 
> So here the player has a weapon that inherits characteristics from a
> system-wide type but it can also have extra custom characterisitics.
> The admins can change the system-wide characteristics associated with
> the weapon type and can also take away custom characteristics. I don't
> have the implementation idea down yet but this is a common scenario in
> a lot of projects I've worked on. It would be nice if we all can flush
> this out :) Just dropping my two cents in.

Yeah, that really is a common scenario. Once again, because of lack of 
dev-experience of such games, I don't know whether having completely dynamic 
characteristics more inefficient and wasteful than a standard set of default + 
possible custom ones.
About admins changing system-wide characteristics associated with weapon type: 
in fully-dynamic-characteristic systems, this would be harder, I just realized 
that. That would maybe require a different approach - make Weapon a role which 
would own WorldObject, and add the "default" characteristics as properties / 
associations. Maybe. :D It is so hard to think so far yet, since I'm still on 
"WorldObject" state, where that object can vary from rock to dragon.


_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to