What Goes Into Making A Multiplayer FPS?

preview_player
Показать описание


Music: Know Myself - Patrick Patrikios

Рекомендации по теме
Комментарии
Автор

Oh my god. It’s glad to see I’m not the only one getting bombarded with technical stuff from other tutorials.

brandondp.
Автор

Garbaj: *is happy a console output happens*
Me, an aspiring Network Engineer: Finally, some Relatable Content™ !

quakr
Автор

When you get into anti-cheat you'll probably find that one of the many methods available to you will be called "sanity checks" (not to be confused with sanitizing user input) and I think they're a lot of fun to implement!

It's basically just the server fact-checking everything the client claims to be happening.
Client says they shot their gun? Make the server first check if the player has any ammo left in their clip.
they do? Make sure the player isn't firing at a higher fire rate than they should (by calculating an average over a period of time because sometimes varying network latency can cause inconsistencies in shots coming from the player that need to be accounted for).
They aren't? Make sure the target they claimed to hit is in line-of-sight (by casting a ray from where the client claimed to shoot from to where the client claimed to hit its target and make sure these points that the client claims it was at and its target was at are within a margin of error of where the server understands them to actually be, that way players can still hit a target that may have just ducked behind cover but wasn't when they shot them, but still can't shoot a target that is on the other side of the map by shooting through the entire map).
They are? well then deal the damage!

You can do these checks for tons of stuff and they severely limit the advantage cheaters can gain by hacking. With really good sanity checks in a simple shooter, you can pretty much reduce a cheater's advantages to aim-bot, x-ray, and macros before you need more active anti-cheat to stop them. Without these sanity checks? Well, cheaters are flying around the map, teleporting, and shooting everyone with insta-kill lasers through all obstacles.

pchris
Автор

"Is spending 16 months on an fps alot?"
"Depends on the context."
"Singleplayer? Yes."
"Multiplayer? No."

sibottle
Автор

Almost every multiplayer system uses a client-server model, very few use 'true' peer to peer (Rockstar's RAGE engine is a notable exception). P2P in game networking usually still refers to a client/server model, but with one player acting as the server (i.e. a listen server) where they act as both a client and server - as opposed to a dedicated server, which has no player input.

daveface
Автор

Thanks for the shoutout Garbaj I really appreciate it! I've been subbed to you since you were at 6, 000 subs and I've learned a lot from your tutorials especially now when I'm trying to do more things with 3d games. Can't wait to see more of your content and also welcome to the multiplayer world where everything is pain and suffering to implement lol.

rayuserp
Автор

Great work, I would like to see the future of this project!
I'm just gonna lay some general anti cheat advice in case anybody is interested on making a commercial/competitive game.
For security measures it's always better to handle that on the server side. Players can always send modified packets to the server without the client itself.
I have worked on some multiplayer games before using a different game engine, and the best advice I can give you is try not to send things like positions from the client to the server, Instead the client should send inputs only and the server will move the player.
For example : when you press the W key, send a command to the server telling him you pressed that key, the server will move the player and send the new position to all other clients.
Lets say that a hacker managed to reverse engineer the game and has access to the move function on the client, If the function sends the position of the player, the hacker will be able to send that function to the server with any position he wants leading the player to teleport all around the map... The same logic applies to gun damage, score, health ..ect.
On the other hand, If you're only sending inputs to the server, the best thing a hacker can come up with is a Bot or a macro that plays by itself since it can only send legitimate inputs with no parameters.
Of course anti cheating is a large topic and I'm by no mean a security expert, but this is just an advice that really helped for my own projects and it is something that you should consider from the early stage!
Good luck to everyone!

RealRedXGames
Автор

My guess at the easiest way to combat the most basic cheats, is instead of sending exact actions and coordinates from the client, send the players input actions instead, those get processed by the server, and the client handles it's own simulation of those input actions for smoother controls, then synchronizes periodically with the server.

Your server should always have the final say in the players actions.

Jofoyo
Автор

That's great work. Keep it going would love to see more advancements in this project

xegrand
Автор

What helped me with understanding multiplayer was, surprise surprise, the Godot manual! I already had some (bad) experience with Unity networking, so I was a bit hesitant trying it in Godot, but it turns out it was a lot less hassle than I first assumed.

Also, for anyone starting to do networking in games, DO NOT BOTHER WITH ANTI CHEAT FOR NOW! Preventing cheats is a super complex endeavor, and will suck all your motivation out of your project long before you even get it to be fun in the first place. Get your game working and feeling good first, think about anti cheat later, if you even deem it necessary in the end.

felineentity
Автор

THE KING BESTOWS HIS WISDOM UPON US BLESS HIM

colly
Автор

Looking awesome!!
I've always wanted to do 3D multiplayer, just haven't gotten into it yet.
Glad to see you make some progress on a 3D multiplayer game.
Anyways, good luck man, I'm excited to see your progress in this!

PlugWorld
Автор

Garbaj Anticheat (patent pending) will probably still be better than VAC

S
Автор

Yes thank you, I've been struggling so much with this lately I wish there were more tutorials on client server multiplayer

CrypticDevGames
Автор

One thing which could greatly benefit with in a form of anti-cheat is something which they call "client-server predictions". What you essentially do is instead of sending over the direct position of the player and letting the server accept it, you send over the information in which state the player is in (Moving, jumping, etc etc). What you then do is calculate the new position of the player on both the client and the server and compare them on the server! If the difference is too big then something has gone wrong and the player could be cheating (or experience lag)

zyrk
Автор

I'm going to make soon a FPS as well on Unreal Engine, and this video just got recommend!
I know it's Godot, but thank you for the video!

MekaniQ
Автор

thank you so much for inspiring me to jump back into game development <3
i've been having a blast

SAYHIJAMMY
Автор

Oh hell yeah, Godot is such a good game making engine!
I have used it a bit but never finished a game with it before

Dun-N-Dusted
Автор

3:13 gun on the left syncs with the music.

minutesock
Автор

Thankyou for making this vid I have workingg on a FPS game called:State of Magic
The guns has many amazing skills and also the characters they all have powers.

justcloud