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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bull.titan@gmail.com

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

    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 !
  • Geoff Berrow

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

    Message-ID:
    <49fc437a-1603-4165-b822-f81dd2d9456b@d1 g2000hsg.google groups.comfrom
    bull.titan@gmai l.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_item s) 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 011000100110110 0010000000110
    001101101011011 001000110111101 100111001011
    100110001101101 111001011100111 010101101011
    http://slipperyhill.co.uk - http://4theweb.co.uk

    Comment

    Working...