This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Second UML design

To improve on that design I wanted to add the following functionnalities:

And here is what I came up with.

second.gif

Instead of using a map with only strings, I think that using different maps for the different kinds of variables will optimize the queries. I still don't know if I'd rather use an id for the name or an actual string. My feeling is that an int would be faster for query searches and that a mapping between ints and strings would be easy to do in case someone needs the actual name. However I am not sure, so I'm leaving it blank for now.

EntityLocation is now renamed to AltimaEntity. The only difference between an Entity and an AltimaEntity is that the later exists somewhere in the world, it is an instantiation of an Entity. For example, an oak entity exist, but the oak tree that a player can interact with (cut, burn, etc.) is an AltimaEntity.

For viewing the world in 2D, a EntityGfx exists for every AltimaEntity. A graphic is not a simple sprite because graphics can be layered to represent an entity. The EntityGfx class doesn't have any pixmaps. It selects the appropriate pixmaps from the graphic database.

The use of arrows in the association between classes indicates that the association is one sided, i.e. EntityGfx knows about the altima entity but the altima entity doesn't know anything about the other.

Previous: Dia/UML Tutorial/Draft - Next: Dia/UML Tutorial/Third design

Lavoie Philippe

Created: Sat Jan 16 18:05:12 EST 1999 - Last modified: Sat Jan 16 18:29:45 EST 1999


2024-10-23 10:58