Godot Multiplayer Tutorial – Server-Side Collision Detection | Godot Dedicated Server #18

In this Godot Multiplayer Tutorial, I will teach you how to set up server-side collision detection in your multiplayer game!

After this Godot Multiplayer Tutorial, your attack functions will be migrated to the server entirely. By removing any possibility of player intervention, your Godot Multiplayer games are much less exploit prone.

Part 17 in which we created the server-map:

0:00 Intro
0:16 Removing Old Client-Side Functions
3:50 Removing Old Server-Side Functions
5:51 Setting up Server-Side Collisions
10:21 Addressing Sync Artifacts
11:55 Demo
13:02 Outro

⬧⬧⬧⬧⬧ GDC TUTORIALS ⬧⬧⬧⬧⬧
I believe educational material should be available to all, for free
Support this vision by joining the GDC-Club and get perks in return

These books have helped me in my game design and programming, I whole fully recommend them to you!
Level Up! The Guide to Great Video Game Design ►► https://amzn.to/3hIg6dE
Game Programming Patterns ►► https://amzn.to/35IoDsH
The Art of Game Design: A Book of Lenses ►► https://amzn.to/35MSHoU

⬧⬧⬧⬧⬧ LIVESTREAMS ⬧⬧⬧⬧⬧
I Livestream game development twice a week right here on YouTube.
Subscribe and hit that Bell Icon to make sure you don’t miss it!

Tuesday and Thursday
1900 to 2200 (GMT+1/2 (winter/summertime), that’s;
1200 to 1500 (PST), or
1500 to 1800 (EST).

⬧⬧⬧⬧⬧ COMMUNITY & SOCIAL ⬧⬧⬧⬧⬧
Join the community! Follow me on Social!
DISCORD ►► https://discord.gg/DwcFXyS
TWITTER ►► https://twitter.com/GamedevStefan

⬧⬧⬧⬧⬧ ABOUT GDC ⬧⬧⬧⬧⬧
GDC, Game Development Center, was created to provide in-depth tutorials on game design theory and game development using the Godot Game Engine. I aim for multi-part Godot tutorials, allowing me to dive deeper into Godot’s features.

⬧⬧⬧⬧⬧ ASSETS USED ⬧⬧⬧⬧⬧

PNG Trees Collection

⬧⬧⬧⬧⬧ DISCLAIMER ⬧⬧⬧⬧⬧
Some of these links go to one of my websites and some are affiliate links where I’ll earn a small commission if you make a purchase at no additional cost or disadvantage to you. You will receive the same price and service.

12 thoughts on “Godot Multiplayer Tutorial – Server-Side Collision Detection | Godot Dedicated Server #18

  1. Curious, when it comes to the ice spear on the client, when the spear detects the body of the Werebear and you have its collision disabled, it you wanted to have an effect like a blood splatter, would you have this animation play on the client as soon as the spear detects the body of the Werebear, or would you wait until damage has been verified by the server and then sent back to the client and then run the animation? Is it a possibility that the spear really missed on the server so there would be no spear hitting Werebear and therefore the blood spatter animation is running when it is not supposed to.

  2. Im glad you decided to stop at this point because devs will need to implement a lot of custom things on their own. Very smart and long term helpful for all of us, thank you very much 🙂

  3. Can this be used to process all physics on the server and then "multicast" the 3D visuals to multiple clients, which all show the same "map"? No matter which client starts the attack, all clients see this attack.
    And, of course, all players are controlling the same player in my example.
    Is this possible at all?

  4. Hi Stefan, sorry to bombard you with questions but… my game is PvP therefore I need to implement collision detection for my players in the GameServer. In order to do this I am thinking:
    1. Create a physics_process in the GameServer map – similar to the one on the client side map.
    2. That physics_process does not need to sync a clock (clients do that) but still needs to use the interpolation factor or else the GameServer would be detecting collisions 100msecs in the future
    3. I can use this GameServer physics_process to set when my player bullets spawn in time with the 100msec offset.

    Does that sound like the correct setup to you, or am I going down the wrong track somewhere?

  5. I've been following your tutorial and how I have an issue and hope you are going to make another tutorial about dealing with it:
    So the game is smooth when you have low latency, when players have latency 150~250, I observed the console and see that, when we have high ping, this is when the Extrapolation comes for rescue, the glitchy movement begins like it teleports back and forth continously.
    I saw some online game it LOOKS smooth even with latency of 200. I know 200ms is a big delay however, is there away to make the movement only looks smooth?

    It would be nice if I can connect to you via Discord and show you the problem with video.

  6. Thank you a lot for the hard work helping us. I followed all weeks the tutorial and it seems a unhackable multiplayer game now!!
    I hope I can show my progress in discord

  7. Top notch quality content! I'm a little sad that this is one of the last tutorials on the series but it's totally understandable as you explained. Thanks for you efforts man! 😀

Leave a Reply

Your email address will not be published. Required fields are marked *