Applet connections

I've made a fighting game applet and I've made it in a way I believe it should be able to play with another player. Now I'm looking to network the game but I'm not sure how to do this exactly with an applet. I know how to connect between applications with a direct connection between client and server but with applets I can only connect the 1 client to the webserver that I'm on. I know it's possible to connect to other people for games because there are many online java games that do so, runescape, yahoo games, and battlefield. A while ago I asked this question I received a response that said I needed to sign my applet and get a lot of permissions and such but this just cannot be the case. I've been thinking the way to do this however is to send information from one client to the server then to the other client but is this possible ? and how would I do this ? do I open a connection to the server using a socket... ? The problem is I would like to host the game on a free webserver like geocities and I'm starting to think that wouldn't be possible. So do i have to have my own webserver and have the clients connect to the webserver and then have the clients interact through the server? or is there another more effiecient way?

this may just seem like me rambling but please help if you understand what im saying, thanks ahead of time.

[1370 byte] By [Twistedchaosa] at [2007-10-2 1:24:16]
# 1

If I remember correctly (I could be wrong, haven't used applets in a while), the only Socket connection you can make without signing is the webserver. You would have to write a server yourself that is assigned to some port of the webserver to manage all of the connections of the clients and to create some interactivity. The main problem with this is most webservers (even services you pay for) don't allow you to run a custom-made program on the server because it could cause potential damange to the machine which would cause a huge problem for other customers you're sharing that machine with.

Now, what you can do is purchase a machine specifically for webserving and basically host yourself in a way. You can even do this with your current machine if you wanted, however your compuer would need to always be on and you would have to be on a stable connection (DSL/Cable, nothing dialup). However during this entire process your IP would be exposed unless you used something like dyndns.org or somehow get a domain registered to your IP (however your IP would have to be static, dyndns is the only domain service I know that has a workaround for non-static IPs via a background application that constatnly updates the dyndns database).

In summary, to create a server/client application over the web without signing the applet, you have to create the server and run it on the same machine that hosts the webpage that contains the applet. Again, I could be wrong on some of this, it might not even be possible to establish a connection to the webserver without signing, I will definitely look into this.

Woogleya at 2007-7-15 18:45:56 > top of Java-index,Other Topics,Java Game Development...