If it's just for a coop / non competitive game I recommend not using any lag compensation and just make the client authoritative instead. I've tried Netfox which is a great tool but it can also be hard to use and you have to refactor your whole code for rollbacks to prevent desync which can be really confusing and maddening sometimes. Also important note when working with CSP/Rollback you really need a tool to simulate latency like Clumsy which allows you to detect desync without having to connect to a friend that lives across the planet
Yea, if it's not going to be a competitive game and you're just playing around with friends where cheating isn't a concern, you can totally get away with client authority over the whole player object. Good tip on using Clumsy, I need to find a Mac version of that!
@RabidTunes no, client authority is when you set something that the player has control or authority over, meaning, it tells the server the state, not the server telling the client. Generally, you assign client authority over player input. Spawner should be server authority, Synchronizer can be set to client auth for input, or over the whole player if that’s what you want. I talk more about it in the first part of this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-coODimFW3M4.htmlsi=pHS8MUBeWrFlMDtY
Incredible! Finally, something that genuinely makes a difference. I've been waiting for you to cover this topic for some time. While I haven't watched this video yet, I noticed you implemented Netfox alongside the "project with Steam support using the Steam Multiplayer Peer extension." I skipped that particular video due to my lack of interest in P2P setups. My focus is primarily on client-server architecture, where the game server is hosted online on a dedicated server or VPS. My question is: does this video specifically focus on using Netfox with the P2P "Steam Multiplayer Peer extension," or can I also apply the concepts from this video to integrate Netfox into a client-server online game architecture?
It does NOT depend on P2P at all, I don’t even touch on Steam here. Towards the end I demo a dedicated server setup using AWS, so I think this will work for you!
Yea... so that's going to take some work, and there's a conversation within the Netfox circles that they may create this. If that happens, I'll likely cover it!
Great video, it really helped me a lot and I managed to learn a lot, thank you very much. I know it's not the focus, but I'm creating a turn-based game, and I would like to know if there are good practices for turn control, I read a lot on the internet, and I didn't find anything specific and each approach was very particular. I would like to know if you know of any good framework to follow that will at least guarantee that by following such practices, I won't have many problems.
Great to hear! I'm not sure off the top of my head, but you're basically making a state machine - Who's turn is it? What did they play? What effects did it have on game state? Maybe someone else who's got experience making turn based games can weigh in, but I don't think it should be too bad! I can also add that to the queue!
@@BatteryAcidDev That's right, that was the approach I followed, but I was unsure if this would be viable, and if it were to be scaled, as the limit is 4 people per table, but having several different tables. So I was unsure whether delegating this control just to the server would be viable.
I love these video's, but i'm not sure teaching people to just lean on plugins in lieu of the actual code skills required to do the compensation yourself. What happens if we hit a problem with a plugin? Or the plugin gets deprecated? Where should we go if we have to learn to code it ourselves from scratch?
Cheating is going to be a bigger problem when you give authority over the entire player object. This approach does NOT do that, we only give client authority over the inputs. So you should be fine. I believe my reddit post was referring to a different setup. Let me know if you need some more clarification!
This kind of content is invaluable! Godot lacks a lot of good multiplayer tutorials, and yours is top notch! Thank you so much for posting it for free to everyone 🎉
This is actually the gold standard for fps games, only really fighting games use rollback because they have only 2 players and very deterministic gameplay. And RTS uses lockstep network code.
Yes, for FPS the client side prediction and server reconciliation is, but this implementation itself may not be ready to handle a fast-twitch based game.
Client side prediction and server reconciliation should work fine for a racing game. Netfox should work out of the box, but there may be some improvements to it that you'll notice once you get into it. I'll try to post some more links to this later! Also drop by the discord for more info!
I’ve got a couple videos on that, start here with the fix: A Better Dual-Raycast Collision Detection Strategy ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sZB9J6g4_q0.html
That would all depend on your disconnect functionality. Right now he probably just stays there because I didn't handle such a case (I don't think), but you can make this work however you'd like.
This sounds similar to the implementation that Snopek Games is working on: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-zvqQPbT8rAE.htmlsi=1Y0t-LJRQTYZEuqg
I thought client-side prediction was used for twitch-based shooters and fast paced games? Maybe I misheard you, but if not, what sort of algorithms do you want to use for FPS?
I think it CAN be made to work for that, but Netfox's implementation isn't really geared for it. You'd probably have to implement that algorithm using lower level networking yourself or maybe find another implementation with support for that game style. I guess you could try it and see what happens...
Absolutely, but there are some limitations using Godot as your matchmaker and also your game server, generally you'd move the matchmaker system to some other service hosted separately from your game's server. I mean, if you're looking to support only a few players, I guess that could work. There are 3rd party services (some which I'll be reviewing) and more manual approaches like what I did for my matchmaking setup using AWS, for that, see playlist here: ru-vid.com/group/PLOtt3_R1rR9WrcyDRsRF3oSrzffmBtJbu
@@BatteryAcidDev That's what i was struggling from couple of days now. But yesterday i found your channel and also found some hope :) . If possible in coming days try to upload something similar to matchmaking.
Hello. Please tell me how to organize the working windows in Godot so that they are like yours: an "Inspector" next to the "Scene". Thank you. A video on this topic would also be nice.
So there are little stacked 3-"dots" around the Godot editor that when you click on, it will show which panel you want that menu to exist in, so just select the area. Once you have it set the way you want, use Editor -> Editor Layout -> Save Layout so you can quickly setup any project.