by Team Contra
Graphical, multiplayer, and local-vs-AI Checkers game made in Java.
##Description Versa Checkers is a versatile Checkers game, supporting local gameplay against a powerful AI and online multiplayer play against other users. The Versa Checkers package consists of a user client, an AI client, and a game server. Users can play player-vs-AI games through local user clients, or connect to locally or remotely hosted game servers for user-vs-user games.
##Running Packaged JAR applications for the client and server lie in the "Jar Executables" folder of the repo.
To run the client: Clone/pull, open versa-checkers/Jar Executables, and run "java -jar VersaCheckerClient.jar"
To run the server: Clone/pull, open versa-checkers/Jar Executables, and run "java -jar VersaCheckerServer.jar"
##Instructions ###Multiplayer Play: Multiplayer games are played across two clients, connecting to a local or remote server.
####Server Host:
- Run the server as described above
- Press "Listen" to start listening for connections on the specified port (port 1216 by default). Connected clients (IP/Name) will appear in the Client List as they connect.
- Press "Stop" to disconnect all clients and stop listening.
####Player:
- Run the client as described above.
- Enter the IP address (local for LAN games or remote for WAN games) and port of the server you're connecting to.
- Choose a unique player-name.
- Press "Connect" to connect to the server. If you see an "Error connecting..." message, check that your server details are correct and that the server is running.
- Once you are connected, click on the name of any user in the Users list and press "New Game" to immediately start a game with them. Alternatively, wait for another player to start a game with you.
- Once a game window opens, if you created the game, make the first move. Otherwise, wait for your opponent to make a move.
- To make a move, click a valid, moveable piece (its square will turn green) and click on the square you want to move it to. Press "Confirm Move" to submit your move, or "Undo" to undo it.
- Use the chat interface on the right of the game window to chat with your oppponent.
- You will receive a "You win" or "You lose" notification once the game ends, or if you or your opponent forfeit. To forfeit, press the "Give Up" button at the top of the window.
###Single-player Play: Single-player games are played on one client against an AI (bot).
####Player:
- Run the client as described above.
- Press the button "New Bot Game".
- Once a game window opens, make the first move.
- To make a move, click a valid, moveable piece (its square will turn green) and click on the square you want to move it to. Press "Confirm Move" to submit your move, or "Undo" to undo it.
- You will receive a "You win" or "You lose" notification once the game ends.
##Techincal Details ###State of Project Functional server and client (made with Swing) for user-vs-AI and user-vs-user play are on master branch. In-development version of JavaFX based server is on servergui branch.
###Processes User client - consists of a Swing graphical/audio/IO front-end and a computation & networking back-end.
AI client - a computation & local networking process that implements the Minimax AI algorithm.
Game server - networked server that manages gameplay (game creation/verification, communication between clients, move validation), and is capable of hosting multiple games at once (multi-threaded). Servers are managed through a Swing GUI.
Beginning games: A local game can be started by a user through their client, and is facilitated by the client's interactions with a locally running instance of a game server and a connected AI client. A multiplayer game requires a game server to be started & opened on a local or remote machine. User clients can then connect to the server to start or join games.
###Technologies
- Sockets
- Client-server model
- Threading
- Minimax and AlphaBeta search Algorithm
- Swing
- JavaFX
- Model-View-Controller Model
###Project Outline
- Learn about branching
- Learn inter-thread communication and Checkers AI (minimax)
- Design basic client/server protocol
- Basic game server (multi-game, CLI, exception-safe)
- Client backend and GUI frontend
- AI backend
- Improve graphics
###Tools used for the Project
- IntelliJ for coding, project organization, and jar file generation
- JFormDesigner for generating the JSwing GUI
- Lots of online guides for the MinMax and AlphaBeta algorithm
- SceneBuilder for JavaFX creation
###Future goals
- Require opponent confirmation before starting a game (not automatic starts)
- Finish remaking the server GUI with JavaFX, and implement more features (user/game lists, stored settings file and modifiable settings, stored player information, "About" page)
- Remake the user GUI with JavaFX for better looking and easier-to-use interace (and cleaner code)