Project on 2-d car racing game cop and robbers


The following is a software engineering project. In this, we are doing 2d car racing game cop and robbers. its a racing game in 2d. we are working on User interface. I need help with coding. I am sending you all the informations. we will be using java. For IDE we will be using Eclipse and for project build we will be using libgdx.
Requirements Document

Supported Activity List:

In Game:

A.) Allowing the user to change their own difficulty based off the color of the Buggie that the player chooses.

B.) Give the player a choice of being the Cop or the Buggie. This effects the goal of the game where if you choose to play as the buggie, you try to stay alive as long as possible in order to get the highest score. If you play as the Cop however, the goal is to hit the Buggie as many times as possible to gain a higher score.

C.) Give the player a choice of track so they can choose where they want to race. These tracks range in difficulty from an easy track that features few turns, not too many obstacles, and good weather to a hard track with a lot of turns, many obstacles and bad weather.

D.) Allow players to pick up various powerups and use them when they want during gameplay. These powerups will have various effects on opponents and the player ranging from replenishing health to slowing down the other opponent.

E.) Player can choose to turn off/on the music and sound effects in the options menu and from the in game pause menu. It also gives the player the option to exit the game at the pause menu.

End Game:

F.) Interacting with other human player via online gameplay. Player will be able to see their rivals by end of their game.

G.) At the game over screen, the player has the ability to comment on another player during online play.

Profile management:

H.) Give user the ability to retrieve forgotten accounts by allowing them to enter an email address that is tied to the account and their credentials will be emailed to them.

I.)  Allow the player to login to their profile using their username and password.

J.) Allow the player to create a profile that consist of a username and password. This will allow them to track their own stats.

Menu items:

K.) Allow the players to check their profiles statistics when they click on the statistics option in the main menu. They can check their high score, see other players high scores, latest game played score, highest number of laps, and their time played.

L) Allow user to choose if he/she wants to go through the instructions for the game from main menu.

M.) Provides title menu that welcomes the player. And sets the theme for this particular game.

N.) interacting with a main menu screen that allows the player to choose a selection. The player can choose to play the game, see their status, see game options, see gameplay instructions and logout.

Backend:

O.) Change status of player automatically when finishes game. The new scores will update automatically.

Solved Problem List:

a.) Does not apply to our project.

Information Source List:

a.) The Game Maps will be stored in a game Folder.

Information-requesting organization list

a.) Does not apply to our project.

Automated Checks and Balances:

a.) Users must choose their own unique username.
b.) The database will check for profanity words.
c.) Collision detection would be handled by the backend

Present information capacity and projected growth:

a.) The game should not need replacing due to the replayability of it. The user can reset the game if they want to play again. The server database should be able to withstand a substantial amount of data.
b.) The Server should be able to perform fast when all user are accessing the game online at the same time.
c.) The game itself should be able to perform well while the player plays the game.

Security and Fault-Tolerance Requirements:

a.) User’s Data like username, password, Stats will be stored in Game’s Server.
b.) User’s Data will also be stored in local database. If the server crashes then the user can access his/her data from a local database.

Interoperating system list:

a.) Does not apply to our project.

Prioritization of Requirements:

a.)  The backend, frontend and single player will be the highest priority.  
b.) The powerups and login will be our next priority.
c.) Medium, hard levels, cops mode and multiplayer after that.

Ethical Concerns List:

a.) Users must not use any profanity while creating their username.
b.) Users must be respectful to each other while playing game.
c.) Users must first play the first level upon playing the game for the first time.

Game Description:

Team Name: Atomic Racers

Description:

The goal of the class project is to implement a standalone desktop game. This game is a 2D game cop and robbers game, called RIC Racers, which is closely modeled after the C.A.P online flash game Robbers vs. Cops. The game is a standalone game; that is, players will be able to play from their desktop or laptop computers. The game is a racing game in which the player selects his/her Buggie and chooses a color that determines the difficulty of the car and the difficulty of the level. The player races through different maps of the RIC campus. Each map increases difficulty from easy map to a hard map. Each map has its own change based on the difficulty by added more or less obstacles and power ups. A weather effect will also be added based on the level chosen. For the first level it be a beautiful sunny day. For the second level, it will be night time. For the third level, it will be raining. And finally for the fourth level, it will be snowing. For each difficulty based on the Buggie, the cop will be slower and less aggressive or faster and more aggressive. The objective of the game is to see for how long the player can race through the map while avoiding the campus police and other obstacles. The more damage the buggie receives, the slower it gets. The buggie can be damaged by obstacles such as lamp posts, trash cans, benches, trees, gates, emergency lamps, and the cop car. The buggie’s difficulty comes from its handling and speed which is based on the color of the Buggie. There will be different modes in the game; Player vs. the CPU(COP)  or Player vs Player. In Player vs. CPU, the player races against the campus police. The police will chase the player until the player’s Buggie is fully damaged. In the Player vs. Player mode, the player can race against another human. The first player will drive the Buggie and the second player will be the cop.There will be no time limit for either modes. The game involves concentration and diligence. The strategy of the game is to drive for as long as possible without being caught by the police.

Users:

Everyone can play this game.

Nouns:

Game, RIC, User, Cops, Robbers, Racers, Model, Players, Laptops, Computers, Buggie, Color, Levels, Maps, Obstacles, Power ups, Weather, Lamp posts, Trash cans, Benches, Trees, Gates, Emergency lamps, Car, Modes, CPU, Human. 

Informal Scenarios:

Scenario 1: New user starts the game for the first time
Current System State:
The system state starts off at the title screen that displays the title and is asked to press any key.
Informal Scenario:
Emma presses the enter key. Emma is then prompted to click on new user or existing user.
She clicks on new user and is brought to a new screen. Prompts Emma to enter a new username and password. Upon entering her new username and password, Emma is brought to the main menu.
Next Scenario:
Emma is then given the choice to start a game, view her stats, go to the options, or view the tutorial.

Scenario 2:

Current System State:
The system state starts off at the title screen that displays the title and Rob is asked to press any key.

Informal Scenario:

Rob presses the enter key. Rob is then prompted to click on new user or existing user.
He clicks on existing user and is brought to a new screen. Prompts Rob to enter their username and password. Upon entering his username and password, Rob types the wrong password by mistake. An error message prompts Rob that he has entered the wrong password and tells him to re-enter his password. This time Rob enters the right password and upon completion, is brought to the main menu.

Next Scenario:
Rob is then given the choice to start a game, view his stats, go to the options, or view the tutorial.

Scenario 3:

Current System State:
Macy upon a successful login is brought to the main menu.

Informal Scenario:

Macy is now in the gameplay screen. A traffic light is displayed in the middle of the screen. The traffic light goes from red to green. Macy starts accelerating at a fast speed. Macy manages to speed by several trees and benches and misses two other Buggies. Halfway in the middle of the quad, a campus police car begins to approach the Buggie. Upon entering and leaving night event tents, the campus police car eventually catches up to her, severely damaging the Buggie. Out of pure nervousness Macy hits an emergency light post and disables her buggie.

Next Scenario:

A game over screen is displayed, asking Macy to quit to the main menu or try again.

Training Plan for Application Domain Knowledge:

We searched for 2D cops and robbers flash games on the google search engine. There were some sites that had several games of this type. On the site www.fizizi.com there is a game called robbers vs. cops. Since this game seemed relevant to our general idea of our game, we decided to play it. We came to a conclusion that this game would be a great reference to design of our game. This game covered various aspects of what our game should look like. Road Hunter is another game that we thought would be a good model for our design. This game can be found on the www.gamesforboys.net site. The full link for both games are the following: https://www.fizizi.com/robbers-vs-cops/?utm_source=flora&utm_medium=cpc&utm_campaign=fizizi and https://www.gamesforboys.net/games/racing/armored-car-robbery.html.

Class Diagram:

904_Class diagram.jpg

Class Diagram Summary:

Between Database and Game: There will be two subclasses called Local Database and a Database which will connect the program to the databases. The game will automatically save the player’s stats on both the Local Database and the Database Server through these two subclasses. Between DatabaseConnection and Game, the Player can create his/her own account. The Player will be able to get his/her player stats from the Database. The Admin will be able to delete a player or if the player decides to delete his/her own profile they could also do it as well. Between DatabaseConnection and game, the game will update player’s stats after a game has finished.

Between game and player:

The game will first start by initializing all the data needed to get the player started. The player will send its login information to the game so the game can retrieve the player’s stats from the local or server database. The player’s status will be the information that holds the player’s score, high score, laps, and games played.

Between player and mode: The player class will contain the user's stats and information about the user who is logged in. This class will also have an association with the mode class because the player can use the chooses method to choose what mode they will want to play in. The mode class will contain information about each mode of the game and change the game according to the choice made. 
Between Mode and CPU: Depending on the mode chosen, the mode class will use the determines method to choose whether or not to include the cpu in the game and also what player the cpu will be. The cpu class will contain all the backend algorithms to make it an opponent to the user.

Between Player and Car:

Between player and car, player will be able to setColor for player’s car. Between player and car, player will be able to select difficulties.

Between Mode and Cars:

The mode will determine a car after the player has chosen a mode. Based on whether the player chooses a certain mode such as single player or multiplayer, the mode will determine what vehicle the player will play as. If single player mode is chosen, the player’s only option will be to be a buggie, otherwise, if multiplayer is chosen, then the player who sends an invite to another player will get to chose what he/she wants to be (buggie or cop). The other player will have no other choice but to be the leftover choice.

Between Player and Level:

Player will choose level of the game. The level will contain a map which will act as a graphical canvas that the player will interact with.

Between Level and Obstacles: Between these two classes there will be a generateObstacles method which will randomly populate the map with various obstacles. The obstacles class will be a super class and it will have 4 subclass which will be specific obstacles. These subclasses are tree, benches, emergency lamp, trash cans. Each of these will contain specific information about how it will interact with the player through the collidesWithObstacle method.

Between Level and PowerUps:

PowerUps will be generated randomly. PowerUps will have subclass such as Computers, Turbos, stealth, immunity and health. The computer’s PowerUp will give the player the ability to throw computers from back of car. If a player does manage to hit a cop car, then that cop will take a significant amount of damage. Turbos will provide more acceleration and make the player drive faster. Stealth will invoke invisibility, the opposite player will not be able to see car. For immunity, the car will not be damaged even if it collides with obstacles or the other player. Car will get more health from health features.

UI system design and architecture:

Our UI will have a gold Plaque RIC recognition theme. This resembles picture frames of alumni who are honored for their past achievements. These can be seen along RIC hallways. We wanted a similar way to resemble this in the UI. The first screen that should be displayed is the login screen, asking the player for their username and password. If the player is playing the game for the first time, the player can click on create profile and provide a username and password. The player may not use any kind of profanity while creating their username or password. There is an option screen in case the player chooses to enable or disable certain feature in the game like toggling the ingame music sound at the pause menu, allowing the player to quit to the desktop at the pause menu or to adjust the volume levels of game music and sound.

The player may choose to see their own stats that indicate games played, scores for each game and the level that a particular game was played at. The player can exit the stats screen anytime by clicking the “go back” option. The foreign records screen shows stats of online players that you have played with in the past. It shows the player’s username, their highest score so far and the highest laps achieved in a game. The stats menu also allows the player to select the highest number of laps and play time. The play time option shows the player’s game, time for that game and the level play at for that game.

System Architecture: Layered Architecture

The middleware will contain our client which will display all of the UI. It will also contain the backend which will do all of the rendering work, logic and mathematics to make the game function. The webserver will manage all of the multiplayer server work to create a multiplayer experience. Player profile information will be stored on a websever database. The local database will act as a backup incase the player’s profile information doesn’t reach the webserver database or loses network connection. If the information can’t be stored on the webserver, the backend will save player’s information on the local database for later retrieval by the webserver database.

UI system design and architecture:

Our UI will have a gold Plaque RIC recognition theme. This resembles picture frames of alumni who are honored for their past achievements. These can be seen along RIC hallways. We wanted a similar way to resemble this in the UI. The first screen that should be displayed is the login screen, asking the player for their username and password. If the player is playing the game for the first time, the player can click on create profile and provide a username and password. The player may not use any kind of profanity while creating their username or password. There is an option screen in case the player chooses to enable or disable certain feature in the game like toggling the ingame music sound at the pause menu, allowing the player to quit to the desktop at the pause menu or to adjust the volume levels of game music and sound.

The player may choose to see their own stats that indicate games played, scores for each game and the level that a particular game was played at. The player can exit the stats screen anytime by clicking the “go back” option. The foreign records screen shows stats of online players that you have played with in the past. It shows the player’s username, their highest score so far and the highest laps achieved in a game. The stats menu also allows the player to select the highest number of laps and play time. The play time option shows the player’s game, time for that game and the level play at for that game.

System Architecture: Layered Architecture

The middleware will contain our client which will display all of the UI. It will also contain the backend which will do all of the rendering work, logic and mathematics to make the game function. The webserver will manage all of the multiplayer server work to create a multiplayer experience. Player profile information will be stored on a websever database. The local database will act as a backup incase the player’s profile information doesn’t reach the webserver database or loses network connection. If the information can’t be stored on the webserver, the backend will save player’s information on the local database for later retrieval by the webserver database.


Attachment:- ClassDesignsClassSkeleton.docx


Attachment:- UseCaseDiagramUseCases.docx

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Project on 2-d car racing game cop and robbers
Reference No:- TGS01238434

Expected delivery within 24 Hours