Why Making Multiplayer Games SUCKS
6:46
Пікірлер
@GrimmDotExe
@GrimmDotExe 2 сағат бұрын
ikr ! whoever made latency is dumb :PPP
@Aquarica
@Aquarica 2 күн бұрын
rip
@Uhfgood
@Uhfgood 4 күн бұрын
I'm going to be doing the same thing here soon, but I'm not sure if I'm going to bother with youtube ads -- I might just go the patreon route (maybe merch) -- assuming I get anything popular enough for people to want to support.
@ronaldwoofer5024
@ronaldwoofer5024 4 күн бұрын
use a real engine then... its straight forward
@Thurtwings
@Thurtwings 4 күн бұрын
it seems that i can't unzip the zip file :/
@newbert9287
@newbert9287 4 күн бұрын
Hell yeah
@KHADKA_OP
@KHADKA_OP 7 күн бұрын
Bro is this for android or where to download
@BusinessWolf1
@BusinessWolf1 8 күн бұрын
I can see from the comments that you're now a servitor to the machine god, 8 hours a day. That's okay man, never think it's 'been too long' to continue your project. You will get used to it, you will upskill in certain areas, and your work, whatever it is, will help you with the game in one way or another. You've got this man! And if your priority is now a career rather than making the game, I wish you good luck on that too. But I really don't think it is. I think you and me are a lot alike, I didn't go to university for the same reasons as you. Well anyway, I've been fucking off on work hours for 15 mins now, so I'll get back to that but just know, you are not alone. There's a lot of people like you, full of passion, working 8 hours a day and MAYBE getting in half an hour every 2 days on their project. It's the consistency that counts. See you at the top.
@tomweiland
@tomweiland 7 күн бұрын
Thank you for the kind words! These are the kind of comments which make me want to come back to this project, but I'm still trying to figure out where and in what capacity it fits into my life now that I work full time 😅
@BusinessWolf1
@BusinessWolf1 8 күн бұрын
The whole selling point of indie games is that they have heart. Procedural generation is an amazing tool that often becomes a trap. People don't wanna play an algorithm, because whatever they do in it feels pointless. Doing the exact same stuff in a hand made world, however, feels much better.
@tomweiland
@tomweiland 7 күн бұрын
Agreed, I think what I may do (whenever I get back to working on this) is use proc gen to generate the shape as a starting point and then modify it by hand to fit exactly how I want it to look.
@BusinessWolf1
@BusinessWolf1 8 күн бұрын
Make the block effectiveness falloff diagetic. Meaning, make the character tilt the sword to show it.
@tomweiland
@tomweiland 7 күн бұрын
Yeah, something like that would be good 🤔
@admazzola3569
@admazzola3569 8 күн бұрын
you need to rethink your architecture if the boat is not working out properly. World of Warcraft did zeppelins. I am sure it wasnt easy but it is possible. 1) try doing everything in ticks 2) try doing everything in deltas with deterministic state machines
@tomweiland
@tomweiland 7 күн бұрын
It's not inherently an architecture problem-the issue of how to deal with moving platforms (which is what my boat effectively is) in multiplayer is widely-recognized as a very common problem with no real solutions that work for all scenarios. I've never played WoW so I'm not familiar with how the zeppelins work, but depending on the restrictions you place on players while on board the problem can be very easy to solve. For example, simply restricting the player's ability to get on and off the platform/zeppelin to the times where it is not moving would allow you to just sync the player's relative position with no issues (as long as it only rotates around the Y axis). Another approach is to have clients predict the position of the platform so that it exists in the same "time stream" as their local player objects, but this will then cause problems with how players see other players interacting with said platform unless you predict other players' movement as well (which is tricky business since you don't have their inputs in real time). I will probably try the platform/boat prediction method in the future, but the point is that every approach to solving this issue has downsides and tradeoffs. Which of those you're willing to make depends heavily on the game and specific use case. Simply "doing everything in ticks" (I already am) or "in deltas" doesn't solve the issues that come with objects from different "time streams" interacting.
@WilliamCutler-xh6pb
@WilliamCutler-xh6pb 8 күн бұрын
Hey thanks for this awesome tutorial. I've been working creating a multiplayer system for my game and this is the most clear and easy to use tutorial I've found. I have one problem: the MessageExtentionsUnity code seems to no longer exist on gitHub or anywhere else, and I don't know enough about coding in C# to write one by myself. Can someone help me? Edit: After hours of searching I found the code in the demo projects.
@memetech-
@memetech- 9 күн бұрын
0:46 Minecraft camera in water is the same way
@tomweiland
@tomweiland 7 күн бұрын
And I don't like it that way :P
@Jonas-Seiler
@Jonas-Seiler 11 күн бұрын
idk seems like a skill issue
@tomweiland
@tomweiland 7 күн бұрын
🤷‍♂️
@Thomason1005
@Thomason1005 11 күн бұрын
interesting idea with syncing the player position relative to the boat, but you could skip the floating boat, just synch a parent id + relative position over the network!
@tomweiland
@tomweiland 7 күн бұрын
The problem with that is that it doesn't account for the discrepancies/delay in the boat's rotation, which would still lead to jittering/mispredictions an various situations. That's part of the reason why I went to the trouble of adding a "proxy" boat-it doesn't need to rotate so it just avoids that issue entirely.
@blue_birb
@blue_birb 11 күн бұрын
You can fix the jump when going on and off boats with a sigmoid function to interpolate between the positions
@tomweiland
@tomweiland 7 күн бұрын
Yes, interpolation would be able to hide most of the jitter in most circumstances.
@bannanafruitsalad
@bannanafruitsalad 12 күн бұрын
Man, I got into more complex programming by watching your multiplayer server series. I hope life is treating you well and that whatever you're working on nowadays is running smoothly
@tomweiland
@tomweiland 7 күн бұрын
That's great to hear! Things are going well, but unfortunately I haven't really figure out where and in what capacity this project fits into my life now that I work full time 😅
@lazicotechlinenesk
@lazicotechlinenesk 12 күн бұрын
Plzzzzzzzzzzzzzzzzzzzzzzz can u make this game for mobile 🥹🫶
@tomweiland
@tomweiland 7 күн бұрын
If I ever managed to release it (I'm currently not even actively working on the project), that would honestly be one of my last priorities. I also don't think it'd play super well with touch controls-you certainly wouldn't be able to compete with someone on mouse and keyboard.
@jeffreygordon7194
@jeffreygordon7194 13 күн бұрын
One complication you missed is the possibility of having a separate design team with no understanding of these issues. I learned first hand that's a silo that can kill game development.
@tomweiland
@tomweiland 7 күн бұрын
One of the perks of working alone :P
@jeffreygordon7194
@jeffreygordon7194 7 күн бұрын
@@tomweiland This video was a bit of relived trauma for me. I took a contract to develop a multiplayer game from scratch during COVID after working solo for several years. It proved to me once and for all I'm best suited to working alone - no boss and no employees. I think you really captured the problem and if this video had been around I would have asked the team to watch it for a second opinion. They were often skeptical of my explanations of the difficulty of achieving their requests.
@tomweiland
@tomweiland 7 күн бұрын
I'm sorry to hear they didn't listen to you, that sucks!
@AsherKadmiel
@AsherKadmiel 13 күн бұрын
if you weren't planning on making the game too big then you could have just used roblox though i know for the most part that it is hated among quite a few devs but that might have fixed some of your problems
@tomweiland
@tomweiland 7 күн бұрын
I am someone who has a strong dislike for Roblox 😅 I think they're a company that frequently exploits children and their passion for making games, and I have zero interest in being locked into their development ecosystem or in dealing with their predatory payout/payment withdrawal system (it's basically a scam last I checked). Plus, I highly doubt that their multiplayer system would address the issues I was working through in this video.
@realmarsastro
@realmarsastro 13 күн бұрын
The older you get, and the longer you program, the more you realize most programmer memes are made by people who are new to programming. Most of the frustrations of programming come from inexperience, and kind of just go away over time.
@tomweiland
@tomweiland 7 күн бұрын
That's true to an extent, but I've seen and talked to plenty of experienced devs who don't necessarily disagree with the programmer memes, still find them funny, and who will reference/repost them too :P
@user-jy2zn3gz9h
@user-jy2zn3gz9h 14 күн бұрын
Half the time is spent writing code The other half is spent finding that ONE sneaky mistake
@tomweiland
@tomweiland 7 күн бұрын
Maybe even 20%, 80% 😂
@ilikegeorgiabutiveonlybeen6705
@ilikegeorgiabutiveonlybeen6705 15 күн бұрын
idk being a game dev and hating cheaters is like you are a developer and you deliberately choose to work developer near QA office
@tomweiland
@tomweiland 7 күн бұрын
I don't really see the connection 🤔
@ilikegeorgiabutiveonlybeen6705
@ilikegeorgiabutiveonlybeen6705 7 күн бұрын
@@tomweiland like they test whatever vulnerabilities you have in your game and if you fix them it will make your game better. maybe they will point out how games approach to its architecture is totally wrong. e.g. king of thieves game (where you build levels to defend your gold and complete others levels to rob them). devs approach a player verifying if their level is possible to pass by making a player to pass it themselves. and the way they handle it is they let the player complete a level offline (so no lag) and record the completion. so theres a huge insentive to cheat. and as it turns out you can record whatever completion, pass it as a legit one and its very difficult to check on the server side whether whatever arbitrary completion is legit. but can you really say that only cheaters are to blame that this exists and its not the consequence of devs design choices? so if you look at this that way you can interpret cheating as kinda like qa/pentesting/whatever process
@tomweiland
@tomweiland 7 күн бұрын
Sure, having cheaters reveals exploitable vulnerabilities, but fixing said vulnerabilities is only necessary in the first place because people exist who will exploit them (aka the cheaters). Also, even if you consider something like aimbot to be exploiting a vulnerability (server trusts the client's rotation is legit), it's not really like there's much you can do about that. There's no way to verify or enforce that a client's mouse input-and by extension, player rotation-must come from a human controlling a mouse and not some third party software. Also, QA testers are trying to find issues which degrade the user experience so that you can fix them, while cheaters _actively degrade_ the user experience, so I really don't think the comparison makes sense. Even just as a player, I don't like cheaters. 99% of the time they don't have some noble intentions and either just don't care that they're ruining the experience for others, or they actually find joy in that fact. At the end of the day, the fact that people cheat slows down development (teams have to invest more resources into making things server authoritative) and is the reason many games require you to install invasive anti-cheat software. I'm not sure what's controversial about saying I don't like cheaters 😅
@ilikegeorgiabutiveonlybeen6705
@ilikegeorgiabutiveonlybeen6705 7 күн бұрын
@@tomweiland yeah fair
@ilikegeorgiabutiveonlybeen6705
@ilikegeorgiabutiveonlybeen6705 15 күн бұрын
2 days? more like two weeks
@tomweiland
@tomweiland 7 күн бұрын
👀
@WwZa7
@WwZa7 17 күн бұрын
This is actually a great explanation why standing on a vehicle in any multiplayer game like Battlefield series was always normally fine, but when it was moving, things would go spasmatic and probably end in phasing through the vehicle or dying for no reason.
@tomweiland
@tomweiland 7 күн бұрын
Makes sense-as long as it's not moving, you don't experience the effects of objects from different "time streams" interacting. Once it moves though, 💩 hits the fan :P
@7keyz
@7keyz 17 күн бұрын
не терпится поиграть (если конечно игру когда-то доделают)
@tomweiland
@tomweiland 7 күн бұрын
Hopefully one day, but at the moment the project is kind of on hold and I'm not quite sure when I'll get back to it :/
@merccc1
@merccc1 22 күн бұрын
Yea... They should really have network prediction features more thoroughly fleshed out in the modern engines... Such a common thing... I mean, even ue5's own visual scripting doesn't have the nodes needed for it. You have to go some roundabout 3rd party that does it for you.... That or hardcore learn C++ and do that... Have some mental issues that make visual scripting the genuine best way and C++ a nightmare...
@tomweiland
@tomweiland 7 күн бұрын
I haven't really paid much attention to Unity's Netcode for GameObjects development, but I'm assuming they have some kind of prediction/reconciliation functionality in there by now... But yeah, third parties are probably the way to go (unless you have the time and desire to write your own), but they don't usually have visual scripting support.
@creativemind42069
@creativemind42069 23 күн бұрын
I miss you... We all do. I am glad you switched to godot tho and that you are porting this to it. Looking forward to the first devlog in godot.
@tomweiland
@tomweiland 7 күн бұрын
I'm assuming this is a joke lol, but just in case: I have not switched to Godot 😅 I'd like to come back to this project eventually, but I haven't really figured out where it fits in with work and other life stuff.
@creativemind42069
@creativemind42069 7 күн бұрын
@@tomweiland Ya I was joking haha😅 Anyways looking forward to whatever comes next, I hope I can speak for a large part of the community if I say that you inspired a lot of us to strive for great projects. We will not forget your greatness. Good luck with anything you do🤞
@hoveringgoat8061
@hoveringgoat8061 23 күн бұрын
My niave solution is to move the client position x% closer to the server position. It'll be smooth and generally not noticeable unless there's a significant difference. And since it averages the two systems (client and server) should get back in sync. This is mostly theory at this point tho.
@tomweiland
@tomweiland 7 күн бұрын
The problem is that the client is simulating ahead of the server, so if you don't correct fully then your starting point for future tick is still incorrect and will lead to larger divergences more quickly. What you _can_ do is fully correct the player's collider/state, but add a bit of delay to the visual so you can smoothly interpolate to the new position.
@thedude4039
@thedude4039 Ай бұрын
Is the game playable now? Will it ever be playable?
@tomweiland
@tomweiland 7 күн бұрын
Nope, I started working full time last year and haven't really touched this project in a while. I'd like to come back to it eventually, just not sure exactly when...
@matheolefloch3200
@matheolefloch3200 Ай бұрын
thx
@tomweiland
@tomweiland 7 күн бұрын
👍
@MikeMcRoberts
@MikeMcRoberts Ай бұрын
I wonder why this guy stopped doing videos a year ago?
@tomweiland
@tomweiland 7 күн бұрын
I spent several months working on rebuilding the whole project and then started working full time. I'd like to come back to this eventually, just not sure exactly when...
@b3lowtoonatural524
@b3lowtoonatural524 Ай бұрын
Bro why you yapping??
@tomweiland
@tomweiland 7 күн бұрын
Lmao did you click on my video expecting me to not say anything??
@Gromash26
@Gromash26 Ай бұрын
but true and sadly fun
@tomweiland
@tomweiland 7 күн бұрын
Well if it got a laugh out of you, that's a win :P
@Gromash26
@Gromash26 Ай бұрын
damn, that wasn't very motivational
@Jay-Dub-Ay
@Jay-Dub-Ay 13 күн бұрын
Yuh… time to go outside.
@tomweiland
@tomweiland 7 күн бұрын
😔
@vaguephoenix3512
@vaguephoenix3512 Ай бұрын
Your intro is cool
@tomweiland
@tomweiland 7 күн бұрын
You mean the scene with the water? That's from the game I was working on at the time 😅
@therealgator4856
@therealgator4856 Ай бұрын
Im thinking about doing programming moving forward, what hell awaits me?
@tomweiland
@tomweiland 7 күн бұрын
Do it, just don't touch multiplayer for a while, _at least_ until you have a really solid grasp on the language, engine, and other tools you're using :P
@williamcourchane3135
@williamcourchane3135 Ай бұрын
It doesn’t say materials under my assets. How am I suppose to follow help me lmao
@tomweiland
@tomweiland 7 күн бұрын
Then just create a folder and name it "Materials"...? My project already had it because I started from the URP template project, but none of those assets are necessary for you to follow along (for example, which skybox you use is irrelevant). If you created your project using the built in render pipeline, you wouldn't have any of the template assets.
@SoloGameDeveloper
@SoloGameDeveloper Ай бұрын
My game just like chess game multiplplayer
@tomweiland
@tomweiland 7 күн бұрын
Ah that's much simpler :P
@cristalGamer5100
@cristalGamer5100 Ай бұрын
Hi, I thought it would be a bad idea to run the server on unity because it could affect performance, I thought I should use console applications for my server, but maybe it doesn't make sense because I will have to write my own structure of cordinates and components?
@tomweiland
@tomweiland 7 күн бұрын
This heavily depends on what kind of game you're making. For something like a card game that doesn't need physics and can be easily represented by a few classes in your code, a console server would make more sense. However, if you need physics/collision detection, transforms, animations, etc. then running a Unity server is probably the better choice-otherwise you have to implement those things yourself, and if you don't know what you're doing you may very well end up with _worse_ performance. Another consideration is whether or not you care about preventing cheating, because if you don't you can just trust clients to calculate things on their end, and the server can be a console app which just relays data to the other clients. Or you can get rid of the dedicated server entirely and just have one of the clients also act as the server.
@cristalGamer5100
@cristalGamer5100 6 күн бұрын
@@tomweiland I came to the same conclusion when I thought about it. But still, thank you for the answer!
@sxsignal
@sxsignal 2 ай бұрын
interested in how you did they island shading as I like how you have green/dark patches on some aspects that turn flat
@tomweiland
@tomweiland 7 күн бұрын
I just take the grass and stone colors and blend them based on the angle of triangle. The steeper the slope, the more stone colored the triangle will be.
@simonbarton3295
@simonbarton3295 2 ай бұрын
Idea for the underwater effect: close the water body mesh (add sea floor and walls). After the main pass, render this mesh with reversed face-culling and without depth testing. Add fog manually in fragment shader, based on G buffer depth. This also works for other bodies of water, including waterfalls and floating blobs of liquid.
@tomweiland
@tomweiland 7 күн бұрын
Walls would be sufficient to make it work, and it's something I considered but didn't implement yet because currently the water mesh is generated at runtime (and giving it walls would make that more complicated).
@bjarnenilsson80
@bjarnenilsson80 2 ай бұрын
Well if delay was constant It wouldn't by such a pain, but since the internet has multiple opatvhs between 2 points an there are no quarantines that a packet always travels the same path, you get variations in delay (jitter), and since that can't be acutely modeled this is what create headaches for developers and rage quits for players
@tomweiland
@tomweiland 7 күн бұрын
Yes, jitter needs to be accounted for and can cause further problems, but imo the main pain point/problem causer is just that latency exists at all. If I could pick between removing all jitter and removing latency so everyone's connection jitters between 0ms and 20ms or something, I'd choose the latter in a heartbeat :P
@cloudchen0831
@cloudchen0831 2 ай бұрын
You are a hero.
@tomweiland
@tomweiland 7 күн бұрын
😅
@ojtap
@ojtap 2 ай бұрын
i have error at ZipFile 7:00
@tomweiland
@tomweiland 7 күн бұрын
I'm not really sure what you expect me to do about it, considering you've provided zero information about the problem other than that it exists lol 🤔
@boltthejolteon4927
@boltthejolteon4927 2 ай бұрын
I am currently trying to make a multiplayer game on gm2 (matchmaking system) aaand The best way I can describe this so far is I knew what I was getting into but I didn't KNOW what I was getting into.
@tomweiland
@tomweiland 7 күн бұрын
🤣
@jumpod9853
@jumpod9853 2 ай бұрын
The biggest pitfall for indie devs is getting stuck in an 'editor loop' repeatedly playing the game in development mode until they lose interest. Focus on core mechanics and a playable prototype first, then refine the environment and polish later!
@tomweiland
@tomweiland 7 күн бұрын
I more-so fell into the "KZbin trap" where making interesting videos somewhat requires things to look at least half-decent, even during development :P
@W5529RobloxGameDevelopment
@W5529RobloxGameDevelopment 2 ай бұрын
This is why roblox studio is good for beginners I have used unity in the past but switching back to roblox was a life changer development is easy and the way roblox implement multiplayers is so easy to comprehend
@tomweiland
@tomweiland 7 күн бұрын
I would _strongly_ recommend people stay faaar away from Roblox development. It's a predatory company that makes billions by exploiting naive, passionate kids who want to make games. They lure them in with the promise of financial reward, and then even if you manage to make a successful game and get a bunch of Robux, they make it difficult and expensive to cash out and convert it to real money. As far as I know, once you start developing with Roblox you're also quite locked into the ecosystem, and most of your skills aren't really transferable either. Also, I highly doubt that Roblox's multiplayer implementation includes tick accurate simulation and support for prediction & reconciliation...
@Burger650
@Burger650 2 ай бұрын
my game wont run after installing
@tomweiland
@tomweiland 7 күн бұрын
That's unfortunate, but there isn't anything I can do about it with the info (or rather the lack thereof) you've provided.
@dfbxcfb
@dfbxcfb 2 ай бұрын
sir ,may you explain to me that how do your MessageHandler call the method(e.x. [MessageHandler((ushort)ServerToClientId.playerMovement)] private static void PlayerMovement(Message message) { if(playerList.TryGetValue(message.GetUShort(), out Player player)) { player.Move(message.GetUShort(),message.GetBool(),message.GetVector3(), message.GetVector3()); } })how to pass the args to the method without reference?