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.
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.
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!
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?
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
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
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.
Thanks, this is a really cool idea. I might look into it in the future.
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.
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!
Thanks, it can be so hard to keep the rhythm up sometimes. Keep at it 😊
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?
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
I wish there was a way to implement arms with this code
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.
So classes are something like: ScriptableObjects in Unity?
no, classes are classes
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