How To: Create MMO
How To: Create MMO
I have been working on a game for some months now and have reached a step I have no idea how to handle. I want to put my game online as an MMO for me and some friends to test out but I have no idea how to accomplish this. I have no idea how to host a game and accept multiple users while a game is always running. Any beginner help would be appreciated.
-
Lonesome Ducky
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Not to sound rude at all, but if you have no idea how to do this, you must not have a lot of experience. And MMO's and inexperience never mix well. If you're hard pressed to do this, I remember a library called irrNet floating around somewhere, perhaps you could try making a simple multiplayer example so you can learn.
MMO is not hard if you're willing to spend the time and learn what to do in small increments. I've been using RakNet and am quite happy with it.
You're going to get overwhelmed if you try and plug it straight into your game though. You should start with some simple text-only examples, and try to write a server + 1 client that talk to each other. The next step is to write one where multiple clients can connect, and each one has say an X and Y coord. The server broadcasts the X Y coord to all clients, and the clients can send in changes to X and Y and the other clients can see them.
Itegrating with your game should be the last step after you feel like you can write networking code in your sleep. If you have a lot of trouble getting the text-only stuff to work then you know you're in too deep.
You're going to get overwhelmed if you try and plug it straight into your game though. You should start with some simple text-only examples, and try to write a server + 1 client that talk to each other. The next step is to write one where multiple clients can connect, and each one has say an X and Y coord. The server broadcasts the X Y coord to all clients, and the clients can send in changes to X and Y and the other clients can see them.
Itegrating with your game should be the last step after you feel like you can write networking code in your sleep. If you have a lot of trouble getting the text-only stuff to work then you know you're in too deep.
-
Lonesome Ducky
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
The problem with programming an MMO is not so much the difficulty, as it is false hopes and unpreparedness. Like every other programming board, we've had many announcements of "the next big MMO" and have yet to see one truely complete. MMO's require amounts of dedication that are very difficult for a small team to have. This article points out many of the problems with making an MMO. Personally, I'd say a simple multiplayer component is definitely the way to go, especially if you haven't done something like this before.
You should do a multiplayer game before you even think about the massive. Network is hard enough already, the "massive" adds a whole new level of difficulty.
But it sounded like you are mostly interested in how hosting is handled. For a start (while learning and for testing) just host your game on your own computer. First simple network tests can be done on your own system - just start your server parallel to your client application and connect to 127.0.0.1 (aka localhost). As next step you can let friends connect. With services like dyndns you can even get a permanent address for that, so they can always connect to the same address as long as your computer runs (or get a second computer). Once you are more advanced you usually pay a provider to do the hosting for you (which means they put a PC in a room which is connected to the net and you can log-in to that with tools like ssh). Note that you need a real server - not just cheap website-hosting as you must be allowed to run your own binaries. The least expensive (around 20$ month) are v-hosts, where you share the computer with others (that will work for simple online-games, but no chance for anything massive). Exclusive servers just for yourself are more expensive (~50-100$, but depends on lots of factors). Big MMO's will use a lot of those, but certainly such stuff can grow over time.
But it sounded like you are mostly interested in how hosting is handled. For a start (while learning and for testing) just host your game on your own computer. First simple network tests can be done on your own system - just start your server parallel to your client application and connect to 127.0.0.1 (aka localhost). As next step you can let friends connect. With services like dyndns you can even get a permanent address for that, so they can always connect to the same address as long as your computer runs (or get a second computer). Once you are more advanced you usually pay a provider to do the hosting for you (which means they put a PC in a room which is connected to the net and you can log-in to that with tools like ssh). Note that you need a real server - not just cheap website-hosting as you must be allowed to run your own binaries. The least expensive (around 20$ month) are v-hosts, where you share the computer with others (that will work for simple online-games, but no chance for anything massive). Exclusive servers just for yourself are more expensive (~50-100$, but depends on lots of factors). Big MMO's will use a lot of those, but certainly such stuff can grow over time.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm