Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
September 16, 2008, 3:17 am
rate this thread
i'd like to start writing an MMORPG in PHP/MySQL (like www.world-of-dungeons.com)
but i wonder something simple :
how to i manage to create and allocate items ? (armour, axes etc..)
i mean, i think : one item = one database entry (in an item table,
with many fields for each item, such as name, desc, name of dungeon
where it drops etc.)
but my question are :
- how do i allocate those items to guys ? (players will "drop" items
in dungeons, basic items or rare etc.. so how do i allocated a
particular item to them ?)
must i have a field in the "player" table (or separate linked table to
players_items) with the ID's of each item he got ? or something like
- how do i store those kind of information in the DB ? in a field with
";" who separate values ? and i sort em with a PHP request ?
thanks for your answer in advance,
and sorry for my bad english, i'm french.
if anyone got a URL about mmorpg concepts in php/mysql, don't hesitate
to give it :)
Re: MMORPG in Php/MySQL - how to manage objets ? (allocation etc.)
email@example.com contained the following:
This is not a PHP question, it is a classic relational database
question. You need to study database normalisation. In this case you
have a many to many relationship. You have items and players. One item
can belong to many players and one player can have many items. the
solution is to use a link table..
You will find that drawing an entity relationship diagram will help
enormously. In fact it is essential, in my view. Bon chance.
Geoff Berrow 0110001001101100010000000110
http://slipperyhill.co.uk - http://4theweb.co.uk