You may find something of use at one of the following links:
http://www.jmonkeyengine.c
http://springrts.com/
http://springrts.com/wiki/
http://www.13thmonkey.org/
http://en.wikipedia.org/wi
http://www.flipkart.com/pr
Main Topics
Browse All TopicsHi,
I once programmed a working RTS game in Visual Studio Java. I use Eclipse now
It used datagrams for the server/client exchange.
I used a system where each datagram was tagged with a frame number, a movement code, and activity info. - - for each frame of the game.
This kept all the players synchronized, waiting for the corresponding datagram for the current frame in the sequence for all the game activity from each player. Is this the way to do it?
I want to find out, before I start my next one (improved) if there is an open source Java RTS package? ... in sockets/streams , if that is better. . . A good startoff point?
Maybe an article?
thx
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You may find something of use at one of the following links:
http://www.jmonkeyengine.c
http://springrts.com/
http://springrts.com/wiki/
http://www.13thmonkey.org/
http://en.wikipedia.org/wi
http://www.flipkart.com/pr
Springrts looks like a promising source for C++ developers. Anything like that for Java?
Mostly right now, I think I am most concerned with the UDP vs TCP.
I was told to go with TCP.
It sounds right, but does that mean each player in the rts is connected to eachother?
Is that possible, a client can broadcast it's moves to all others?
How is sunchronization guaranteed?
TCP can be very good for synchronisation because it guarantees in-order delivery of packets. You can have all the clients working in lockstep against updates knowing that the order you recieve them is the order they were sent. Using TCP does not mean that you have to go peer to peer.
Whether you go peer to peer or client/server is up to you. Client / server may scale better but it may also mean you need a dedicated server depending on the intended load.
The most efficient way to network in Java is to use the NIO (new IO) Select model. It is fast and scales extremely well. There are quite a few articles on that:
http://www.javaworld.com/j
http://www.ddj.com/hpc-hig
http://gpwiki.org/index.ph
...and more, Google for "Java NIO select" to get more of these
As for the architecture to do synchronised multiplayer, you don't actually need anything Java specific - as the Select mechanism mentioned above is equivallent to the C/Unix socket select paradigm.
You might want to check the GameDev.Net networking FAQ:
http://www.gamedev.net/com
And this is an especially good article about the networking code in Age of Empires - which is exactly the kind of networking you're talking about - peer to peer and lockstep:
http://www.gamasutra.com/v
Thanks alot all.
I am possibly steering away from my conviction of needing a server for each game.
My RTS will not be centralized like Blizzard. It will be small scale, somewhat academic. I now am considering Kaffiene's suggestion of P2P.
Would P2P need to assign one player as a network data manager, or is it simply, each player broadcasts to everyone else their move for a frame and each player waits for a move from every other player for that frame?
So, instead of the needing a middle man - server to bounce move-info to all players, the players bounce to eachother and eliminate the middle man.
?
Business Accounts
Answer for Membership
by: kaffienePosted on 2009-10-05 at 17:42:38ID: 25501137
I'd think your best bet would be to ask the folks at JavaGaming: http://www.javagaming.org/
There are a lot of Java networking libraries for games that they could tell you about (Java NIO is capable of doing what you want if you want to code it by hand)
Also, the JG guys will be able to tell you about any Java RTS frameworks - I'm not aware of any thou.