Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 What do I need in order to make a Java multiplayer online game?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
FileFantasy




PostPosted: Tue May 13, 2008 11:15 pm   Post subject: What do I need in order to make a Java multiplayer online game?

No, I do not mean something like Slime Volleyball, where 2 people play on 1 computer.
I mean games like AdventureQuest or Runescape.

First of all, is it even possible with Java? What libraries should I be looking at? Any tutorials on connecting people to a server?

And in terms of hosting, is it possible to store text files on my site, and upload the code to my site's main page, and have the text files dynamically update as people play?

Or would I need a server and something like PHP and MySQL? (I have no idea what these are, really.)

I basically need some guidance in terms of what hardwares I need, and what software knowledge I need to learn.

Thanks in advance.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Wed May 14, 2008 12:42 am   Post subject: RE:What do I need in order to make a Java multiplayer online game?

It is deftaly posible to have java online games and the api for it comes with java. You deftaly should not have php involded in the mix unless there is somthing very hacky going on.

As for MySQL, hosting and hardware that all depends on what you are making and how you implment it.

Some info on networking in java: http://java.sun.com/docs/books/tutorial/networking/

You deftaly want to look in to the sockets part.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
zylum




PostPosted: Wed May 14, 2008 12:47 am   Post subject: RE:What do I need in order to make a Java multiplayer online game?

I always wanted to know this as well. I know how to write all the code but I could never figure out how to get the server running. Like I have the server coded up but how do I have it running all the time? The best I could do is have it running on my laptop and have clients connect to it like that. Do you need a special server or something? I doubt it's possible with something like dreamhost Confused
Dan




PostPosted: Wed May 14, 2008 12:52 am   Post subject: RE:What do I need in order to make a Java multiplayer online game?

Well if you want to do things at a business level you should buy or rent a decieated server and run the application and database on it 24/7 in a data center . Some what like how our irc server works.

For home users the best option is to set up a pc that is allways online and turned on. To make it better you can add in a UPS so power outages will not take it down.

Servers are just noraml computers (some times with the hardware tweaked for what they are doing and no output devices) and it is the software that defines them as servers.

For example compsci.ca and realted sites use corenetworks.net witch offeres deciated servers in a data center.


Edit: There are also VPS (virutal private servers) hosting companys. A VPS is basicly a virutal deaciated server where it is shared with other users in reality but from your point of view it works and atacks like you have full control over the server. This option is noramly cheaper then deciated hosting but is more limited resoruces wise.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
r691175002




PostPosted: Wed May 14, 2008 1:31 am   Post subject: Re: What do I need in order to make a Java multiplayer online game?

Be aware that even the simplest of multiplayer games covers many extremely complex topics.
You have to deal with latency, error correction, hacking, scalability, almost certainly threading and non blocking IO issues... The list goes on and on, and its all on top of an already complex game.

As with many of the more complicated goals, it is extremely easy to slip and write something that appears to work, but has critical flaws that will be nearly impossible to track down.

The basic premise is that you write both a client and a server program. The server maintains a connection to a database (MySQL or PostgreSQL via JDBC would be my suggestion) and listens for connecting clients. As clients connect, the server coordinates data transfer between them, ensuring that everything is ok, cleaning up after disconnected clients and keeping things coordinated in general.

It is almost always far more complicated than it sounds though. As as general rule, I always assume that the average player will receive at least 200ms of lag. Simply getting two people to be able to move avatars around in a reasonably coordinated manner takes a fair bit of math and visual trickery.

For the server I would recommend building on Apache MINA or Darkstar. Working with NIO itself is unnecessary. There are lots of books written on the subject as well.

The biggest thing to keep in mind when writing anything networked, is that just because it works on your computer doesn't mean it works in real life. I believe MINA has a filter that throws random noise into the packets but for anything real time the true challenge is covering latency and all the synchronization problems that go with it.

Requests to make MMORPGs generally recieve a fair deal of flack on other forums, and for good reason. A MMORPG encompasses almost the entire gamut of computer programming skills, and decades of man hours on top of it. Be comfortable with database administration, SQL, JDBC, threading/mutex and related topics, networking, half a dozen or so complicated APIs...

I would suggest dropping the database and working with only flat files, and aiming to get a simple chat program with user accounts working first. Once you get a feel for how the APIs work you can progress to an avatar chat or similar.
rizzix




PostPosted: Wed May 14, 2008 11:05 am   Post subject: RE:What do I need in order to make a Java multiplayer online game?

If you're interested in java MMOs or any kind of online games for that matter, take a look at Project Darkstar. It provides all the infrastructure you need to implement networked games. You just have to implement the code.

Edit: for more info, read the FAQ
Reality Check




PostPosted: Sun May 18, 2008 3:16 pm   Post subject: Re: What do I need in order to make a Java multiplayer online game?

Someone should write a tutorial on this. I've been interested in this as well.
shadowman544




PostPosted: Sat May 24, 2008 8:17 pm   Post subject: Re: What do I need in order to make a Java multiplayer online game?

i agree if someone who knows about this spacifically could do a tutorial it would be spectacular
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: