Ofek Gorgi & Bar Kobi
This project is a "Rock Paper Scissors" game created with SFML. Rock Paper Scissors is an online game that you can play with your friends. Create/Join a room, and start play! The game starts by choosing a flag and hole, the goal of the game is to get the opponent's flag. you can move the players using the mouse or the keyboard. if you get to the same block with an opponent's warrior there is a fight! choose your weapon (Rock/Paper/Scissors), this weapon will stay for the whole game, you can choose weapon once in a game for each warrior. if you meet the opponent's hole your warrior will fall in the hole and the turn will be of the opponent. the game finish when you get to the opponents flag (or the opponent get yours) than you can choose if you want to rematch.
- Class that builds and manage events in the game.
- Singleton class of event queue that saves the events.
- An exception thrown if a game error occur like the opponent logout.
- An exception thrown if a network error occur.
- The weapon of the warrior is flag.
- The weapon of the warrior is hole.
- The weapon of the warrior after choosing one.
- If you haven't chosen a weapon yet.
- A base class for all the weapons.
- Responsible for handling the Board creation, layout and management.
- The main class that managing the game.
- Responsible for showing and updating stats about the game.
- The main menu of the game (First screen to show).
- Load and animate the referee.
- Represent a single warrior on the board.
- A model of the player with name and uid.
- A model of the room in the server.
- Screen the shown after the game is done with the option to rematch.
- Screen to show all the available rooms to join in the server.
- Screen to enter your name before create a user in the server.
- Screen that pop out in a case of error and show the user what happened.
- Screen to control the settings such as volume of the music and sounds.
- A screen to show while you wait for an opponent to join your room.
- Server environment consts like url.
- All the API calls for managing the room in the server.
- All the API calls for managing the user in the server.
- A state of the opponent, parse the move from the server to show on the screen.
- A base class for the enemy and user state.
- Manage the room state and connect between the local and server.
- A state of the user.
- All the consts of the game, sizes, enums, font sizes and more.
- Make all the http requests to the server.
- A location in the board (row,col).
- Load and hold all the assets for the game.
- Manage the settings of the game and update the settings file.
- Singleton class for the sound switches.
- A component of timer with animation.
- Create and manage the window and the eventsLoop.
- Holds matrix rectangles
- Holds the user/opponents warriors.
- Using trigonometric functions to calculate circles around the number using 2 * Pi / Num of Circles for each half of the circle. Each little circle calculated relative to the previous one until reached the base.
- Using a mirroring algorithm to parse the board according to player's real id based on whether he opened the room or not.
- To keep the fight real until the result the data is transferred between the users and to keep the indication for the user that fight is being handled, we used window->update function to keep the last frame while the other user is fighting.
With poor internet connection the game may not work properly.
This game is a multiplayer network game, run the game twice, in the first window create a room than join with the another one. make sure you have an internet connection that is stable.