Тёмный

Using Composition to FINALLY Make A Shotgun in Godot 4 

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

To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/ChaffGames . The first 200 of you will get 20% off Brilliant’s annual premium subscription.
Composition is a Powerful Tool that you can use to make a Shotgun in Godot 4. This week we're finally looking at using the power of Composition to create a Shotgun in Godot 4. Regular Ray Cast weapons only require 1 or 2 hit scans to determine a hit where as a shot gun requires 9-12. We're going to utilities the concept of Composition to refactor our project to accommodate the need to do 9-12 ray cast to create the shotgun effect.
Support the Channel: / chaffgames
Join The Discord: / discord
My Latest Course: www.udemy.com/course/building...
Get the FPS Template Here: chaffgames.com/fps-game-templ...
Need More Juice? Get the FPS PRO Template: chafmere.itch.io/godot-4-fps-pro
---------------------------------------------------------------------------------------------
My Set Up:
VO Mic: amzn.to/3QfnL6d
Audio Interface: amzn.to/46MFidg
CloudLifter: amzn.to/49dMUqE
Camera Mic: amzn.to/4980cFh
Case: amzn.to/46JiTxi
CPU: amzn.to/471Jeah
GPU: amzn.to/3si8r0G
Keyboard: amzn.to/3tPL6nC
Mouse: amzn.to/46KhM0h
As an Amazon Associate I earn from qualifying purchases.
----------------------------------------------------------------------------------------------
Please like and Subscribe! It's truly appreciated
#GameDevelopment #GameJam #Godot
Links to my Socials
Instagram: / chaff.dev
Twitter: / chaffdev
Itch.io: chafmere.itch.io/
Website: chaffgames.com
This video was sponsored by Brilliant

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

 

