Classes In Godot Are Amazing!

  Рет қаралды 24,251

Chaff Games

Chaff Games

2 жыл бұрын

Support the Channel: patreon.com/ChaffGames
Check My New Course : Check My New Course : www.udemy.com/course/building...
Get the FPS Template Here: chaffgames.com/fps-game-templ...
Hi Guys, how’s it going. I’m back with another video to show you something else that I’ve done with my FPS game to make things a bit more streamlined and hopefully speed up development in the future.
One of the things I knew early on in my game is that I wanted it to be easy for my add weapons to my game.
I didn’t know (and still don't) how the final product will look. So I wanted to be able to swap in and out weapons easily without having to worry about re writing the code base every time.
So it was off to research classes in Godot and how I can leverage this feature to make swapping guns as easy as changing the mesh.
So what is a Class. A class is an extensible blueprint for creating objects, providing initial values for state and implementations of behaviour.
Follow Along to Find Out more!
Please like and Subscribe! It's truly appreciated
#GameDevelopment #GodotTutorial #Godot
Links to my Socials
Instagram: / chaff.dev
Twitter: / chaffdev
Itch.io: chafmere.itch.io/godot-fps-co...

Пікірлер: 12
@ceredev
@ceredev 2 жыл бұрын
Super cool! May I suggest something? If every weapon has the same attributes in the class, instead of extend the weapons you can use a Resource which will tell to the instantiated class which data read. For example: you can have a rifle and a pistol. The difference is the cadence and the spray, so you can use the same class, but having two Resources: one containing the Pistol info and other one the Rifle info. In that way you can split behaviour and data, making it more flexible.
@Chaff_Games
@Chaff_Games 2 жыл бұрын
Thanks, this is a really cool idea. I might look into it in the future.
@Gabu_
@Gabu_ 2 жыл бұрын
I'll second this, and wholeheartedly recommend anyone watching this tutorial to look into using custom resources wherever applicable. The editor UI is still a little clunky when it comes to generating new custom resources, but that's easily overlooked when considering how much decoupling data from behavior speeds up the whole design-to-implementation process.
@chance_E
@chance_E 2 жыл бұрын
Nice, I like Godot for these reasons as well. I've been making videos on Godot too. Been slacking lately because of school, but trying to get back into it. Really good video!
@Chaff_Games
@Chaff_Games 2 жыл бұрын
Thanks, it can be so hard to keep the rhythm up sometimes. Keep at it 😊
@hery8148
@hery8148 7 ай бұрын
if I've understood correctly, classes simplify the definition of certain functions, such as damage, and extends define what the node's inheritance represents. But if I make, for example, a knife, a pistol and a rocket launcher, how do I make knockback, damage and ammunition different and define them as inventory items for certain characters? Or for characters with different abilities and weapons, for example a normal speed sniper who climbs and a slow warrior with a charging minigun, do I have to make a specific class for each character class? And is there a difference between doing it online or solo?
@Chaff_Games
@Chaff_Games 7 ай бұрын
Watch my video on resources and perhaps even my full tutorial on an fps weapon manager. I use resources almost exclusively for all of this stuff now as it handles these kinds of things much easier
@MaoXP
@MaoXP Жыл бұрын
I wish there was a way to implement arms with this code
@Chaff_Games
@Chaff_Games Жыл бұрын
Hey, yeah. Earlier this month I started working on arms and it's a completely different workflow 😣. I'll need to post a new video at some point.
@Szabbyhun
@Szabbyhun Жыл бұрын
So classes are something like: ScriptableObjects in Unity?
@quirkyzigzag
@quirkyzigzag Жыл бұрын
no, classes are classes
@quirkyzigzag
@quirkyzigzag Жыл бұрын
scriptable objects are objects that are scriptable, I guess you can compare them but classes are not a new invention, in unity you can make a gameobject that derives from a class
How to use Classes in Godot! - Intermediate Tutorial
8:46
Queble
Рет қаралды 4,8 М.
Signals in Godot are Amazing!
5:17
Chaff Games
Рет қаралды 25 М.
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 30 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 161 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 490 М.
3 Devs Make An FPS - Godot vs Unity vs Unreal || GameDev Battles
12:39
Godot 4 - Tiled Dungeon Environment From Scratch
26:24
DevLogLogan
Рет қаралды 395 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Build Highly Scalable GODOT Games in Under 10 Minutes!
9:40
Andrew Hoffman
Рет қаралды 48 М.
I Used Godot For 100 Hours, Here’s What I Learned
35:09
LazyAlarm
Рет қаралды 1,1 МЛН
The Best FREE Software for Game Development! (In my Opinion)
11:06
ИГРАЮ ЗА ОТЦА 😱 В SchoolBoy | SchoolBoy Runaway
19:56
ЛИГЛЕЙЧИК
Рет қаралды 1,1 МЛН