Advertisement

[java] applet networking restrictions

Started by February 27, 2001 10:25 AM
3 comments, last by grbrg 23 years, 11 months ago
I''m trying to make a little multiplayer-game with Java, but have come upon a problem: Appelts cannot make a network connection to other applets (except the computer they are from)! Is there anything I can do to make a multiplayer game? How do others do this? Thansk for your answers!

------------------------------

There are only 10 kinds of people: those that understand binary and those that don't.

The easiest way to do what you want is to have some kind of server-side application which communicates with all the applets.

All the multiplayer games I''ve been involved in have connected to a servlet (port 80 - which allows them to communicate through firewall software) to talk to other applets in the game session. That''s only useful if you''re developing a turn-based game. If you''re doing something more FPS related then you''ll need a dedicated server app to handle the comms.

If you want to have an applet that directly talks to another applet on another computer, then the applets will have to be signed - which means the player will be asked if they want to allow network comms.

Hope that helps.
Advertisement
Hmm, I don''t want a dedicated server running all the time... But I like the idea of signing the applet!
How is this done? As I remember there is a way to do this in Visual J++ but I don''t have it at hand right now... Is there another way to do this? Thanks again!

------------------------------

There are only 10 kinds of people: those that understand binary and those that don't.

Sorry, it''s been ages since I''ve done any applet work.

I''d suggest looking it up on java.sun.com

Here''s a link that talks about it for the plug-in:

http://java.sun.com/products/plugin/1.2/docs/signed.html

It''s bound to be a nightmare if you want to support different browsers though. I seem to recall Netscape do it one way, and Explorer do it another.
You have to buy a certificate and sign it with that.
I think its a couple of hundred dollars to do so.
Check out www.verisign.com for one company that sells them.

This topic is closed to new replies.

Advertisement