11 янв 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@Chaff_Games
@Chaff_Games 6 месяцев назад
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/ChaffGames . The first 200 of you will get 20% off Brilliant’s annual premium subscription.
@w花b
@w花b 6 дней назад
I ran into the same issues about empty exported variables and all these things I went crazy. Byt then I remembered it's fine for it to be a bit dirty if it's for a game and not a template.
@n41sd
@n41sd 6 месяцев назад
Funny, I didn't know that name, but I coded my weapons system exactly that way. It makes expanding a lot easier, I even created a base class that controls all the items, where I leave the 3D model scenes, icons, name, description, it helps a lot! Other than that, great video as always!
@BlueAvi8
@BlueAvi8 5 месяцев назад
yes, realistically, shotguns are very lethal (with one shot) at 30m, and the pellets can kill out around to 100m, though at that range they have slowed down significantly and have spread enough that one pellet hitting a man sized target would be considered a maybe.
@gorrrroto
@gorrrroto 6 месяцев назад
Still haven't gone through the entire video but I actually gave it a shot to make my own weapon manager from scratch last year and came up with a fairly clean solution so i thought i'd share it! It is true that i made it in 2d so not exactly the same but i think some concept would translate very effectively. The main thing to consider is that i did not have a shotgun class perse; i had automatic fire, semiauto and manual classes but other than that everything was the same, i also didnt't have hitscan weapons son that simplified it a bit. Now for the interesting part; every weapon had a bullets_per_shot variable and a spread_angle variable. Everytime a shot was called the direction angles of each bullet(the raycasts in this case) where randomized withing the spread angle range, this process was put into a for loop that repeated for the amount of bullets in the shot. This made really easy to implement a shotgun, high spread angle high amount of bullets but it was equally easy to make a pistol, very low to none spread angle and just one bullet. If anyone is interested on the code i can send it via email or whatever, fair warning it's very messy, it was my first project but still i hope it can help someone
@notimportant3033
@notimportant3033 6 месяцев назад
(2:11) LOOK MA I'M ON TV And yes, a tutorial going more in-depth into this would be great.
@biglootums5243
@biglootums5243 6 месяцев назад
Always encouraging to see people making cool stuff like this in Godot. Keep up the great work!
@amirosman8797
@amirosman8797 6 месяцев назад
Looks amazing, a tutorial will definitely be great help
@user-qv1vl8bn2m
@user-qv1vl8bn2m 6 месяцев назад
Finally a new shotgun spread tutorial, very nice
@stickguy9109
@stickguy9109 6 месяцев назад
This is a perfect use case for interfaces.
@wherearemypants2213
@wherearemypants2213 6 месяцев назад
Congrats for the Brilliant sponsorship !
@wimdyslim
@wimdyslim 6 месяцев назад
Shotgun spread in videogames is one of those things that gets on my nerves, so hearing you say 30m is not very realistic for shotguns is funny, because actual shotguns have a pretty tight spread, and can be lethal out to 50m to 75m. So comparatively, its pretty realistic, especially if its a rather short barrel shotgun with no choke. Anyway, great video!
@Chaff_Games
@Chaff_Games 6 месяцев назад
Yeah, the lethal range IRL is way higher. After making one in game i kind of understand why it's so different in video games, it would be very op.
@JoeCentralGaming
@JoeCentralGaming 6 месяцев назад
Best channel for godot !
@user-fn7ep1te3c
@user-fn7ep1te3c 6 месяцев назад
I got stuck because I can't pick up things like key, I want to learn pick up system
@archieh-d1828
@archieh-d1828 6 месяцев назад
Alternatively, you could also just make every shotgun only fire slugs.
@Chaff_Games
@Chaff_Games 6 месяцев назад
Yeah that’s totally fine too.
@yee2343
@yee2343 6 месяцев назад
Will there be a more in depth video? Feels like you sorta glossed over everything but good none the less.
@Chaff_Games
@Chaff_Games 6 месяцев назад
Yes, kind of torn on presentation but hopefully next week full tutorial. And I’m also considering a from scratch video as well. Since the weapon manager is a bit of a beast at this point.
@yee2343
@yee2343 6 месяцев назад
@@Chaff_Games yeah, I feel you. It’s probably really hard to be entertaining while also being in depth about this stuff. I will say though, you were really good at being entertaining this video! I do hope for a in depth about the shotgun cause for some feedback these are somethings you didn’t talk about the last video which made this video a bit confusing: recoil, what node the projectile code was on, and spray. using the template you provided I noticed that for the weapons resource code get_point_count() is on a base Nil. If you’d like. I can provide screenshots!
@xyonblade
@xyonblade Месяц назад
shotguns in video games are often disappointing compared to real shotguns, or so I hear, being that "pellets" are not the only type of shotgun.
@Chaff_Games
@Chaff_Games Месяц назад
I agree. there’s a really good video out there explaining why. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gJ5xDfIjjKQ.htmlsi=MnQbvyijAYqCLBoz
@Boildroid
@Boildroid 6 месяцев назад
this is cool. For spread pellets i used math but it get worse.
@Chaff_Games
@Chaff_Games 6 месяцев назад
I avoid math at all points haha.
@Boildroid
@Boildroid 6 месяцев назад
@@Chaff_Games Deus Ex MD devs get circle and pellets flies randomly inside circle
@OverloadPlays
@OverloadPlays 6 месяцев назад
Yooo
@TheGobou77
@TheGobou77 6 месяцев назад
am i the only one that code in a fucked up way ? i don't even know if what i do is composition. but i sure don't use inheritence. and yes, it's basically a 500 lines code for a node, this node pocess an other node with 300 lines code, which then set up projectiles, which will set up explosion. the explosion can be setup by anything if i decide (melee, laser, self-destruct if i want) i'm making a 2d game with godot 3 :/
@TheGobou77
@TheGobou77 6 месяцев назад
correction, i have over estimated the size of my code 250 lines and 200 lines
@Chaff_Games
@Chaff_Games 6 месяцев назад
I think if it works, it works. I wouldn’t stress too much. For my project this is what I needed.
@user-fn7ep1te3c
@user-fn7ep1te3c 6 месяцев назад
Please reply me! Hey chaff would you help me. If we use navigation enemy automatically finds us but I don't want it.i want that when my player enters enemy's area enemy should follow and hit the player
Далее
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 480 тыс.
Фонтанчик с черным…
01:00
Просмотров 1,9 млн
One moment can change your life ✨🔄
00:32
Просмотров 10 млн
One Week of Learning Game Dev in Godot
15:27
Просмотров 32 тыс.
The FUNNIEST new feature in Godot 4
5:57
Просмотров 142 тыс.
The Flaws of Inheritance
10:01
Просмотров 910 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 247 тыс.
The 7 MOST Useful ADDONS for Godot 4
4:05
Просмотров 20 тыс.