Why Making Multiplayer Games SUCKS

414,004
0
Publicado 2021-09-07
I finally decided to tackle some of the more complex issues I was having with multiplayer, and this is how it went...

Next devlog:    • How I Fixed the Ocean in My Pirate Game  
Pirate game playlist:    • Multiplayer Pirate Game Devlogs  

⎯⎯⎯⎯⎯⎯

More about client prediction & reconciliation: www.gabrielgambetta.com/client-side-prediction-ser…

Discord server: tomweiland.net/discord
Support me on GitHub Sponsors: github.com/sponsors/tom-weiland
Support me on Ko-fi: tomweiland.net/kofi
GitHub: tomweiland.net/github
Project's Trello board: trello.com/b/vJwk0iwS/pirate-game
Website: tomweiland.net/

⎯⎯⎯⎯⎯⎯

Gear & Software I Use

Developing
⮞ Engine - Unity: store.unity.com/#plans-individual
⮞ Code Editor - Visual Studio: visualstudio.microsoft.com/vs/
⮞ 3D Modeling - Blender: www.blender.org/download/

Recording & Streaming
⮞ Screen Recorder - OBS Studio: obsproject.com/
⮞ Camera - Panasonic G85: amzn.to/39P77GK
⮞ Microphone - Maono AU-PM422: amzn.to/2LsTIuG

Computer Parts & Peripherals
⮞ Mouse - Logitech G604: amzn.to/3mqUSoy
⮞ CPU - AMD Ryzen 7 2700X: amzn.to/3pU06K9
⮞ GPU - GeForce GTX 1050 Ti: www.newegg.ca/p/N82E16814125915
⮞ Motherboard - ASUS Prime X470-Pro: amzn.to/3p20h5f
⮞ SSD - Gigabyte 240GB: amzn.to/39UPWDQ
⮞ HDD - WD Blue 1TB: amzn.to/2O37EMI
⮞ RAM - 8GB x2
⮞ Case - Fractal Design Meshify C: amzn.to/3q6FgHy
⮞ Power Supply - EVGA 750 GQ: amzn.to/2N3T3A0

Other
⮞ YT Channel Management Tool - TubeBuddy: www.tubebuddy.com/tomweiland
⮞ Webhosting - Bluehost: www.bluehost.com/track/tomweiland/

I personally use all of the above products and services, so they are genuine recommendations. Some of these links are affiliate links, which means I get paid a small commission (at no extra cost to you) if you sign up or buy through them. Thanks for supporting the channel!

⎯⎯⎯⎯⎯⎯

#LatencyIsTheEnemy #Devlog #PirateGame #GameDev #IndieDev #IndieGame #Multiplayer #Unity

In this multiplayer devlog I finally decided to tackle some of the more complex problems I've been having with multiplayer. Latency is the enemy, and makes building multiplayer games 1000 times more painful and time consuming. While I've managed to get latency mitigation techniques like client prediction working on dry, non-moving land, it's a whole other story when you're standing on a moving boat, and this video is a summary of my experiences over the last 3 months.

⎯⎯⎯⎯⎯⎯

The music used in this video is sourced from the YouTube Audio Library and StreamBeats.

Todos los comentarios (21)
  • @nocultist7050
    That's why I chose to do LAN multiplayer. That way, if a cheater is stealing your fun you can just go to him and punch him in the face.
  • @plank2490
    "It doesn't work and I don't know why " "Now it works and I don't know why" -every programmer's cycle in a nutshell
  • @PatriotZest
    "Give a man a software he will enjoy it, teach him to code he'll never enjoy in his lifetime' -Suz Tzu art of coding
  • @MrLasse6001
    Players unfortunately don’t now about all these complications…
  • @Neverjam
    Thank you so much for making this. Ever since release its my go to video when players ask "Why don't you just add online"
  • @that_kaii
    "What better way to fix a bug than working around it?" -Every Programmer Ever
  • I fricken love this channel! Anyone that can do networking is a god.
  • @calitts4708
    The best thing is swapping a semicolon for a Greek question mark in a friend's code
  • @PuppetDev
    This is very relatable. Great video. Whenever I tell people about how annoying it is, I don't feel like they comprehend the full extent of it. Even this video didnt fully give it justice. It's feels like you are slowly driven mad by some eldritch god. Stuff stops making sense but it kinda does, sometimes... You start to understand why online games seem so limited sometimes. Make sure to take care of your mental health. Take breaks and do other stuff that gives you joy and purpose in life.
  • @iMinx
    I tried making a multiplayer fps and gave up because of these things. It's really hard to conceptualize what this sort of entails until after it starts bending you over.
  • @toastbrot97
    Switching from a physics based system to a simple parenting system when stepping onto the ship is actually genius. I had a stupid grin on my phase when i saw that part in the video cause i was also like "wait, how does one fix this actually?". And then my brain was like: "ah of course, why did i not think of that!" :D
  • @krammehl
    Hey, I ran into similar issues while developing pantropy. We had the player move on ground and flying/moving bases here are my tips: 1. DO NOT use a rigidbody to move your player. Physics movements are never equal on server and client. Use a CharacterController instead. The characterController.move function is always accurate and the player will move an equal distance on server and client. 2. Don't use the characterController for ground collisions. Use a raycast and keep the player a given distance away from the ground. Move the player downwards if the ray doesn't hit anything. 3. Set the player's transform as a child of a moving object (like your boats) on server and client when he enters it. You will not have any weird physics glitches thanks to the "groundray". Hope these helped, this wroked for me flawlessly.
  • @RialuCaos
    These problems are why I probably wouldn't recommend a multiplayer game for a first project (unless it's local multiplayer). It's a real headache to figure out the proper way for networking in games, and when you're also doing everything else for the first time, it becomes a whole lot to handle.
  • @PixelWealthh
    I just made my first game in unity, and honestly the coding part seems kinda intimidating but i'm somehow enjoying the learning process.
  • @xzippyzachx
    That cliff hanger tho! I was on the edge o' me cap'n seat. Great video like always matey :p
  • @icoso
    Great video, Tom! Really enjoyed this one, and I love how you're so concise and clear with everything you say! Awesome work :D
  • @Skeffles
    Brilliant to see you've got this going! Client prediction was a major reason why I gave up last time I tried networking.
  • @erickpassos
    This is a great video. Very good and clean explanation of an otherwise very complex topic. A few things from my several years experience: - there's no need to "compare" for misprediction... just overwrite with server data and resimulate forward (maybe this is what you do already) with the local input buffer... - for moving boats, and all moving platforms in that sense, it gets trickier because you could place the boat in predicted timing as well (if you also predict/rollback physics, which you can do), but this would create a problem for proxies (view of other players) as they are generally on interpolated time. One thing that may work for proxies is to predict just their gravity and move-with-platform part... But in either case or solution you will loose one thing, which is the capability of doing accurate lag compensation... but that is another story...:)
  • @Steveplays28
    I feel your pain Tom, good luck with fixing the issues! Your game looks sick :D