Jump to content
  • Advertisement
Sign in to follow this  
Ant59

[web] New 2D MMO Game Problem

This topic is 3833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Thank you, that's really helped. I'll try to get it working like that, but I'll write back here if I'm stuck again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!