Unreal Engine Networking
Useful links:
Practice 5
![](https://courses.cs.ut.ee/2024/ge/fall/Main/UnrealNetworking?action=download&upname=PlayAsListenServer.png)
Tasks:
- Run your game with multiple players and identify problems.
- Synchronize the projectile such it appears on all players screens.
- Enable replication and replication movement of the projectile.
- When the client shoots call a server function and spawn the projectile in the server instead.
- Synchronize the Pitch angle of player look rotation
- In the tick event end the owning player' look pitch to the server.
- Update the look rotation in the server based on this pitch.
- Replicate this pitch to other clients using a replicated float variable. Update their look rotation as well.
- Home task: try to fix the problem that the game always ends in the host computer no matter who reaches the Extraction Zone. The game should only end for the player who steps on it.
Practice 6
Tasks:
- Synchronize the game state
- Move widget creations to the player controller.
- Synchronize the Complete mission when the player reaches the extraction Zone by ending his game.
- Synchronize the Complete mission when time runs out by ending all players games.
- Synchronize the Lever such that when one player pulls it, then the door should open for every player.
- Create the high score
- Create a custom Player State class and store the completion times in there.
- Display the completion times on the player's Game Over Widget.
Practice 7
PS! Since Unreal 4.27 the method for disabling the automatic connection has changed. Now you need to choose "Play as Standalone" Net mode under Multiplayer Options
![](https://courses.cs.ut.ee/2024/ge/fall/Main/UnrealNetworking?action=download&upname=UnrealPlayAsStandalone.png)
Tasks:
- Create a menu scene
- Add a WBP_Menu widget with title, host button and container for the list of sessions.
- When the user presses the host button:
- Open the FirstPersonExampleMap in listen mode
- Create a LAN session
- Add a timer that updates the session list every second (clears the list and recreates the buttons)
- Create a WBP_SessionButton widget.
- The widget gets the blueprint session result as an input and displays its name.
- Add a delegate that is called when the user presses this button and returns the session.
- In-session list update method, get the list of LAN sessions and create a button for each one of them.
- Attach an event to the button delegate that will join this session.
- When the host starts a game disable the player input and don't start the countdown until another player has joined.
- Compile your game and test it on your computer. Make sure that all the previously implemented networking features are working.
Submission
Submit a compiled version of your game (Windows 64 build). Zip your build folder into a single package and make sure that all the additional files (that were created when building the game) are also included in this package. Don't submit your source code.
Unfortunately, the file will be too large to directly upload here. Upload the file to your google drive or another file hosting platform. Write the sharing link to a txt file and submit this.
Deadline: Before exam TBA (23.59)
Sellele ülesandele ei saa hetkel lahendusi esitada.