Re: Advice on Data



BigBadDom wrote:
Grtz,

Thx Grtz,

Huh? Who?


Sorry thought you signed off as Grtz - it should be Thx Rik :)


Hehe, you're welcome.

However there is a further constraint where I would like the
'location_type' and 'coast_type' to be dependant on the 'map_id' and
'location'.

Euhm, you're losing me here...
Perhaps a less abstract description of what you're trying to
accomplish is in order. I cannot for the life of me think how a
location_type could be map dependant. Sand is sand, water is water,
wether it's on map A or map Z.... A location can have a type, and a
location can be on a map. Which map
should not be relevant to the type.


Thats what I am tryiong to confirm - whether my design is good or
bad....

Okay a better - more abstract - way to describe what I am trying to
acheive is...

Well, less abstract... Unless I'm hugely mistaken about a curious
difference in meaning in English & Dutch if the word 'abstract' :-)

I have a number of games, each game has a pre-defined associated map.
Each map is made up of locations
The locations will have a type.

Maps can be anything from actual world maps to space-ship layouts to
random dots on a page.
Each location-type defines these map locations in a certain way.

i.e. on one map the map location types may be Grass, Water and Rock
but on another map they may be described as Bridge, Path and Building
and on another they could be Left Corner, Right Corner and Center
etc..

Maybe that is my design fault. Maybe I should just create a long list
of location-types that can be used with any map.

Thoughts?

Well, when it's about games the starting point of map-specific location
types make more sence. I'd still opt for the totally seperated
location-types though. Even game designers manage to think up 200 or more
types it will still be more effective. Depending on what you want to do
with the data there is the possibility you want to know which types are
relevent to a map, but then I'd just use a relational table of maps &
location-types.

You might however, as 'locations' in games have very different aspects all
together, 'split' those aspects. Different tables for
represantation/patterns (grass, water, dungeon), boundaries (left,
top,right,bottom, or a combination of those), max amount of players,
etc,etc (as you already seem to have done with the 'coast-type' split).
That way, a lot of repetition can be avoided, and still you'll have a very
flexible system.

It will depend on how many games you want to enter and how much they
differ. For starters a single location-type will do.
--
Rik Wasmus


.



Relevant Pages

  • Re: Advice on Data
    ... map dependant. ... Sand is sand, water is water, wether it's on map A or map ... I have a number of games, each game has a pre-defined associated map. ...
    (comp.lang.php)
  • Re: Advice on Data
    ... map dependant. ... Sand is sand, water is water, wether it's on map A or map ... 'Location_type' entity data example... ...
    (comp.lang.php)
  • Re: How to get the string Cartesian Products of 2 list
    ... a pure perl way now rather than dependant on my bash one. ... After your inspiration, i get another solution using map: ...
    (comp.lang.perl.misc)
  • Re: Quick review: Brothers In Arms - Hells Highway
    ... they aren't enough to win the battle on ... than the 1st two games. ... finally felt impelled to manuever my squads into position rather than ... What I keep running into with the map, is that it doesn't offer enough ...
    (comp.sys.ibm.pc.games.action)
  • Re: Damned if you do, damned if you dont
    ... the sequel because it apparently came too soon. ... griping and complaining about the lack of games, ... With your run-of-the-mill shooters, a multiplayer map consists ... Source (SDK) kit which allows them to make custom maps and campaigns. ...
    (alt.games.video.xbox)