mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.7 KiB
62 lines
2.7 KiB
4 years ago
|
## multiplayer_fps
|
||
|
|
||
|
### Instructions
|
||
|
|
||
3 years ago
|
Write your own version of the game [maze wars](https://www.youtube.com/watch?v=5V5X5SbSjns). You should recreate all the elements of the game, but you have freedom to implement the user interface.
|
||
4 years ago
|
|
||
3 years ago
|
### Objectives
|
||
4 years ago
|
|
||
3 years ago
|
#### User Interface
|
||
4 years ago
|
|
||
3 years ago
|
The game should present a specific User Interface, in which the minimum requirements are:
|
||
4 years ago
|
|
||
3 years ago
|
- A mini map where the player can see his own position and the whole "game world".
|
||
|
- The graphics of the game (walls and other players) should be similar to the original game (see [maze_wars](https://www.youtube.com/watch?v=5V5X5SbSjns) for more details)
|
||
4 years ago
|
- Finally you have to display the frame rate of the game on the screen.
|
||
4 years ago
|
|
||
3 years ago
|
#### Architecture
|
||
4 years ago
|
|
||
4 years ago
|
- A peer-to-peer network that will allow other players to join your server and play against each other.
|
||
|
- Your implementation should allow one client and the server to run in the same machine and all the other clients to connect from different computers.
|
||
|
- Use the UDP protocol to enable the communication between the clients and the server.
|
||
3 years ago
|
- The game should have at least 3 levels with increasing difficulty (with difficulty we mean, making the maze harder, with more dead ends).
|
||
4 years ago
|
|
||
3 years ago
|
You will have to develop the game server and also a client application:
|
||
4 years ago
|
|
||
|
- The server must accept as much connections as possible (the minimum should be 10).
|
||
3 years ago
|
- When the client is initialized, the game should ask for:
|
||
4 years ago
|
- The IP address of the server, allowing the client application to connect to any server.
|
||
3 years ago
|
- A username in order to distinguish users.
|
||
4 years ago
|
|
||
3 years ago
|
After providing the above information, the game should start and open the graphical interface, in which the player should join and start playing the game.
|
||
4 years ago
|
|
||
3 years ago
|
Example:
|
||
|
Assuming that you can connect to a server in the same computer.
|
||
4 years ago
|
|
||
4 years ago
|
```console
|
||
3 years ago
|
$ cargo run
|
||
4 years ago
|
Enter IP Address: 198.1.1.34:34254
|
||
|
Enter Name: name
|
||
|
Starting...
|
||
3 years ago
|
$
|
||
4 years ago
|
```
|
||
|
|
||
3 years ago
|
#### Performance
|
||
4 years ago
|
|
||
3 years ago
|
The game should always have a frame rate above 50 fps (frames per second).
|
||
4 years ago
|
|
||
3 years ago
|
### Bonus
|
||
4 years ago
|
|
||
3 years ago
|
As bonus for this project here are some ideas:
|
||
4 years ago
|
|
||
3 years ago
|
- Implement a level editor to allow player to create their own mazes.
|
||
4 years ago
|
- Implement an algorithm that generates automatically new mazes.
|
||
|
- Implement A.I. players to allow playing the game without having to wait for more people to join to the server.
|
||
|
- For the basic implementation you can initialize the game from the command line. As a bonus you can implement the initialization of the game as part of the graphical interface and save a history of the hosts with an alias so it's easier to reconnect to known servers.
|
||
3 years ago
|
|
||
|
This project will help you learn about:
|
||
|
|
||
|
- GUI applications
|
||
|
- Game mechanics
|
||
|
- [UDP protocol](https://searchnetworking.techtarget.com/definition/UDP-User-Datagram-Protocol)
|