Networking the Player
Author: Adam Stagg
Problem
The player is currently working with movement and animations, however it is not synchronized over the network. Multiple clients can all see their own animations, however over the network, nothing is synced. Given that this is a peer to peer solution, there will be a "server" as in the hosting player. All events and actions relating to the player should be synchronized with the host, and the host will relay this information to the clients (up to 5). The game is going to be hack and slash, and very fast paced, so animations being in time and position being real-time is critical.
Solution
After doing a lot of research into Unreal's built in networking systems, I have discovered a fix for the player animations. Because all animations will last until the end, send a network call saying that player X has done this animation, which will be executed on all clients after that. This is done via a multicast RPC. There is a caveat with this, however. Multicast RPCs only execute on the client if run by a client, but execute on server and all clients if run by the server. The simple fix for this was to make the animation event a server RPC, to force it to run on the server, then by calling the multicast RPC. This will then propagate to all clients afterwards, and all the animations will be synced.
Luddite
Status | Released |
Author | Me Gusta Productions |
Genre | Adventure |
More posts
- CutscenesSep 22, 2022
- Balancing the enemiesSep 22, 2022
- Quest GamefeelSep 12, 2022
- Dungeon SpawnsSep 11, 2022
- Questing SystemsAug 24, 2022
- Adding Physics to our GameAug 19, 2022
- Questing backendAug 16, 2022
- Dungeon Nav MeshAug 09, 2022
- Dungeon CorridorsJul 21, 2022
Leave a comment
Log in with itch.io to leave a comment.