This discussion is archived
2 Replies Latest reply: Oct 29, 2010 5:27 PM by 809420 RSS

How do i host my 2 player checker game

809420 Newbie
Currently Being Moderated
Ok so im currently taking a java course at my university and my project is to create a 2 player game of checkers, to be played online.

I have an applet "Checkers.java" and application "CheckerServer.java"

The CheckerServers waits for 2 players (i must first run the application, and then run the applet twice)

The game is complete and it runs great, the applet uses "127.0.0.1" as the server for local testing

now my question is how to i put this on my website which is hosted via GoDaddy

I know how to host an applet, a simple html file with the <APPLET CODE"whatever.class" ARCHIVE="whatever.jar">

but how do i make it so that the server application is running before the applet loads?
and how do i make it so that when 2 different people visit the website with the applet they both use the same CheckerServer application?

if anyone can point me in the direction, what to research, is this an html problem or must it be somehow included in my code.

Anything helps, if needed i can upload my code here, but is rather long. the applet is a combination of 5 classes and then theres the server app

Edited by: 806417 on Oct 29, 2010 4:14 PM
  • 1. Re: How do i host my 2 player checker game
    796440 Guru
    Currently Being Moderated
    806417 wrote:
    but how do i make it so that the server application is running before the applet loads?
    Typically a server runs 24x7, or 8:00-5:00 M-F, or something . So you put your server app on your GD host, start it up, and let it run forever.
    and how do i make it so that when 2 different people visit the website with the applet they both use the same CheckerServer application?
    How is the applet connecting with the application now? I would assume it connects to some IP address and port. So both clients need to connect to the same port on the same server--the one that served them in the first place. I don't really understand what problem you're having here.
    Anything helps, if needed i can upload my code here, but is rather long. the applet is a combination of 5 classes and then theres the server app
    If it comes to that, you most certainly will not upload your app. Not if you want anybody to read it anyway. If your question is about applet/server connectivity, you would write a tiny [url http://sscce.org]SSCCE that just has enough pieces to have an applet and a server trying to talk. No GUI stuff, no checkers game logic. None of that fluff.
  • 2. Re: How do i host my 2 player checker game
    809420 Newbie
    Currently Being Moderated
    Thank you, im just very new to all this, specially the networking side of this project.

    the game is not running when uploaded, but works perfectly locally. I will double check that im using the proper ip, and that i uploaded everything correctly.

    your comment was very helpful, specially the SSCCE part, im not concern about this particular program, but it is something i will be glad to know about in the future.

    Thanks,

    -AG

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points