Godot 4 3D Platformer Lesson #4: Coding 101 (Part 1)

Поделиться
HTML-код
  • Опубликовано: 7 июл 2024
  • In this Godot 4 Lesson I begin a 2-part 'intro to coding' lesson for absolute beginners to programming (or gd script) in Godot 4. In this lesson I cover topics: Language Syntax, Variables, Data Types, and Constants, Operators, Comments, and Calling Functions / Methods. By the end of this lesson we'll also add a Sprite3D (a floating image) into our game level, and code it to spin during gameplay.
    Thanks for watching! Here are the video chapter timecode links:
    - 0:00 - Video Intro
    - 0:07 - Recap (of the last lesson)
    - 0:51 - Outline (of this lesson)
    - 1:19 - Language Syntax
    - 5:55 - Variables, Data Types, & Constants
    - 15:03 - Operators
    - 16:30 - Comments
    - 19:43 - Calling Functions / Methods
    - 27:32 - Recap / Summary
    - 27:47 - Wrap-Up & Outro
    Don't forget to LIKE & SUBSCRIBE! 🥰 👍
    *note: In this lesson I used Godot 4.1
    #godotengine #gamedev
    Play and Download the Finished 3D Platformer Game Online Now!: borncg.itch.io/3d-platformer-... (use: Chrome/Edge/Firefox to play the web game version)
    *****************
    DONATE to support my channel via PayPal: goo.gl/ThkwyG
    ********************************
    LIKE and FOLLOW me on:
    FACEBOOK: / borncg
    INSTAGRAM: / born.cg
    X / TWITTER: / borncg
    Reddit: / borncg
    **********************************
    Visit this Godot 4 Beginners: 3D Platformer Course playlist!:
    • Godot 4 Beginners: Lea...
    Visit my Let's Learn Blender! Tutorial Series playlist:
    • Let's Learn Blender!
    ****************
    Nicolas from the band 'The Lazy Saviours' created my Intro Jingle!
    ****************

