Search Unity

About to start on an MMO - one "problem" atm.

Discussion in 'Multiplayer' started by Hilm, Sep 15, 2008.

  1. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Ok, well I have recentally been asked to try and develop an MMO over the course of a year; we will be working on it full time.

    To begin with; dont worry it's not just me programming we do have an actual programmer; rather than just me who dabbles in everything.

    Anyways onto my actual question:

    I assume that in terms of saving player data (such as items the player has, where the players position is/ was when they logged out etc) I would want to use some sort of database? I also assume using a MySQL database; using a WWWform and php script being constantally updates is not the way to do it; how should I go about saving player data for an MMO (as it cant be stored on the players computer as we want to try and prevent cheating).

    Thanks
     
  2. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    Load the players stats into the game from the database when they first log in, and don't put them back in the database until they log out?
     
  3. Lka

    Lka

    Joined:
    Aug 6, 2006
    Posts:
    297
    :eek:
    Yes, I'm sure you need a db.
    It all depends on your game design but I don't think you need to save in a db the player position in realtime.
     
  4. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    One thing you could do if you're worried about crashes is a periodic save, say whenever a player enters a new area or every 5 or 10 minutes. I think the WWWForm would be fine, if you're worried about someone intercepting the packets and cheating that way you'd have the same problem if you were using a regular non-encrypted TCP connection to MySQL anyway. So what you could do is encrypt the POST data with some simple algorithm and decode it on the server.
     
  5. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Ok so would it have to be a MySQL database? or is there some easier / better way of doing it?

    Thanks
    AG.
     
  6. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Any method of permanent storage would work, database is one method but anything from flat files to custom data storage mediums are up for grabs. DB2, Oracle, MS-SQL, Sybase, MySQL, Postgres, etc.. are all viable database candidates. Each has their own strengths and weaknesses. Data staging solutions can also improve performance.

    If you look at databases some key considerations might be:

    - How much data am I looking at (some solutions don't work well above certain volumes of information). Consider throughput, processing, and storage.
    - How fast do I need information
    - do I need clustering/HA/CA/DR
    - What platform(s) do/will I support (backend)
    - What backup/restore capabilities do I need (real time or batched)
    - Ease of administration AND/OR availability of Admin skill sets within my area/budget

    Hope this helps,

    Galen
     
  7. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Well, since you only have a year to write a massive multiplayer game and you are not sure if you need a database or how to begin, I suggest you start at the following reading material:

    http://www.borders.com/online/store/TitleDetail?sku=1598633880
    Programming Role Playing Games
    Jim Adams
    Paperback, 900 pages
    Course Technology
    March 31, 2009
    ISBN13: 9781598633887
    ISBN: 1598633880
    BINC: 8889332
    Edition: Illustrated, Revised

    Once you master a simple RPG which on a year schedule will take you about 2 years, so you might as well crunch that up into 6 months of your time. You need the following components:

    RakNet Full Source:
    http://www.jenkinssoftware.com/

    NorthStar Solutions:
    http://www.nstarsolutions.com/index.html
    That is for your processing unless you plan on writing your own entire billing system... in this one year...

    Now, once you have mastered the RPG, conversion to allow for network interface including a billing system, a master player caching server, zone management server, (both require coding from the ground up, preferably in C++), you will need to learn database creation and management along the way.

    This includes the ability to create tables and views, create stored procedures and triggers, ddt elements, etc... mind you, you have to learn and do all of this in 1 year.

    I totally forgot, you need a 3d artist, an animator, a musician, probably a production manager, a financial advisor if you plan on making money, a few other people are on the list also.

    What else.. well you said you had a real programmer, so c++ should already be taken care of.. I could probably give you more hints if this doesn't get you started. Although, a full blown MMO in one year..... BTW do NOT use MySql or anything but Oracle or SqlServer. A real transaction based database server.
     
  8. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    MySQL is a transactional database - just use the InnoDB type.

    For this type of application you dont need Oracle or SQLServer unless you start to scale into the many many thousands of players where you need to run Oracle RAC or similar.

    Anyways - an MMO in a year and not even knowing if you need a database. Good luck!!!
     
  9. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Zumwalt, that's not a very encouraging message. True, the question is very beginner in nature, but then we have no details of the project scope. I guess I didn't preface my response with "only you know if you need a database". MMO has several core backend components, and persistence is almost always required. Now, you may have a full client application (read: game) that is just using the backend for discovery and synchronization of player events with small groups and no expectation of persistent worlds. See non-authoritative servers in the Unity docs.

    Your Game Design Documentation should cover all the critical components needed to make correct implementation decisions. One of your first decisions should be defining what Massive means to you. 10,000 users can be massive, especially for an indie startup, but what you need to focus on for technology and design decisions is your concurrency rates (Users online AND requests per second).

    Synchronization data is rarely stored (but eats bandwidth), with the exception of last known position in a WOW style game. But player preferences , money, equipment, etc... are good to keep track of if you can afford it (disk space is cheap... at certain volumes ;) ). This type of data is updated much slower than sync types of data.

    On a year schedule, my recommendation is spend the first 3 months designing/researching. I've found the "game development essentials" series to be very helpful (note: the book on MMO isn't a coders guide, but a more holistic book on the subject, you may need to supplement).

    Hope this helps,

    Galen
     
  10. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    You know, forums are predisposed to delivering hard reality down the throat of inexperienced people with dreams of making an MMORPG. But, this was a pretty specific question that actually DID presuppose that a database would be needed and that there is a plan of some sort already in place.

    The scope of this project is unknown, but I didn't read anything about an attempt to one-up WOW or some something. As to the snarkiness of some responses, there were quite a few assumptions made. (learn how to program an RPG first? Why do you assume this person hasn't programmed several?)

    There are some very basic MMOs out there that are plenty successful.

    All of that said, the more specific the question the better. What kind of scope are we looking at?
     
  11. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Might I present "Penguin Club" to the court?

    :wink:

    Galen
     
  12. shaun

    shaun

    Joined:
    Mar 23, 2007
    Posts:
    728
    Maybe you mean Club Penguin, the flash-based kids game?
    Acquired by Disney for a a very nice US$700 million, with 700,000 paying subscribers at the time.

    http://www.virtualworldsnews.com/2007/08/disney-acquires.html
     
  13. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    That's the one! :D

    I'd hate to imply that basic can't mean profitable :wink:

    From what I read it was the limited interaction/opportunities for kids to be identified and lured by online predators that makes it very popular with parents. Simplicity makes it popular with kids.

    Galen
     
  14. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Any basic game that is written where the letters "MMO" come into play have as part of there core, a transaction level database system. My recommendation was based simply on the lack of definition to the project. As the original question states, the team is not even sure of how to deal with storage of materials in the game itself, transport at this point isn't part of the equation (aka server/client configuration, etc)

    Offering a link to a simple book on RPG will help their team to look at how character interaction works, how NPC/PC interaction works, how battle systems work, there is a plethora of knowledge in such a book. (I personally own about 3 different types of RPG style books, nothing to be ashamed of or assume that is is amature to have them)

    They need to decide structural layout of their system before they even write a single line of code. Learning the right database from the start is best and since SQL Server has a free edition that can be used for a simple small MMO, it is best to start with a scalable system and get it right to begin with. Oracle also has a personal edition that can also support a simple small MMO.

    When I say small, I am saying they will have under 2000 users. If they can write their login routines, keep track of users, test this with their back end system, then at that point, create a simple level and have each other playing around in the same area interacting. This is a good 'start'. Then they need to work on a LUI style system so that they can deal with NPC interaction and scripted answers for quests. Having a shop keeper is cake, having a system laid out for quests, thats mud.

    This is not really a networking question as it is, it is more of a general question asking general direction on how should they start or what should they know to begin.
     
  15. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    @zumwalt:

    I agree with your reasoning, if not your technology direction :wink: ( but that's another debate). I'd also surmise that the original question was more of a "shoot from the hip" question that suggests "very new to large user experiences". However, I have found that sometimes very experienced people can be thrown for a loop on first contact with a new hyped technology or technical approach. Which is why I recommend falling back to standard approaches that apply regardless of the size, scope, or intended implementation. In this case, the game design process.

    Asking about which database to use, or to use one at all, is really a function of technical implementation once requirements and functional specifications have been established. I once had a development manager ask if a regional GIS system could be implemented on a Microsoft Access backend. Theoretically, yes, practically, no. The point is, in the face of a overwhelming grand vision and volumes of technical and design information, he fell back to his comfort zone. Taken one step at a time, researched thoroughly, and carefully considered in light of the project goals, the viable solutions emerge. During that process you may need expert advise. But at this junction, even expert advise is mis-guided as there is no decision guiding information inherently present in "we're going to make a MMO" at the level of which product choice(s) to make.

    @ Hilm:
    I hope this ongoing discussion is helping in some way with your planning.

    Just my thoughts,

    Galen
     
  16. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    Hilm, would you clarify a bit more? This thread seems bloated from random answers to questions that were not asked.
     
  17. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Im actually handling buisness and project managment (which is why I'm curous as to how it will be done). I'm just also good at 3D and am begginning to learn how to program.

    We have a team made up of 8 people including artists (concept and 3D; most of them do both), 2 programmers now (+ Me), A freelance Audio Guy.

    I also have access to free buisness mentoring and financial advice, legal advice, accounting, an incubation office building and would be getting getting funded to develop the game (if it turns out that we in fact are going to develop it). Fortunatally I also have friends high up At Epic, Lionhead, Eidos and others who are always very kind and offer me advice.

    I was looking for details of how data would be stored eg player locations etc and what form of database would be best to use (or if there were any alternatives to storing it in a database that were viable). I will very much be moving around a lot and overseeing buisness, art and programming aspects of the games development and I really just wanted to know enough to aid in my planning process; which I now do, thanks everyone :D!

    Lol thanks for the vote of confidence! There are people on the team who know a lot more than me in their specific roles, I am really handling the buisness/ managment side and doing as much 3D and programming as I get time for, as stated above I was just curious as to how it would be done to aid in the planning process.

    Also while it is our aim to get it up and running in a year, it will deffinatally not be a "complete MMO" by then. What we are aiming for is to get a basic implementaion of it up and running within a year (full time with 8 people). So this will probarbally just be the bare bones of an MMORPG; I'm not here to make anthing nearly as complex as WOW or anything.
     
  18. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    what genre?
    Fantasy etc
     
  19. Charles Hinshaw

    Charles Hinshaw

    Joined:
    Feb 6, 2008
    Posts:
    1,070
    One thing that I didn't see listed, that would be potentially useful, would be for your team to find someone who is very knowledgeable about infrastructure. It is probably possible to have this person take on the role of an advisor in the beginning just to make sure that you don't design/program yourselves into any corners. The person wouldn't necessarily have to have MMO-specific experience (that would help) but would ideally have worked with large-scale networked applications. This person would be the best qualified member of your team to answer those questions (and also to help come up with what other questions you should be asking!)

    In defense of those who were somewhat dismissive -- I don't think anyone was trying to be mean spirited or hurtful, but it is a hard subject to reply to. An MMO is incredibly expensive with a very high chance of failure. With that as the context, and some pretty basic questions that could easily be interpreted as "I don't even know what questions to ask", it is really easy to see where those responses came from.

    If this were an indie film forum and somebody posted saying "I'm creating a feature length hollywood-style action film. Should I use lights or is there another option to light my set?" the response would probably be the same. The thing is, the failure rate for MMOs is much higher than that of box office action films.
     
  20. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Im afraid I'm under NDA :S. Sorry

    Ok, well I think I'll probarbally e-mail a friend at Eidos and see if he can put me in touch with someone who can offer advice at funcom; hopefully they can act in an advisory capacity. I may also try and recruit another programmer who has greater experience in MMO development. Thanks for the advice!

    Yeah I agree that I do come across as a complete begginner; and I am in regards to how an MMO would work. I was purley asking for advice as to aid in my planning rather than implementing it all myself. I expected dismissive comments; however I also find them neither useful or particularly relevant.

    I am of the firm belief that anything is possible if you are determined enough and I get exremely frustrated at people that try and diminish peoples determination by dismissing them. Everyone will have had to learn (or decide) how the various aspects of an MMO work before actually making one themselves and presumabaly would all have been in the position I am now of trying to find that information.

    Put simply everyone has to learn to crawl before they can walk, and just because I'm still getting the basics down of how an MMO is developed, does not mean that I cant learn and eventually aid in development of one myself.
     
  21. Charles Hinshaw

    Charles Hinshaw

    Joined:
    Feb 6, 2008
    Posts:
    1,070
    In the beginning, an advisor is probably exactly what you need.

    As for the rest of your post -- I think that is a really good view to have. If everybody stopped the moment that they heard "that is impossible" or "you can't do that", there wouldn't be much progress. At the same time, I would encourage you to look at such responses as reminders of the scale of the task in front of you. This won't be easy.
     
  22. raleighr3

    raleighr3

    Joined:
    Jul 9, 2008
    Posts:
    106
    Just my 2 cents but I would go with PostgreSQL over MySQL. I've used both (both professionally and personally) and have found postgres to be superior in terms of speed, stability, scalability and maintenance. And I would choose it over Oracle, DB2 and SQLServer.

    Although, as others have mentioned, for any database you'll want someone who has a lot of experience bith with DBs in general and with the specific product you choose.

    As far as persisting the game data that depends *a lot* of the architecture of your system.
    One way of doing things (and this is the way a lot of commercial MMOs do it) is to have most all of the game data and calculations done on the server side. The client in this scenario is a thin client and really just renders the scene based on what the server tells it. This of course has to be balanced against the amount of data that needs to be transferred over the network. In this instance all the relevant game data is already in the back-end and should be a relatively low cost operation to commit it to the DB. This also has a side benefit of making it more difficult to cheat, since you mentioned that as an important factor. On what triggers and/or how often this commit happens is something that will need some thought and a lot of testing, hopefully your design/implementation will allow for this to be changed relatively easily.

    Anyway I wish you the best of luck with your project! You've chosen the best engine possible with Unity, all the rest is just details :wink:
     
  23. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    This is probably too much debate for you on which database to choose, you will want to get with one of your friends at one of the major gaming companies and consult with them to see what worked for them.

    Definately research different systems for the long run, as you can see by this thread, many people have many different oppinions on which database system is best to use, in the end, it will depend on 2 factors really, the scale of your project and the experience on hand to maintain it.
     
  24. raleighr3

    raleighr3

    Joined:
    Jul 9, 2008
    Posts:
    106
    I agree with Zumwalt, it less important about X versus Y, everyone is going to have a different opinion on that. What is more important is choosing the right tool based on the needs of your project and the skills of those working on it.

    I would add that an MMO is all about the data. At this point in the design phase graphics and artwork really take a back seat to the data. It doesn't matter if you have the prettiest 3D world ever seen by human eyes if you can't doing anything with it.

    Before you choose a tool you'll need to know what kind and how much data you'll be pushing around. How many stats will your players have? How will you handle things like equipment, skills, world editable objects, not to mention a million other things? All these type of things affect your database design. Designs will change of course, but having laid down a basic foundation up front will help immensely down the road.

    Once you have a fairly good idea on the types and amounts of data you'll be using then choosing a DB and associated toolset should be relatively simple.

    Sorry if this sounded like I was lecturing or preaching, I didn't intend it that way. Being a software engineer by trade I've worked on a lot of different projects and on almost all of them having a well thought out dataset design was key to success.
     
  25. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Thanks very much for this advice, I have 7 months of design and learning before we actually start the project (and I will most likley begin pulling things together in those 7 months so really it's more like 1 year full time and 7 months part time to get it made.

    I'm discovering that it does seem to be all about the data with MMO's; I'm confident I can get the graphics and gameplay up to the standard I want without too much greif; hopefully I can learn enough about the MMO aspects in the next 7 months to be able to get the game pulled together without too many tears or 23 hour days.
     
  26. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Best of luck to you and your team, we here will be looking forward to hopefully some screen shots along the way!
     
  27. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Thanks for the support/ encoragment :D!
     
  28. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Right well I've started working on it a bit now (if only just so I get the hang of it so I can help the programmers on the team without being too much of a hinderance later on. So far I've set up a MySQL server locally and can register a new user account adding a record to the userdetails table :).

    Having looked at it I dont think it'll be especially hard switching from one database to another at a later date (and I plan to), so I'll most likley do a bit of trial and error and decide on the best database to use that way.
     
  29. Eshim906

    Eshim906

    Joined:
    Feb 4, 2011
    Posts:
    2
    What I'm wondering, Hilm, is what has become of your project? It has been a little over 2 years and after coming across this thread I am curious as to the conclusion. My buddy worked on a small kids MMO as the lead programmer (silverlight and etc.) and it is doing fairly well.

    http://zoodlezone.com/

    I know this is basically a dead thread but my two cents are, My buddy, John, had never programmed a game in his life. He had been writing programs and such for another company but nothing to do with gaming. Moreover, this company who made the kids game has less than 20 people working for it and financially backed by one guy. My point is that it is very possible to do what you are/were trying to do. Even if it doesn't get off the ground don't scrap the hard work you did do because you may get to revisit it someday.

    So, again... what became of this project?
     
  30. Shaggy

    Shaggy

    Joined:
    Feb 7, 2011
    Posts:
    1
    Yes, a db would be the way to go definitly. I am not entirly sure how to go about it in php though. But the player should be removed and reverted back to the data base and then added back when called upon from the db.