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
  • Ігри

КОМЕНТАРІ • 51

  • @danniemi9990
    @danniemi9990 Рік тому +31

    This was very helpful!
    Also, for folks missing the interpolate function, in Godot 4, the "interpolate" method has been renamed "sample"

    • @ayrengreber5738
      @ayrengreber5738 Рік тому

      For me I need to reload my scene to see changes in Godot 4… is that a bug or am I doing something dumb?

    • @bruceparker6142
      @bruceparker6142 Рік тому

      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.

    • @uselessheartinbox1711
      @uselessheartinbox1711 11 місяців тому +1

      @@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!

  • @FrancoisSchnell
    @FrancoisSchnell 4 роки тому +26

    Very interesting, I didn't know godot had this feature and also with the code, thanks! :)

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      Happy to share. Thanks a lot for the feedback.

  • @Baekstrom
    @Baekstrom 3 роки тому +7

    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.

  • @xKeelar
    @xKeelar 4 роки тому +12

    I had no idea you could even make curve resources. This will be very useful. Thanks for the great video!

  • @ChrisD__
    @ChrisD__ 3 роки тому +3

    This is a game changer for me, thank you. Getting movement to feel right has been a huge struggle for me.

  • @zenitaly
    @zenitaly 4 роки тому +3

    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.

  • @ViaConDias
    @ViaConDias Рік тому +1

    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.

  • @colly9888
    @colly9888 8 місяців тому

    I still come back to your tutorials now and then just to refresh my memory. Thanks again for your content, Dave!

  • @HeroG9000
    @HeroG9000 3 роки тому +1

    As someone coming from audio editing this really helps with visualizing stuff!

  • @rungeon83
    @rungeon83 4 роки тому +2

    Very handy, it's like Tweens but with the ability to create your own custom transitiontypes and easyin functions. Thank you.

  • @synthoelectro
    @synthoelectro 3 роки тому

    Thanks for the insight into a great feature, it will certainly allow me to do awesome stuff in the future.

  • @RyanScottForReal
    @RyanScottForReal 4 роки тому +1

    That's that was really useful!

  • @NateHeroic
    @NateHeroic 2 роки тому

    This is great!

  • @BingtheLizard
    @BingtheLizard 3 роки тому

    Haven't seen your channel before, but just the fact that your intro looks like a Ti83+ game made me sub immediately.

    • @DavetheDev
      @DavetheDev  3 роки тому +1

      Back in high school, I used to make games on it during class.

    • @BingtheLizard
      @BingtheLizard 3 роки тому

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

  • @Dragon20C
    @Dragon20C 3 роки тому +1

    EXACTLY what I needed!

    • @Dragon20C
      @Dragon20C 3 роки тому

      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?

  • @Rattja
    @Rattja 3 роки тому +1

    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.

  • @davidmurphy563
    @davidmurphy563 3 роки тому +1

    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.

  • @jeffg4686
    @jeffg4686 4 роки тому +1

    haha, love the family guy ref

  • @1u8taheb6
    @1u8taheb6 2 роки тому

    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!

  • @fahimabidarnob1697
    @fahimabidarnob1697 4 роки тому

    thanks for making me not hate jump mechanism :,)

  • @halilyasar3009
    @halilyasar3009 4 роки тому

    THANK YOU

  • @xxgimpl0rdxx22
    @xxgimpl0rdxx22 4 роки тому +2

    Nice mic for your size

  • @Mechasolaris
    @Mechasolaris 5 місяців тому

    godsend

  • @stephenmackenzie9016
    @stephenmackenzie9016 2 роки тому

    I would like to use this to model the perfect jump,but not sure how you would then make it variable jump height

  • @blenderer3191
    @blenderer3191 3 роки тому

    i recommend desmos as website. My favorite website to visualize functions

  • @Crisisdarkness
    @Crisisdarkness 4 роки тому +1

    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.

    • @DavetheDev
      @DavetheDev  4 роки тому +6

      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

    • @DavetheDev
      @DavetheDev  4 роки тому +3

      Also, this... ua-cam.com/video/sVntwsrjNe4/v-deo.html ^_^

    • @Crisisdarkness
      @Crisisdarkness 4 роки тому

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

  • @patologicznypiotrus5638
    @patologicznypiotrus5638 2 роки тому

    based mate user

  • @AgnisNeZvers
    @AgnisNeZvers 2 роки тому +1

    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.

  • @nov_flp
    @nov_flp 3 роки тому

    Don't forget about tween node...

  • @pyrosoup4413
    @pyrosoup4413 9 місяців тому

    please update tutorial

    • @colly9888
      @colly9888 8 місяців тому +1

      Try using the sample() function instead of the interpolate() function! It got updated in Godot 4

  • @testteset9625
    @testteset9625 3 роки тому

    You really dont have to put self before everything

    • @semi9
      @semi9 Рік тому +1

      me when I meet a narcissist

  • @JacobKinsley
    @JacobKinsley 2 роки тому

    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.

    • @DavetheDev
      @DavetheDev  2 роки тому

      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.

  • @Bunchiebo
    @Bunchiebo 2 місяці тому +1

    Is it just me or does math put in code make way more sense than whatever nonsense they do in algebra