Jump to content
  • Advertisement
Sign in to follow this  
wilq

20,000 Users Web based MMOG

This topic is 3850 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 am designing a big Web application - Massive Multiplayer Online Game for around 20.000 players, and I got a few designers question. I'm not need any source code, or solutions, just a few words of optimalization ideas. Here are mine actual problems: 1. I would like to store information about Players Items. Every player could have around 100 items, so the question is: Is this wise to make one table for items of structure like this: ItemID, OwnerID, Parameters (few - 5 or 6). And to make ItemID an Primary Key. Is there any better sollution? Does 100*20,000 = 2,000,000 records in table is not too much for database (MySQL) ?? How much time does it takes normally to search all table for items from OwnerID? What do you propose to make it working fast? 2. This question is related to 1. one. Some time ago I thinking about a solution for this problem to make table for every user that i register in system. But I never saw that type of solution in working Application so my question is - Why ? Why noone do that? Is this worse than storing everything in one table? I need to store items for every user, but I dont need to have them all in one table. 3. This will be last question for this problem. I would like to know if in mine case working with files (for storing Items) would be better that using database? Thanks for any help!

Share this post


Link to post
Share on other sites
Advertisement
20,000 players in total, as in not concurrent and not real time should be no problem.

1. Primary key would be more like (owner, slot) and then you'd have item and eventual modifiers, such as added enchantments. 2,000,000 rows isn't a very large amount. What you can run into is stuff like table locking causing stalls if your db engine does that instead of row level locking and you have a lot of frequent updates.

2. Because it's a bad idea. Professional databases will support partitioning for when tables grow way too big. Yeah I know I'm kind of calling MySQL a non-professional product here but it's coming in 5.1 and to be honest 5.0 is starting to feel dated compared to some other products.

3. A database is usually ACID, which means it's safe. Doing the same with flat files is pretty hard and you'll usually just end up with something like a real database anyways. You have to understand what really makes a database slow in order to beat them performance wise. Generally speaking you have a database cache in front of the database and use the database for secure storage if you have a real time game. That way you get less stalls but pretty reliable storage.

Share this post


Link to post
Share on other sites
OH thats what I call fast and adequate answer! :) Thank you very much for your opinion :D

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!