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  
  multiplayer (applet) java game question  (Read 1855 times)
0 Members and 1 Guest are viewing this topic.
Offline RickD

JGO Visitor



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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks 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 (76 views)
2013-05-17 21:29:12

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

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

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

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

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

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

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

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

UnluckyDevil (186 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.081 seconds with 20 queries.