Тёмный

Classes In Godot Are Amazing! 

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

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...

Игры

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

 

24 дек 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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
Далее
Using Composition to Make More Scalable Games in Godot
10:13
How to use Classes in Godot! - Intermediate Tutorial
8:46
Прятки #nyanmp3
00:25
Просмотров 755 тыс.
Signals in Godot are Amazing!
5:17
Просмотров 25 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 247 тыс.
I Optimised My Game Engine Up To 12000 FPS
11:58
Просмотров 587 тыс.
How To Make A Doom Clone In Godot 4
27:57
Просмотров 68 тыс.
How to Build a Modular Ability System in GODOT
12:46
Просмотров 39 тыс.
4 Godot 4 Devs Make 4 Games in 44 Hours
25:19
Просмотров 489 тыс.