By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,746 Members | 1,924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,746 IT Pros & Developers. It's quick & easy.

MMORPG in Php/MySQL - how to manage objets ? (allocation etc.)

P: n/a
Hi all,

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
that ?

- 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 :)

thanks !
Sep 16 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Message-ID:
<49**********************************@d1g2000hsg.g ooglegroups.comfrom
bu********@gmail.com contained the following:
>- 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
that ?

- 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,
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
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Sep 16 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.