Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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 2801 times)
0 Members and 1 Guest are viewing this topic.
Offline RickD

Innocent Bystander

Java games rock!

« Posted 2004-12-15 08: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,
Offline crystalsquid

Junior Devvie

... Boing ...

« Reply #1 - Posted 2004-12-15 09: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  

nelsongames (17 views)
2018-04-24 18:15:36

nelsongames (13 views)
2018-04-24 18:14:32

ivj94 (587 views)
2018-03-24 14:47:39

ivj94 (50 views)
2018-03-24 14:46:31

ivj94 (400 views)
2018-03-24 14:43:53

Solater (65 views)
2018-03-17 05:04:08

nelsongames (110 views)
2018-03-05 17:56:34

Gornova (175 views)
2018-03-02 22:15:33

buddyBro (730 views)
2018-02-28 16:59:18

buddyBro (93 views)
2018-02-28 16:45:17
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!