Sign in to follow this  
Aken H Bosch

[java] Multiplayer from a 1P game

Recommended Posts

Hi all. I've started a single player Java game using Jogl about four days ago, and it is coming along nicely. However, I am beginning to realize that this game would be absolutely awesome if I could make it multiplayer. The problem is, it's not as simple as import java.multiplayer.*; I experimented with Java networking a little more than a year ago, but with no real results. TO WHIT: How do I take an existing single player game and make it multiplayer with an arbitrary number of players? I am willing and ready to make some utility classes and such to set up a framework, and to make a new driver program to set up and test connections, etc., but I really am not inclined to start from scratch and build an engine around the networking code. Is it possible to make a decent multiplayer game where the multiplayer was, tragically, an afterthought? THE GAME: "Azrael" (working title) The game is a 3D Space/Flight shooter in which two (or potentially more) factions dogfight, so far with only fighters. They are armed with railguns (unlimited ammo, fast firing and fast moving) and missiles (limited ammo, homing). I may eventually add other kinds of ship, like warships and/or carriers. The action is pretty fast, so I think UDP might be necessary, rather than TCP. As always, your help is appreciated. --Bosch

Share this post


Link to post
Share on other sites
Quote:
How do I take an existing single player game and make it multiplayer with an arbitrary number of players?


Arbitrary? Next to impossible. 2 - 16 players is generally "easy". Hundreds becomes very hard. Thousands becomes an even harder task. But arbitrary? Eve only has 50,000 concurrent, and they're struggling.

Each of these categories uses different networking model, and different architecture.

Quote:
Is it possible to make a decent multiplayer game where the multiplayer was, tragically, an afterthought?


Depends on how your code is organized. Can you even render two player ships at the same time?

Quote:
The action is pretty fast, so I think UDP might be necessary, rather than TCP


Protocols, like languages, don't have speed. Packets from both are sent over the same wire. UDP gives you fine-grained control over every byte sent, whereas TCP hides all the nitty gritty details. Due to this abstraction, using TCP may expose you to unwanted latency, which could sometimes (but often not) be avoided through use of UDP.


For everything else, I'd suggest you read the networking forum FAQ.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this