Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  multiplayer (applet) java game question  (Read 2144 times)
0 Members and 1 Guest are viewing this topic.
Offline RickD

Innocent Bystander




Java games rock!


« Posted 2004-12-15 09:00:55 »

Hi all,

I'm looking for information on creating a multiplayer java applet game. I've googled for it, but haven't been able to find the information i need. I'm looking for things like these:

1) If i put an applet on a webpage. What are good ways to let the applets that are viewed (at the same time) by a browser obtain eachothers IP. I don't think there is a way to retreive this information from the server without server side scripting, unless there is some way to get the "active connections" that i'm not aware of. I guess it's possible to store the ip in a central database or in files on some ftp account, but I rather not store database or ftp passwords in an applet. Or let some server side script send the ip of the first applet to all new ones, which can act as a server. But i'm sure there are better methods that are already in use, which i'm not aware of.

2) Can an applet function as a server from within a browser?

3) What is the best network strategy to use. Token ring, Star with a central server, etc ..  

4) What are the best java functions and techniques one can use to create a stable network connection.

Any help with this, or links to helpful webpages or source code are greatly appreciated.

Best Regards,
Rick
Offline crystalsquid

Junior Member




... Boing ...


« Reply #1 - Posted 2004-12-15 10:17:40 »

You would have to sign your applet to be allowed to do this. Unsigned applets can only talk to the server they cam from. By far the easiest way to do this is to have the web server as the game server and have the applets talk to that.

It _is_ possible to do it all with server side scripting alone, where the applet will request a game state every so often, the server then maintains a database of each games state (allowing for multiple games at once) and handles this. But it would probably be easier (& more secure) to have a dedicated server program that runs the games and the applets are thin-clients.

Letting the applet handle any game logic/game decisions leaves it open for abuse - someone could easily build a hacked applet that lets them win all the time. Using a server to handle game logic severely limits this.

- Dom
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.

ctomni231 (38 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (37 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52

SHC (70 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!