HD-2D Character Code in Godot 4.0

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 91

  • @kennethrapp1379
    @kennethrapp1379 Рік тому +18

    I was able to improve the facing code by getting the input angle to a quadrant (0-7, starting right and increasing counterclockwise) and taking an index to an array.
    var facing_vec:Array=[10,11,12,13,14,15,8,9]
    func update_facing(input:Vector2)->void:
    var angle = rad_to_deg(input.angle())
    angle = angle if angle >= 0 else angle + 360
    angle /= 45
    facing=facing_vec[abs(angle)]

    • @gamedevaki
      @gamedevaki  Рік тому +2

      cool implementation!

    • @sergeyiu2301
      @sergeyiu2301 6 місяців тому

      How do i know the numbers to fill the array? How do i map it?

  • @kcils
    @kcils Рік тому +14

    Lots of great information here, I just started a 2.5d project! Quite a bit different game so not exactly what I need, but very good video. About the only thing that could make this better is real voiceover man.

    • @Noqtis
      @Noqtis Рік тому +2

      If you have a voice, you can make your own voiceover, man

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

      @@Noqtis the fuck? Yeah let me just steal this guy's video and reupload it, is that what you're saying? Did you imagine some kind of sass/disrespect that wasn't there?

    • @gamedevaki
      @gamedevaki  Рік тому +6

      @slick, thanks for the feedback! Curious to know more about what you had in mind for your game!
      Also I agree a real voiceover would be ideal, but my earlier videos had gotten pretty nasty feedback about my accent. I'm working on improving my voice and enunciation, so it will probably take a while before I'm comfortable in using my real voice.

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

      @@kcils No I was saying, you can press on play and voice over the video. No need to reupload it, smooth brain

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

      @@gamedevaki hey, I think most people like accents! If you're understandable, even a thick accent with a good mic can sound great. Background Noise removal in Audacity and a pop filter over the mic go a very long way. The loudest people in the comments are usually the ones you hear the most.
      I loved the info about shading and alpha, that was useful for me. However with my project, the way I have the directional sprite set up is rotating the object locally based on camera when you press WASD - so it's always walking toward the Z axis, but it works no matter the camera angle or direction you press, synced to the camera as an origin. This necessitates a pretty complicated system that needs to get the angle of the camera compared to the angle of the sprite3D object and display the appropriate spritesheet x coord for the angle, independent of animations controlling the y coord. Like the Trails in the Sky games. I only need to figure out the 8 way perspective system now, and then animations will all be controlled by Y coord value, making it very simple to add to the spritesheet as time goes on with my blender camera rig.

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

    I love that your tutorials are straight to the point man! But some steps are hard to follow. Looking forward for more!

    • @rafalongo7
      @rafalongo7 5 місяців тому +1

      some steps are missed

  • @silkybrain
    @silkybrain Рік тому +12

    You made the perfect tutorial! straight to the point and fully functional.

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

      thanks! glad that you find this useful!

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

    THANK YOU! Holy shit. YES!
    I like your tutorial style... A LOT!
    You have just addressed the pain points of MOST, if not, ALL existing tutorials on video format.
    You're not what we deserve, you're what we NEED!

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

      Also, If you're looking for tutorial vid ideas, i'm all for anything Octopath Traveler inspired!

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

      @@noiJadisCailleach thanks so much for the kind words. glad that you find this style useful!
      thanks for the feedback about Octopath Traveler Inspired tutorials, I definitely enjoyed what that game have and I'm currently working on a new tutorial for that with my recent learnings.

  • @piousthepious
    @piousthepious Рік тому +3

    I’m loving this kind of videos man!

  • @KentaYoui
    @KentaYoui Рік тому +2

    Straight to the point, exactly what I need.
    Thanks for it, can't wait for more!

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

      Thanks for the kind words! Let me know if there's anything specific topics you want me to cover!

  • @veniadgames8269
    @veniadgames8269 Рік тому +3

    the code is helpful! you should let other know it from the start then wait til the end though.

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

      thanks! glad you find the code helpful! I don't really want to appear spammy though

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

      @@gamedevaki hey, you are giving away free stuff, sure we can choose to pay, but we can also choose not to. don't worry about it man!

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

      @@veniadgames8269 thanks for the support!

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

    Great video thanks alot for making such a good tutorial .I think enter the gungeon had a mod with an over the shoulder prespective since it was a 3d game.

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

      Thanks for the kind words! That sounds interesting, thanks for the info.

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

    Amazing! Just what I wanted to try and create too!

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

      Thanks! Looking forward to more hd-2d games!

  • @traumwelt1975
    @traumwelt1975 4 місяці тому

    pure gold ! Thanks for sharing

  • @0ozymandias641
    @0ozymandias641 9 місяців тому +6

    At 2:08 the var 'animation_column' is added without mention and its not told how its being used or how the variable is being changed

    • @rafalongo7
      @rafalongo7 5 місяців тому +1

      yeah, I realized that by trying to understand the code without doing it, and I don't understand what it does with the "frame" variable

  • @undephying
    @undephying Місяць тому

    hi, just wanted to add something since I came about this issue when I tried this setup. if anyone else is having problems with the sprite making weird color distortions, just change the import compression mode to 'lossless', and it should fix the issue

  • @ADreamCalledEternity
    @ADreamCalledEternity 11 місяців тому

    Your tutorials are so fire

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

    didn't know we could put pixel art in 3d lol great tutorial

  • @mariothemii
    @mariothemii Рік тому +3

    Really clear and precise tutorial👍👍
    by the way, is it possible to use individual sprites to make the animations instead of utilizing a sprite sheet or is the sprite sheet mandatory? I'm asking because my sprites on the sprite sheet are not evenly spaced which causes some frames to clip through others.

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

      Thanks for the kind words, glad you find this helpful.
      You can try using AnimatedSprite3D node with Sprite Frames instead of Animation Player for animations. That should allow you to add individual sprite frames instead of using a sheet.

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

    Excellent video. Thanks for the tutorial

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

      Thanks! Glad it was helpful!

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

    amazing video!! thank you for this :)

  • @RandomGameFun
    @RandomGameFun 26 днів тому +1

    ua-cam.com/video/V9kshvtj6s0/v-deo.html
    this will be the long answer on the keyframes, I'm brand new to godot so when i get caught up here i just search other videos on the topic and I found the answer to some of yalls hang ups.

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

    thank you, hope i see more tutorial

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

    nice,make more of godot tutorial~ you deserve a sub!

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

    This is great. If I make it big I'm giving you a shout out.

  • @valotharion
    @valotharion 7 місяців тому +12

    Did you intentionally make it confusing, to sell access to your scripts on ko-fi? I got stuck on the "animation_column" variable and getting the anims to update correctly.

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

    its nice! Dont stop 🥳

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

    Been loving ur vids man. Helping me to learn the UI xD the skybox, does it automatically rotate? Or is it something u did manually with code? I see you have attached a script?

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

      Thanks for the support! To rotate the skybox, we just need to update the sky_rotation along the y-axis in _process function
      environment.sky_rotation.y += 0.0001

  • @sourcilsvirils
    @sourcilsvirils Місяць тому

    Dude is gatekeeping us

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

    Thank you!

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

    bro it's inspiring af

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

    wow! Thanks

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

      glad that you find this useful!

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

    Thanks❤

  • @mellowmeowmeow
    @mellowmeowmeow 15 днів тому

    erm how is the Player object created in the world at 1:10 ?

  • @SentryX7
    @SentryX7 4 місяці тому +1

    Can you make a tutorial adding Combat please. +1 Sub

  • @Arukajoe
    @Arukajoe 6 місяців тому +2

    It's a nice looking tutorial, but as you don't detail how you implement your code it's basically useless to beginners. Good for intermediates I would imagine though

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

    At 1:55 how do I create Key Frames? Also CharacterBody3D doesn't show in the Track list..

    • @nachtbeirmann4760
      @nachtbeirmann4760 8 місяців тому +3

      I did this:
      @export var frame = 0
      Then Track list>CharacterBody3D> it will show up under your .gd

  • @yunarukam-bae8944
    @yunarukam-bae8944 7 місяців тому

    What do you do when you have multiple sprites instead of a sprite sheet?

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

    My characterbody node doesn't move when I playtest this level, how can I make them move or assign movement keys? Or if that question is too basic, can you direct me to a tutorial that explains that?

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

      Hi, you can go to "Project" > "Project Settings" > "Input Map" to assign the movement keys.
      In the "Add New Action" Field, you can type in the action name e.g. "move_left" and assign the keys you want to that action

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

      @@gamedevaki Thanks

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

    What Shape do we assign for the CollisionShape (in the video the setting is not visible)?

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

    Not related to the video topic, but do you have any tips about finding character assets for a fighting game? I don't have any drawing skills and I'm struggling a lot to find assets even for a markup

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

      nonetheless, thanks for the comment! I think that's a great question!
      if it's for a mockup, I would just use power poses as keyframes, to get a sense of the hitboxes.
      if it's 2d assets, itch.io have quite a few that does the job for a temporary asset.
      for 3d assets, maybe mixamo for character mannequin and animations
      you can always download the 3d assets and convert them into 2d

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

      @@gamedevaki I tried itch io but couldn't find anything "street fighter-ish". But you gave me a brilliant idea about using 3D models as 2D frames, that definitely should be enough for now. Thanks a lot for that! Also, really appreciated maxiamo suggestion.
      Wish all the best for you!

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

      @@tiagoc9754 glad to help, thanks for the well wishes and all the best to you too!

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

    My sprites get blurry and get the colors mixed up how do I fix this by any chance

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

      It's mainly due to render and import settings.
      I have another video here that goes into details how to fix it ua-cam.com/video/Rqo7rUJ1bXY/v-deo.html

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

      @@gamedevakithanks

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

      @@gamedevakiok so that’s not the problem I have when I put it in 3d the texture of the pixels gets all messed up

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

      ⁠ok fixed the texture issue

  • @CanalTVCP
    @CanalTVCP 4 місяці тому +1

    it's so rushed... there's a lot missing, mainly on the animation part

  • @archivesvault-999
    @archivesvault-999 Місяць тому

    Did all this yapping but not once did you mention how to do player movement smh

    • @RandomGameFun
      @RandomGameFun 26 днів тому

      he did the on creation he used the default script for time saving. he said that lol... i had to slow the video down alot.

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

    ^('-')^ take my energy Gamedev Aki. Your HD2D videos have saved me months of troubleshooting for my game.
    Challenge/Request: If I have other characters(NPC's) walking around in the background, and they are also rendered using Y billboard, how can I reflect their position when the player character rotates their camera and there fore changes their viewing angle of said NPCs.
    For instance: I see my player sprite's back as they walk away from the camera in HD2D. If an NPC in the background is facing with their back towards me, and I pass them and then rotate the camera angle 180 degrees, how can I update their sprite/animationPlayer to now show me their front side(face)?
    I know there are multiple solutions but what do you think is most efficient? Thank you again!

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

      Hey Bryan, thanks for the kind feedback!
      My first thought would be to use dot product to identify relative facing/positioning and update the NPC facing and animation accordingly.
      That way, you can use the same code for all NPC and their facing will always be accurate.

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

      Just realized, is that a Dragon Ball reference?

  • @treemasters_edits
    @treemasters_edits 3 місяці тому

    1:22