HD-2D Character Code in Godot 4.0

Sdílet
Vložit
  • čas přidán 11. 09. 2024

Komentáře • 85

  • @kennethrapp1379
    @kennethrapp1379 Před rokem +15

    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  Před rokem +2

      cool implementation!

    • @sergeyiu2301
      @sergeyiu2301 Před 4 měsíci

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

  • @kcils
    @kcils Před rokem +12

    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 Před rokem +1

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

    • @kcils
      @kcils Před rokem

      @@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  Před rokem +4

      @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 Před rokem

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

    • @kcils
      @kcils Před rokem

      @@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 Před 6 měsíci +1

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

  • @noiJadisCailleach
    @noiJadisCailleach Před rokem +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 Před rokem

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

    • @gamedevaki
      @gamedevaki  Před rokem

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

  • @KentaYoui
    @KentaYoui Před rokem +2

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

    • @gamedevaki
      @gamedevaki  Před rokem +1

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

  • @silkybrain
    @silkybrain Před rokem +12

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

    • @gamedevaki
      @gamedevaki  Před rokem

      thanks! glad that you find this useful!

  • @piousthepious
    @piousthepious Před rokem +3

    I’m loving this kind of videos man!

  • @0ozymandias641
    @0ozymandias641 Před 6 měsíci +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 Před 3 měsíci +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

  • @veniadgames8269
    @veniadgames8269 Před rokem +3

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

    • @gamedevaki
      @gamedevaki  Před rokem

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

    • @veniadgames8269
      @veniadgames8269 Před rokem

      @@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  Před rokem

      @@veniadgames8269 thanks for the support!

  • @Ah2o5b
    @Ah2o5b Před rokem +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  Před rokem

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

  • @andyvang8163
    @andyvang8163 Před rokem +1

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

    • @gamedevaki
      @gamedevaki  Před rokem

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

  • @mariothemii
    @mariothemii Před 11 měsíci +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  Před 11 měsíci +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.

  • @traumwelt1975
    @traumwelt1975 Před 2 měsíci

    pure gold ! Thanks for sharing

  • @ADreamCalledeternity
    @ADreamCalledeternity Před 9 měsíci

    Your tutorials are so fire

  • @GameUISchool
    @GameUISchool Před 11 měsíci

    its nice! Dont stop 🥳

  • @masban
    @masban Před 3 měsíci

    thank you, hope i see more tutorial

  • @18vlsnp
    @18vlsnp Před rokem

    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  Před rokem

      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

  • @thetomipage
    @thetomipage Před rokem

    amazing video!! thank you for this :)

  • @agustinserrano2774
    @agustinserrano2774 Před rokem

    Excellent video. Thanks for the tutorial

  • @Axiassart
    @Axiassart Před rokem

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

  • @valotharion
    @valotharion Před 5 měsíci +8

    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.

  • @joshaklese4969
    @joshaklese4969 Před rokem

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

  • @univ9882
    @univ9882 Před rokem

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

  • @yunarukam-bae8944
    @yunarukam-bae8944 Před 5 měsíci

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

  • @Arukajoe
    @Arukajoe Před 4 měsíci +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

  • @ryzh6544
    @ryzh6544 Před rokem

    bro it's inspiring af

  • @ropepores4688
    @ropepores4688 Před rokem

    Thank you!

  • @OLIV3R_YT
    @OLIV3R_YT Před rokem

    Thanks❤

  • @renatorossarola
    @renatorossarola Před rokem

    wow! Thanks

  • @JPKloess
    @JPKloess Před rokem

    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  Před rokem

      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 Před rokem

      @@gamedevaki Thanks

  • @CanalTVCP
    @CanalTVCP Před 2 měsíci +1

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

  • @tiagoc9754
    @tiagoc9754 Před rokem

    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  Před rokem

      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 Před rokem

      @@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  Před rokem +1

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

  • @SentryX7
    @SentryX7 Před 2 měsíci +1

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

  • @osirys
    @osirys Před rokem

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

  • @otto2853
    @otto2853 Před 6 měsíci

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

    • @nachtbeirmann4760
      @nachtbeirmann4760 Před 6 měsíci +2

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

  • @bryansmith508
    @bryansmith508 Před rokem

    ^('-')^ 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  Před rokem

      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  Před rokem +1

      Just realized, is that a Dragon Ball reference?

  • @Lightfulsyn
    @Lightfulsyn Před rokem

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

    • @gamedevaki
      @gamedevaki  Před rokem +1

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

    • @Lightfulsyn
      @Lightfulsyn Před rokem

      @@gamedevakithanks

    • @Lightfulsyn
      @Lightfulsyn Před rokem

      @@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 Před rokem

      ⁠ok fixed the texture issue

  • @treemasters_edits
    @treemasters_edits Před měsícem

    1:22