Hello everyone. I'm working on a fairly large project in Java creating an online Chess game (similiar to, say, Chess.com) where mulitple people can connect and challenge others or play against an AI.
I'm creating this thread in the hopes of being able to continuously ask this wonderful community for advice on the best go about something (if I can't clearly find the answer myself) and to post what I'm doing in the hopes that someone will read it and inform me of a better way, so that I can walk away with the most from this project. So please, please post any thoughts, opinions, and especially criticizisms on
anything you find in here, thanks!
What I'm planning so far: So far I'm planning on creating a multithreaded Server using sockets (since they're so simple in Java). The Server will constantly listen for incoming clients, pull up their stats and information, then stick them in a connected queue where they can view and challenge the other players. In which, the server will intialize a match between the players by creating a match thread and telling the clients' GUIs to update themselves.
Both the Server match thread and the clients will inherit from an abstract class Chess Engine which will verify for move validity and check for check(mate)s. Doing validity checks on both server and client side seemed like a standard practice thing so that's what I'm going to do; the client checks will try to alleviate server works by checking the moves until they picked a valid one and the server checks will ensure no one can cheat by hacking the client engine. The match will go on until checkmate, stalemate, or surrender.
The client will hold the GUI which is going to be created using JavaFX. It's going to allow for the user to choose personal settings for various things such as show possible moves, etc. The settings along with the user info, match info, ELO ratings etc, will either be stored in a DB, in files on the hosting computer, or in a combination of the two (I haven't figured out which is best yet, but I'm leaning towards files).
The AI will definitely be implemented using an existing API. The chess engine may also, but I haven't decided yet. I'm sure there are many chess APIs that include both, but I want to get the most learning out of this as possible and, having never used an API before, dont know how much it'll take away form the experience.
That's everything so far, I hope you will all check back often to give me your opinions and help answer my questions and I didn't scare any of you away with this large wall of text!
This post was edited by SanityWasHacked on Apr 6 2014 10:06am