Socket and/or Multi-player Card Game Tutorials

Hello All,

I am currently trying to write a multi-player card game, but havn’t found any instructions on how to do this task. I know I will need to use sockets, but not sure what else I would have to do. I was wondering if anyone knew where I can find good tutorials on how to build multi-player card games and tutorials explaning sockets. This project is due for class by mid August, but the Teacher mentioned Friday that he doesn’t teach threads, application communication, multi-player functions, sockets, which I am stuck now with this project that I would really like to do, but with no guidance. Any suggestions or ideas would be greatly appreciated. Thanks in advance.

Update on my previous post.

The reason I was asking for information on sockets or multiplayer card game is because I am having no luck finding information on how to get my card game applet to communicate with the server and upto 8 total users. I would like to use an applet if possible, but don’t know where to look to find my answers on how to get multiple connections within an applet. I have several tutorials on applicaitons, but nothing on applet. Any guidance would be greatly appreciated.

Thanks,

I think you should be able to apply your knowledge on applications onto applets in the case of multiplayer games.

If you use an applet you won’t be communicating with anything but the server, since the security restrictions keep you from connecting to anywhere but the server that the applet is downloaded from. Applets aren’t useful for peer to peer.

The Java Tutorial has plenty of information on how to setup sockets as a server. The Java Tutorial

There is also information about threads contained in the tutorial.

Typically if you are going to be using a socket to communicate with a server for a game you will want to create your socket and use a thread to send/receive the information for that socket. The Observer and Observable classes are useful for this, you can find a tutorial on how to use observer and observable online at javaworld.

The socket tutorial at java.sun.com is the bomb, but try doing a google search on java socket programming or chat server java for more supporting detail. The sun tutorial goes from the very simple one client one server to getting involved with some knock knock game garbage without paying much attention to what people probably want to know inbetween.

Good luck :slight_smile: