CMPS-4490 Game Design old Lab-2
Overview:
You may do your work on your local Desktop. Before you leave the lab session, please copy all your work to your 4490/7 folder. Get the lab files from Odin at: /home/fac/gordon/p/4490/code/oldlab2/*
You will start by building and running your programs.
Start the lab2server program running.
Open another terminal window and start the lab2client.
The client program requires some arguments, example:
<host name> <port> <player name>
./lab2client localhost 4490 myPlayerName
You may start more than one client.
It might look something like this...
The server is to the right with 3 clients to the left.
Your task is to modify the code, and establish a game scenario. 1. Allow a client to attack another client. The client will press a key A through Z. This is the client they wish to follow and attack. Because the 'B' key triggers a broadcast message, you may want to change that to Shift-B or something else. 2. Send a message to the server indicating whom you are attacking. Then, move toward that client with the arrow keys. When you have reached any cell that is adjacent to the player you are attacking, you have caught them. The server will award you some points, and remove your attack mode. 3. The client doing the attacking should have a message in the window to confirm who they are attacking. 4. The server should display the score totals of players. Rules: 1. A player you have chosen to attack cannot attack you. Whomever attacks first locks the other player out. But, that player can attack someone else. 2. A player can attack only one player at a time.
Copy all your files to Odin 4490/7/ folder.