Creating Java Applets

Hi,

I hope to create an online gaming site within the next few years. I am learning java from online tutorials right now and want to start by making a cribbage game that can be played online by 2 players kind of like Yahoo! Cribbage. If someone could point me to a tutorial or something that would explain how to do this, that would be great! All I want is to make a cribbage card game that 2 people can play and neither of them will have to download anything (except java of coarse).

Thanks,

Adam

[523 byte] By [EagleAmericana] at [2007-11-27 8:36:03]
# 1

http://java.sun.com/docs/books/tutorial/

Probably the trickiest part would be the inter-player communication. Probably the easiest way to do that would be to use the web server that's delivering the applets -- have the applets ping the web server with the moves, and some special functionality on the web server would figure out who's doing what and would respond to the pings with game updates.

paulcwa at 2007-7-12 20:32:49 > top of Java-index,Java Essentials,Java Programming...
# 2

Do you know of any tutorials on how to do that exactly? I am learning Java right now and am not very advanced with it yet. Im hoping to have Cribbage done before January of next year. Also, I have dedicated servers I will be working with on a T3 connection; if that makes a difference. ;)

Thanks,

Adam

EagleAmericana at 2007-7-12 20:32:49 > top of Java-index,Java Essentials,Java Programming...
# 3
Anyone know? :S
EagleAmericana at 2007-7-12 20:32:49 > top of Java-index,Java Essentials,Java Programming...
# 4

First read the most introductory tutorials.

It wouldn't hurt to read all of them, but concentrate most on the Applet and Networking ones. Also, since applets work in a GUI, you should read the GUI tutorials as well.

They may have removed the AWT tutorial, because Sun is really pushing Swing. In a way that's too bad because I found AWT easier to learn -- it does less, but there are less details. But anyway if there is no AWT tutorial, just go ahead and read the Swing ones, at least the introduction to Swing ones. A Swing applet extends JApplet.

To connect to the coordinating server, you'd use java.net.URL objects to make connections, which are represented with HttpURLConnection objects. The tutorial goes over all this.

A dedicated server for a cribbage game is probably overkill, but that's fine.

What kind of web servers do you use, and do you have any experience with server-side web programming?

paulcwa at 2007-7-12 20:32:49 > top of Java-index,Java Essentials,Java Programming...