Тёмный

How to Make Perfect Spray Patterns/Recoil in The Godot Game Engine: Multiplayer FPS #2 

Chaff Games
Подписаться 7 тыс.
Просмотров 5 тыс.
50% 1

Support the Channel: patreon.com/ChaffGames
Check My New Course : www.udemy.com/course/building...
Get the FPS Template Here: chaffgames.com/fps-game-templ...
Perhaps you've noticed how unrealistic it is to have a laser weapon. Tackling spray patterns was one of the first things I did after getting the basics up and running.
When I was designing my FPS controller the first gun I added after the pistol was an m16 or AR of some kind. It was the first time working with an automatic style weapon and it became painfully obvious early on that without recoil or spray patterns a hit scan weapon just isn’t fun.
Hitscan weapons have no lead time, the minute you pull the trigger a hit is registered where ever it lands. Which is fine for a video game. But with no spray or recoil it makes it a lot harder for the person being shot at to avoid anything.
In my opinion a spray pattern that travels in a straight line isn’t as interesting or challenging to control. And if the pattern is too random then it’s frustrating if you miss your shots. Since you have less control. Recoil is only fun if the player can master it.
Please like and Subscribe! It's truly appreciated
#GameDevelopment #GameDev #Godot
Links to my Socials
Instagram: / chaff.dev
Twitter: / chaffdev
Itch.io: chafmere.itch.io/godot-fps-co...

Игры

Опубликовано:

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@lorenzopandolfo5358
@lorenzopandolfo5358 Год назад
this video is awesome! Thank you so much for sharing this content. I am learning godot and Im pretty new to It and your video helps me a lot! :)
@_theHUMUNGUS
@_theHUMUNGUS 2 года назад
lol at your opening statement. I had a wild inclination to make a shooter in godot and recoil/spread was the very first question in my mind
@embersworkshop
@embersworkshop 2 года назад
Really cool! I just got back into CSGO, and I wondered how you might do it. I thought for a second you might do some sort of bitmap image, but actually just a series of additive direction vectors makes sense. Thanks for sharing the source too!
@Chaff_Games
@Chaff_Games 2 года назад
I looked online to see if there was documentation on how valve does theirs but I couldn't find anything. I feel like there could be a more user Friendly way of doing it. Like maybe a path that the guns would follow or something? It would be better if it was visual like a bitmap as well, since you could actually see where the next shot would go.
@oldfallstorm3064
@oldfallstorm3064 2 года назад
Very useful!
@ericweatherby9628
@ericweatherby9628 2 года назад
Hmm. I would generate spread with a Gaussian distribution for distance from aim point and a flat distribution of direction from aim point. For automatic weapons, I would increase the value of distance during automatic fire and consider also pushing the camera up with each shot so the player has to counteract the climb by moving the mouse. Of course, there's lots of ways to do it and there's no single right decision on either the right balance between gameplay and "realism", or the right way to implement what you decide to do.
@Theraot
@Theraot 2 года назад
A few observations: - Doing h*h will - marginally - perform better than pow(h,2). Of course, performance is not critical here. - I think there is a typo in SpayScale, I'll assume it was meant to be PrayScale - You can do Vector2(SprayScale+Mod, h).length() and that is your Pythagoras. And again will perform better, since most of the math is on C++. Vector2 is a value type, by the way.
@Chaff_Games
@Chaff_Games 2 года назад
This is awesome advice. Thank you 😊
@mnoble5406
@mnoble5406 2 года назад
Interesting, I would have kept the random aspect, but use circular coordinates and parametrize the probability density for the radial component to have it depend on weapon parameters. Then, the probability density can change over time, and the spread can decay when not shooting. Additionally, one could implement some linear drift. I find it irritating that your spray increases infinitely.
@Chaff_Games
@Chaff_Games 2 года назад
That's a really good idea. It was my first crack at coming up with a system and it will probably change of the course of the project.
@mnoble5406
@mnoble5406 2 года назад
@@Chaff_Games It is a good first approach. My suggestion is a tad more mathematically advanced, but still manageable with basic calculus.
@Dragon20C
@Dragon20C Год назад
thats very cool, can you do a tutorial about the feel instead, from looking at the csgo portion of the video the camera seems to have some shake and maybe faster weapon animations, I would love a shooting feel tutorial!
@Chaff_Games
@Chaff_Games Год назад
Hey, I'm currently working on a full set of tutorials for a weapon management system. Which will include setting up spray, I've finished working on the basics and spray will be in the second set. I work pretty slow so it will probably be towards the end of the year.
@Dragon20C
@Dragon20C Год назад
@Chaff Games that's nice to hear, keep up the good work!
@stupidmemer08
@stupidmemer08 2 года назад
best
@DePistolero
@DePistolero 5 месяцев назад
Why not use curves? And you just ad a little randomnes...
@Chaff_Games
@Chaff_Games 5 месяцев назад
This video is really old. I use path2d now. Which works really well.
@DePistolero
@DePistolero 5 месяцев назад
@@Chaff_Games hey thanks for the reply, I'm a unity fallout dev... starting godot now... it looks extremely promising so far.
@PhantomAgentPlaysPhantomForces
@PhantomAgentPlaysPhantomForces 2 месяца назад
me just using a random value
@Chaff_Games
@Chaff_Games 2 месяца назад
Which is totally fine btw.
@PhantomAgentPlaysPhantomForces
@PhantomAgentPlaysPhantomForces 2 месяца назад
@@Chaff_Games Thanks for replying lol
@PhantomAgentPlaysPhantomForces
@PhantomAgentPlaysPhantomForces 2 месяца назад
@@Chaff_Games and btw its a realistic game so i thought i would just do that
@Chaff_Games
@Chaff_Games 2 месяца назад
What is reality anyway.
@PhantomAgentPlaysPhantomForces
@PhantomAgentPlaysPhantomForces 2 месяца назад
@@Chaff_Games how the ever living f*** did u respond that quickly
Далее
Using Composition to FINALLY Make A Shotgun in Godot 4
10:23
Lasagna Soup @Lionfield
00:35
Просмотров 4,6 млн
Classes In Godot Are Amazing!
19:22
Просмотров 23 тыс.
How (Not) To Pick Up Weapons in the Godot Game Engine
6:40
What does a Game Engine actually do?
16:45
Просмотров 142 тыс.
Making Spray Patterns for My FPS Game!
9:47
Просмотров 2,9 тыс.
A.I. Learns To Walk
16:15
Просмотров 10 млн
Assault Rifle (Godot FPS Tutorial)
6:41
Просмотров 73 тыс.
СТРИМ ► Elden Ring - Shadow of the Erdtree #8
2:28:11
Сумерки сасага🧛
11:41
Просмотров 1,1 млн
skibidi toilet 76 (part1)
3:10
Просмотров 9 млн
БЕЗГРАНИЧНЫЙ КОНТРУДАР - Nine Sols
44:34
ВСЕ ЛАМПОЧКИ ПРЕДАЛИ МЕНЯ!
41:51
Просмотров 196 тыс.