Комментарии • 59

  • @metacob
    @metacob 7 месяцев назад +75

    You have a very engaging way of speaking. I was 8 minutes into learning about variables when I remembered that I've been programming for over 20 years.

    • @HurricaneSA
      @HurricaneSA 5 месяцев назад +9

      Indeed. I got excited about making a cube named Steve move until I realized I've done it a 100 times before. Although, I admit, they were never named Steve or anything else before. Does "Player" count as a name? I wish my teachers in school were this engaging.

    • @PacdemonStudios1
      @PacdemonStudios1 5 месяцев назад +4

      It's actually kind of crazy, I sat through the entire last video and it was all for stuff I already knew how to do, I didn't even realize it until it finished. It's gonna be a slow burn but it makes me excited for when he starts covering complex stuff after laying the foundation

    • @lawdpuliix
      @lawdpuliix 2 месяца назад +3

      i first came here for Blender Tutorials, now i have been making mini game projects in Godot for 2 years🤣

  • @ripdoxyyy
    @ripdoxyyy 5 дней назад +1

    Explained coding to me better than anyone else I have learned from. Thanks so much!

  • @SILVERF0X13
    @SILVERF0X13 3 месяца назад +10

    I'm a full stack developer for my job, and while I knew pretty much everything in this particular episode, I will say that it was enjoyable to see how you explain the fundamentals for people who may not know things like variables/constants/etc. Enjoying the tutorials so far.

    • @BornCG
      @BornCG  3 месяца назад +1

      Thanks! 🙂

  • @VirtualHimself
    @VirtualHimself 9 месяцев назад +11

    LESSGOO!! I just opened Godot to learn new stuff and you uploaded!

  • @StarzyKK
    @StarzyKK 9 месяцев назад +16

    These tutorials are great! This is my first step into actually making a game and your tutorials are mondo helpful. Coding looks daunting but every dev has to learn it eventually right? Looking forward to the next ep!

  • @chickensoap
    @chickensoap 5 месяцев назад +4

    These tutorials are so awesome. Thank you so much for making it free. I can't find other 3D Godot tutorials like this. I'll make sure to share this.

  • @davidmanzato1987
    @davidmanzato1987 6 месяцев назад +5

    Hello, I'd like to thank you for your tutorials. They're simply excellent, very educational, and what's more, we can feel your good humor behind the microphone, a faultless performance, it's a no-brainer ! 👏

    • @BornCG
      @BornCG  6 месяцев назад +1

      ☺️

  • @Harbiter
    @Harbiter 8 месяцев назад +2

    Love your tutorials! You really explain things well and make it easy to understand.

  • @elliottfraziertube
    @elliottfraziertube 8 месяцев назад +1

    Great stuff! Looking forward to the next lesson!

  • @hunterzwer4095
    @hunterzwer4095 9 месяцев назад +2

    You are awesome please make your videos more often we really need it!

  • @barborahalova3514
    @barborahalova3514 8 месяцев назад +1

    These tutorials are awesome!

  • @rremnar
    @rremnar 9 месяцев назад +6

    Unless your variable changes, it is better to use functions in your declaration than in the _process function. That way the computer doesn't have to calculate the function over and over.
    const SPEED = deg_to_rad(2)
    In some coding languages, you may not be allowed to use functions in your constant declarations; therefore, you will need to declare it as a variable. But that is not an issue in GDScript.
    I do wonder, what difference does it make wether your variable is a constant or not? What if I had a 1000 variables and some of them I had no intention on changing their value. Does it really make any difference? Sure I can fathom it helps to prevent from making a mistake; but I wonder if there is something else going on under the hood that requires this? Maybe in the old days of programming.

  • @xmesaj2
    @xmesaj2 9 месяцев назад +2

    wow nice drop, godot has come long way

  • @christophilous4831
    @christophilous4831 9 месяцев назад +2

    thank you for the great tutorials

  • @EggsToMe
    @EggsToMe 8 месяцев назад +1

    Just wanted to say, you are the best :D

  • @MijmerMopper
    @MijmerMopper 9 месяцев назад +4

    I think Godot coding is going to be a bit more intuitive to me then what I tried previously (unity). Loving these vids.

  • @jasonwilliams8730
    @jasonwilliams8730 9 месяцев назад +3

    Thank you

  • @Zero0189
    @Zero0189 6 месяцев назад +3

    If GD script is Deleting code when you type before a character, try hitting the insert key (its above the delete key)

  • @user-bi4ye3vt6q
    @user-bi4ye3vt6q 5 месяцев назад +1

    Great tutorial

  • @chiewcck
    @chiewcck 4 месяца назад

    Awesome tutorials !

  • @user-xz8lm4rd6x
    @user-xz8lm4rd6x 2 месяца назад

    Dude knows how to teach GameDev, scripting and modeling. Awesome.

  • @ShawnLanphear
    @ShawnLanphear 21 день назад

    4 out of 11 done haha. Again these are very good and comprehensive tutorials.

  • @LeonderGrunder
    @LeonderGrunder 2 месяца назад +1

    19:15 aaaaahmhmmhmhmhm. Definietly done in all my code...

  • @gigantetelles6409
    @gigantetelles6409 Месяц назад

    Muito bom cara vc explica muito bem, o vídeo é de fácil compreensão até para quem fala outra língua

  • @krokiet8393
    @krokiet8393 2 часа назад

    thank you for this video :D

  • @Amrytmotion
    @Amrytmotion 3 месяца назад

    Love from 🇮🇳

  • @florrymccarthy6746
    @florrymccarthy6746 4 месяца назад

    coming from old school programming I find it hard to resist calling string variables Variable$ lol just the way I learned

  • @zedernt5338
    @zedernt5338 8 месяцев назад

    I ran your finished tutorial game .exe through a github decompiler for godot, so I could see how it worked earlier. It all makes sense except for the files level_1_environment.tres and world-blocks-v1.tres. How did you make those files? I can't figure out how to edit those files in either godot or blender.
    How many more videos until this tutorial series reaches the part where you made those?
    Thanks for these tutorials!

  • @Amrytmotion
    @Amrytmotion 3 месяца назад

    Believe me godot 4 is available on android and i am doing all these in android 🔥

  • @thehonkinggamer2827
    @thehonkinggamer2827 8 месяцев назад +1

    Will your part 2 video be next week?

    • @BornCG
      @BornCG  8 месяцев назад +1

      It’s up now 😉

  • @ainzooalgown119
    @ainzooalgown119 4 месяца назад

    I love how you explain, everything is very clear. I have a question, how did you lock your scene/level/project to 60 fps? When I run the same script you are using, my sprite spins much faster, likely because I'm on a 240hz display. Is there a way to change this?

    • @bigmoneybusiness34
      @bigmoneybusiness34 4 месяца назад

      i think you times it by delta

    • @killerz1o1
      @killerz1o1 3 месяца назад +2

      Go into project settings, go to "Run" under "Application", turn on the "Advanced Settings" switch at the top right, then change the "Max FPS" setting to 60.

    • @ainzooalgown119
      @ainzooalgown119 3 месяца назад

      @@killerz1o1 thanks

    • @ainzooalgown119
      @ainzooalgown119 3 месяца назад

      @@bigmoneybusiness34 that might be it, thank you

  • @hypermonk33y56
    @hypermonk33y56 5 месяцев назад

    i dont get how is it when i type in the same rotate on y axis with the same as the tutorial, mine spins faster than in the video. whats the difference? i didnt change anything or is that the default fps speed?

  • @BinaryBolias
    @BinaryBolias 9 месяцев назад +1

    I've successfully guessed the sort of thing that would be done within the Icon script as an alternative to printing a value every frame, though I myself happened to initially use "rotate(Vector3.UP, 5 * delta)" rather than "rotate_y(0.1)".
    Pi (accessible in GDScript with the "PI" constant) is one half a rotation in radians. Pi can be used to define rotations over time, and without using the "deg_to_rad" function, with (PI * delta) representing half a rotation per second.
    Not using delta, of course, causes the rotation to be dependent on framerate. "rotate_Y(0.1)" produces a rotation of 0.1 radians per frame, or, assuming 60 frames per second, (0.1 / (2 * PI) ) rotations per second, but which varies as the framerate does. Fixed to be framerate-independent, "rotate_y(0.1)" would be "rotate_y( (0.1 / 60) * delta)", with the literal "60" used representing the assumed framerate of the original.
    "deg_to_rad(x)" effectively divides "x" by 180 and then multiplies it by Pi.
    If you understand "PI" as representing half a rotation, then using it directly instead of "deg_to_rad()" can be quite intuitive.

  • @murdrer982
    @murdrer982 9 месяцев назад +1

    Hi sir you are taking alot of time

    • @VirtualHimself
      @VirtualHimself 9 месяцев назад +2

      a tutorial every one week

    • @Wailingllama
      @Wailingllama 9 месяцев назад +4

      Let's not rush them, they need time to edit these and id prefer we wait and get them instead of not at all

    • @BornCG
      @BornCG  9 месяцев назад +8

      These tutorials take hours and hours to make. Patience, Padawan.

    • @MijmerMopper
      @MijmerMopper 9 месяцев назад

      I'd ask for a refund

    • @rremnar
      @rremnar 9 месяцев назад

      I am getting impatient as well; but I guess he has to do the voice recording for these. And since he is busy, he doesn't have time to dish em out frequently as we'd like.

  • @HonsHon
    @HonsHon 3 месяца назад +1

    You can have spaces in your code. You do not have to have tabs. You just have to choose between the two per script (tabs or spaces).
    With spaces, you have to choose the amount of spaces that are expected per indent as well (2 spaces, 4 spaces, etc...).
    Edit: Great tutorial though! This is really helping my girlfriend out as she is jumping into the world of Godot!

  • @Hatifnatek32
    @Hatifnatek32 9 месяцев назад +1

    Next the character?

    • @BornCG
      @BornCG  9 месяцев назад

      Adding the Robot character comes a ways into the course. Next up is the second half of 'Coding 101'.

  • @thenoobarafinbg8378
    @thenoobarafinbg8378 8 месяцев назад +1

    PLS UPLOAD ALL PARTS

    • @BornCG
      @BornCG  8 месяцев назад +2

      If only these didn’t take time to edit! 🙃🤷‍♂️

    • @thenoobarafinbg8378
      @thenoobarafinbg8378 8 месяцев назад +1

      @@BornCG it takes 1week to edit?

  • @worldvador7046
    @worldvador7046 5 месяцев назад +1

    I don't understand this tutorial. How is there not a single person that doesn't get a specific step?

    • @HonsHon
      @HonsHon 3 месяца назад +1

      Learning programming is sort of like getting up and over a steep hill. You are bound to hit some hiccups when you first start, but there is always a way to get up over those humps.

  • @jeffblack5527
    @jeffblack5527 8 месяцев назад +1

    😂 'Promo sm'