[web] New 2D MMO Game 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!
You need to work out what sort of central server the flash users will be working from. Flash doesn't have many options for this sort of thing afaik.
Quote:Original post by Ant59
If I use a database, it will require a huge table and take forever to load.
Are you sure? How much data are we talking about? What are your map's dimensions? Does every player see all the map, all the time, or can you just load a small portion of the map?
What you think is huge may be tiny for a professional DBA.
Well, I was going to use a tile-based system. My map is 10000x5000, so if I use 10x10 tiles, it'll end up being 500000 individual rows in the database.
Quote:
Does every player see all the map
This is key.. You need to have a local view for the player of the grid and stream it to the player in a proactive manner as he moves his view around the world. You should be able to transfer a huge amount of tiles in a very small size. As for the database size, you can always not write the water tiles to the database. I would personally use flat files here since it's so simple to seek in them and read and write from them (seek to file position (y * width + x) * tile data size). The problem you might have is transactional safety of course.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement