Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RMI, Sockets or ...?  (Read 3831 times)
0 Members and 1 Guest are viewing this topic.
Offline Wazzzaaa

JGO Visitor




« Posted 2008-01-27 19:35:40 »

Hi all,

I'm new to this forum and could not find a decent answer to my question. Please let me know when this question is already answered in another topic.

I have a couple of years Java experience and have made some simple mini games.  Now I want to make a multi player game (in an Applet). But for networking I still doubt using RMI or just Sockets (or maybe something else?). I red for example about JMS, but I think that is to abstract to use in game development.

My main question is; what is the best to use for networking in the Applet?
Regarding to networking, what do you use?

Thanks!  Smiley
Offline Mr_Light

Senior Member




shiny.


« Reply #1 - Posted 2008-01-28 22:30:57 »

sockets, and mind you that you can only connect to the server that the applet is downloaded from as it is sandboxed.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline erikd

JGO Knight


Medals: 3
Projects: 3


Maximumisness


« Reply #2 - Posted 2008-04-22 10:34:33 »

sockets indeed.
RMI depends on serialization, and lots of serialization can stress the garbage collector.

Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Online Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


« Reply #3 - Posted 2008-04-22 10:43:20 »

Not to mention the distributed full GC's in RMI, which might be less or more annoying.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline quixote_arg

Junior Member


Projects: 1


Jengibre


« Reply #4 - Posted 2008-04-22 13:02:49 »

sockets, and mind you that you can only connect to the server that the applet is downloaded from as it is sandboxed.

Not anymore since 6u10 !!
Offline zammbi

JGO Coder


Medals: 4



« Reply #5 - Posted 2008-04-23 06:08:20 »

I use sockets for my game, seems its the best way to go.

Current project - Rename and Sort
Offline JAW

Junior Member





« Reply #6 - Posted 2008-05-09 12:00:43 »

The problem on applets is, that they can only connect to their server. This requires a program to run on the server which forwards any messages to other players. A standalone Java application would be able to send messages direct to other players, not requiring a distributor on the server side.

Games usually go with UDP. But depending on the number of players and messages, TCP can be just as fine or even better.

-JAW
Offline quixote_arg

Junior Member


Projects: 1


Jengibre


« Reply #7 - Posted 2008-05-09 14:20:00 »

The problem on applets is, that they can only connect to their server.

Untrue, read above
Offline gouessej

JGO Ninja


Medals: 33
Projects: 1


TUER


« Reply #8 - Posted 2008-05-09 14:27:21 »

There are plenty of solutions for your problem, I'm facing the same one right now. JMS is designed to work with J2EE as far as I know. RMI works bad on long distance with an important latency, that's why I decided not to use it. Sockets are very low level but very efficient, it depends on how you use them. AltRMI and JRemoting are alternatives to RMI, I don't know if they are used currently. Apache MINA seems interesting too. JNAG project seems unactive. I don't know if project darkstar may interest you. Have a look to Java Game Networking : http://javagn.org/wiki

Offline JAW

Junior Member





« Reply #9 - Posted 2008-05-09 14:35:58 »

Untrue, read above

Hi

1) Where exactly, i cant find it?

2) I think signed applets should allow free connections too, as an alternative?

3) Even if they change it in a current version, I am still developing and targeting Java 1.5. Sadly, many people dont run the newest version. Automatic Updating helps a lot, but there are still plenty of clients which are not up to date.

-JAW
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline quixote_arg

Junior Member


Projects: 1


Jengibre


« Reply #10 - Posted 2008-05-09 15:10:22 »

here

signed applets allow you to connect anywhere, right
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (72 views)
2013-05-17 21:29:12

alaslipknot (83 views)
2013-05-16 21:24:48

gouessej (113 views)
2013-05-16 00:53:38

gouessej (108 views)
2013-05-16 00:17:58

theagentd (119 views)
2013-05-15 15:01:13

theagentd (108 views)
2013-05-15 15:00:54

StreetDoggy (153 views)
2013-05-14 15:56:26

kutucuk (176 views)
2013-05-12 17:10:36

kutucuk (173 views)
2013-05-12 15:36:09

UnluckyDevil (182 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.119 seconds with 20 queries.