Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 4235 times)
0 Members and 1 Guest are viewing this topic.
Offline Wazzzaaa

Innocent Bystander





« Posted 2008-01-27 18: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


Medals: 1


shiny.


« Reply #1 - Posted 2008-01-28 21: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 Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #2 - Posted 2008-04-22 08: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!
Legends of Yore - The Casual Retro Roguelike
Online Riven
« League of Dukes »

JGO Overlord


Medals: 796
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2008-04-22 08: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
Offline quixote_arg

Junior Member


Projects: 1


Jengibre


« Reply #4 - Posted 2008-04-22 11: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 04:08:20 »

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

Current project - Rename and Sort
Offline JAW

Senior Member


Medals: 2



« Reply #6 - Posted 2008-05-09 10: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 12:20:00 »

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

Untrue, read above
Offline gouessej
« Reply #8 - Posted 2008-05-09 12: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

Senior Member


Medals: 2



« Reply #9 - Posted 2008-05-09 12: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 13: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.

 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (23 views)
2014-09-12 09:08:26

Norakomi (56 views)
2014-09-10 13:57:51

TehJavaDev (69 views)
2014-09-10 06:39:09

Tekkerue (34 views)
2014-09-09 02:24:56

mitcheeb (56 views)
2014-09-08 06:06:29

BurntPizza (40 views)
2014-09-07 01:13:42

Longarmx (25 views)
2014-09-07 01:12:14

Longarmx (31 views)
2014-09-07 01:11:22

Longarmx (31 views)
2014-09-07 01:10:19

mitcheeb (38 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!