ORPG networking

So I’m making a game called Fyrestone, and we’ve just finished our dynamic tile-loader. Now that we’ve got splatting, water, and the rest of the stuff in, we’re moving onto our next milestone: networking.

(click here for a screenshot of some rendered terrain. we stole some textures (and the skybox entirely), but eventually we’ll be changing those out  :D)

I want my server to be able to run on either an actual server (for our actual release) or a spare home computer (for testing)

I need it to be scalable so it can grow as the game grows. I’d prefer it be as easy as just add another server, but I’m sure it won’t be quite that easy.

I need it to access an Oracle or MySQL database and communicate with the client. My hypothesis is that the conversation between server-client could go something like this.

“my character name is Tyler” “you have 3 health and 5 mana” “tree.obj @ 100,200,100” etc.

So basically the server needs to be persistent with all of the clients and tell them what’s in their inventory, how much health and mana they have, the names, health, and mana of other players around them (and their model), and all of the game-objects around them (model and location).

Would my demands be better met with JGN or Project Darkstar? Which is easier to integrate, and where should I get started? The Tests in the JME source package really helped me get started, is there something like that for networking?



Well you got a pretty intense and good discussion on this topic in the previous thread you created (Actually the best thread for comparing the 2 networking libraries). As noted there are advantages to both… and if you want easy scalability, I believe Darkstar was offered as the better choice…

However perhaps you had more specific questions / problems in mind?

Lol I forgot about that thread entirely. My specific questions were what is your personal opinion on what I should use and are there any examples available to me?

Mindgamer said:
and if you want easy scalability, I believe Darkstar was offered as the better choice...

Not sure I agree, but everyone has a right to their own opinion. ;)

Trussell, I would say spend a couple hours playing around with both Darkstar and JGN and I think that can sell you better than any feature list or marketing hype can. ;)  I'm obviously biased towards JGN so I'll let the functionality of the API speak for itself rather than try to convince you with.
darkfrog said:

Mindgamer said:
and if you want easy scalability, I believe Darkstar was offered as the better choice...

Not sure I agree, but everyone has a right to their own opinion. ;)

Well I use JGN myself.. or at least am in the process of including in my project... so I will not need any convincing. HOWEVER... this is too sweet to resist:

jeffpk said:
As Darkstar's dad I have to say the opposite... it will REMOVE a great deal of the complexity currently in your code, while giving
you a unified task model for your events and eventually scalability and fail-over (when we've really finished multi-node.)

BUT if you've already gone down a path you may not want to switch gears.

Just a warning... building a server that will handle a dozen players is easy.
Scaling that to thousands in a reliable way is much much harder.

darkfrog said:

I know I'll live to regret saying this, but I have to agree with Jeff.  If you decide to use Darkstar, this is one of its primary advantages.

darkfrog said:

I would recommend taking a look at both JGN and Darkstar. Both have their strengths and weaknesses. If you want simplicity I think you'll find JGN a lot faster to get going, but Darkstar has a lot of really cool features when it comes to MMO development.

But the entire thread is there for re-reading and analyses  :D

Well, I guess I'll start building a model based on Darkstar and my other developers can try with JGN. Whichever works first will be our model, and if we finish the Darkstar model shortly after, we'll be able to switch gears.

Now, the most important part of this entire thing: where can I find examples for using Darkstar within JME? I went to the website (www.projectdarkstar.com, I think?) and I didn't see any helpful tutorials on using this with JME. I just want to see some tests, like TestIsland for TerrainSplatting, to get me started. Can you point me in the right direction?

As far as I can see there aren't nearly enough people with experience of taking games through to an advanced stage with both systems, to give a really good comparison. Clearly both are very impressive pieces of work. Best to read up on and play with both like you say.

I think with network handling it's more a case of using it at the same time as jME than in jME, so any tutorial should be fine.

It’s an unfortunate thing that tact can often come off as an endorsement.  :roll:

I know some people in jME are using Darkstar for their projects, perhaps they can point you to something.  For JGN I would recommend taking a look at the FlagRush tutorial I converted to providing networking (meant to show how little you have to change in your existing game to add networking):


JGN provides a nice system for graphical synchronization that allows a 3D (also 2D, Physics, or anything else) engine to connect with JGN to provide real-time synchronization of your scenegraph.  Look at the example code and I would say the biggest complexity of the synchronization is the amount of “magic” that seems to happen with such a small amount of networking specific code.

You can also see a really simple Swing-based synchronization example that should show a very simple example of how synchronization works:


Feel free to just browse through SVN and you’ll find tons of other examples and drop a message on the JGN forums if you have any other questions.

The first link, which I feel is probably the most valuable, is broken.

That's odd…works fine for me.  :-o

Anyone else want to validate that link for us?

works for me…

Weird. Wasn't working for me earlier. Works now, though!

Thanks MrCoder