Reply to Re: Advice on Data

Your name:

Reply:


Posted by Rik on 12/28/06 15:37

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация