#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0

    Question 2D MMO Game Data Problem


    I'm trying to make a MMO game using flash, but I'm having some trouble. My problem is this: I want to start the rounds with no land, just a map of sea. My idea is that players can create land theirselves. The problem with this being is that I don't know how to store this land data. If I use a database, it will require a huge table and take forever to load. If I use an XML file, then only one player can write data to it at a time. I'm really stuck. If you can help, please reply.

    Thanks in advance!
  2. #2
  3. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    One word: database

    Who said that every user needs to load the entire world at once? Most mmo's only load a part of the world at any given time. Consider your game a chessboard and the players is a figure sitting somewhere in the middle. If the player can see one tile away you need to only need to load the tile he's standing on and the 8 surrounding tiles. If he moves one tile up the bottom 3 tiles are no longer necessary and can be unloaded in exchange for the new 3 upper tiles.

    If you worry that tables get to large to be accessed fast enough then you have several options. Replicating the tables (or the whole database more likely) and split up the players in groups where every group gets it's own version of the table (or database). You'll have to ensure that the individual copies are synchronized of course. Or you can split the tables up. Lets say you want a world with 64x64 chessboard tiles but that table would be to big and slow. You could divide the world up into continents of 8x8 and give each continent it's own table provided they don't interact much.
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!

IMN logo majestic logo threadwatch logo seochat tools logo