How to make better games using Curves in Godot | Game Dev Tutorial 6
Вставка
- Опубліковано 10 лип 2024
- In this video I'll land a SpaceX Falcon 9 rocket to show you how you can use Godot's Curve Resource to make better games. Also, at the end of this video is a sneak peek at my new game prototype, Project Root. Questions and Suggestions are always welcome in the comments. I'll do my best to get back with you.
Dave the Dev's Tutorial Project GitHub Repo: github.com/DaveDaDev/Godot-Tu...
Webpage: EXPWorlds.com
Twitter: / exp_worlds
Music from UA-cam Audio Library
Rubix Cube by Audionautix is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
Artist: audionautix.com/
Song: Night Snow
by: Asher Fulero
/ @asherfulero - Ігри
This was very helpful!
Also, for folks missing the interpolate function, in Godot 4, the "interpolate" method has been renamed "sample"
For me I need to reload my scene to see changes in Godot 4… is that a bug or am I doing something dumb?
For a project I'm doing using from another tutorial I coded
var power_factor = power_curve.sample_baked(rpm_factor)
I get the error message Parser Error: Cannot call non-static funcion "sample_baked" on the Class Curve directly. Make an instance instead.
I have no clue what that means. I don't know why it does not work.
I believe the code is to return the power_factor for a given rpm on the curve.
the tutorial is 3 years old and used var power_factor = power_curve.interpolate_baked(rpm_factor)
with no problems.
@@bruceparker6142 Friend, I figured it out, When you write "@export var BobCurve = Curve", apparently its incorrect!, instead write "@export var BobCurve: Curve", As of now I do not know the difference with = and :, but I will research, Hope this helps!
Very interesting, I didn't know godot had this feature and also with the code, thanks! :)
Happy to share. Thanks a lot for the feedback.
Nice feature. It can be used for so many things, like perfecting the feel of a jump in a platform game, dampening variables, tweening menu animations and making probability distributions, just to mention a few examples.
Yeah!!
I had no idea you could even make curve resources. This will be very useful. Thanks for the great video!
This is a game changer for me, thank you. Getting movement to feel right has been a huge struggle for me.
Thank you! Finally an interesting idea that I haven't thought about and I can actually use. Keep doing "different" tutorials, it's a great thing.
Thank you so much. I have done a lot of math that I could just have used the curve for instead! And then I even get a GUI to adjust it.
I still come back to your tutorials now and then just to refresh my memory. Thanks again for your content, Dave!
As someone coming from audio editing this really helps with visualizing stuff!
Very handy, it's like Tweens but with the ability to create your own custom transitiontypes and easyin functions. Thank you.
Thanks for the insight into a great feature, it will certainly allow me to do awesome stuff in the future.
That's that was really useful!
This is great!
Haven't seen your channel before, but just the fact that your intro looks like a Ti83+ game made me sub immediately.
Back in high school, I used to make games on it during class.
@@DavetheDev That's exactly how I learned to code; I started with a number guessing game ("higher", "lower", etc). I was always impressed with how much more performant the Assembly games were which we downloaded (Tetris, Mario, Snake, etc). I have that calculator to thank for giving me the foundation to start learning to code simulations and games as I finished up engineering at uni.
EXACTLY what I needed!
Though I need a little help, I want to use curves as recoil for my guns I am making but too add recoil I need to add the curve to a rotation_degrees.x but it seems I cant just add it, how would I go about this?
Here I am drawing out curves on paper, then trying to concoct some sort of calculation together with a bunch of if statements to get the behavior I want, like some stitched together frankenstein monster that only sometimes works.
And then you tell me that I could just have done this instead?
Well then.. That sure makes things a lot easier.
Oh thank god for you. My maths really isn't that great and I was doing a min on a normalised vector 2 with a sine wave and all sorts just to get something approximate.
Thank you so much.
haha, love the family guy ref
Dave, your video is currently the only help available online when it comes to using curves in Godot. I'm still struggling and would really appreciate a more basic example to help me understand the minimum required code, and how to integrate this with my own code for different use-cases. Please consider making another helpful video on this subject. Thanks!
thanks for making me not hate jump mechanism :,)
THANK YOU
Nice mic for your size
godsend
I would like to use this to model the perfect jump,but not sure how you would then make it variable jump height
i recommend desmos as website. My favorite website to visualize functions
Wow, your channel is great, thanks for helping, I have subscribed, I would like you to teach, how to animate a 3d objects in blender. And in future videos, make more advanced animations, such as face animations, animations of quadruped beings.
Thanks a lot! I hope there will be lots of animation stuff on the way in the future, but I do animations in a super interesting way that allows one person to make the most of the limited time available called procedural animations. In a nutshell, I try to push off as much of the animation work to the computer as possible. Done right, animating procedurally has the potential to save system resources, produce interesting emergent behavior, sometime look and feel more fluid, and most importantly, saves me from the super time consuming task of traditional key frame animation. Here are two videos I reference a lot when doing procedural animation...
ua-cam.com/video/LNidsMesxSE/v-deo.html
ua-cam.com/video/l9NX06mvp2E/v-deo.html
Also, this... ua-cam.com/video/sVntwsrjNe4/v-deo.html ^_^
@@DavetheDev Wow, what you just told me is super interesting, it's something new for me, I would be very excited if you made a video on this topic (or better yet, if you could create a course), I like to save time, taking advantage of the programming, thank you friend, I will review those videos, thanks for commenting, I'm going to keep that in mind
based mate user
Just a heads up. Don't use "self" to access the script's own variables and methods. "self" creates a reference to the script owner meaning you are creating unnecessary processing overhead.
Don't forget about tween node...
please update tutorial
Try using the sample() function instead of the interpolate() function! It got updated in Godot 4
You really dont have to put self before everything
me when I meet a narcissist
I understood this up until the example with the rocket then I completely lost you. I have no idea what landedness means or how that rocket is supposed to behave.
Noted! Appreciate the feedback. Programmers really like using numbers to emulate things from the "real world". We especially like using numbers between 0.0 and 1.0 to represent percentages. In this case, "landedness" is the percentage of a landing procedure a rocket has completed.
Is it just me or does math put in code make way more sense than whatever nonsense they do in algebra