HD-2D Style in Godot 4.1

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2023
  • In this video, I'll go through how to implement some of the key elements from the Octopath Traveler style in Godot 4.1. These concepts can also be generalized for 3D or 2.5D games.
    ☕ Download the source code on Ko-Fi
    ko-fi.com/s/08b0d19e78
    🕛 Time Stamp
    1:30 Pixel Art Player
    5:35 Level Design Elements
    8:54 Light, Shadow and World Environment
    10:14 Bloom Settings
    10:28 Depth of Field Settings
    10:56 Vignette
    11:20 God Rays
    🗑️ Pastebin
    Character Body 3D Code: pastebin.com/JH941YCE
    SpringArm 3D Code: pastebin.com/EZwjLshn
    Vignette Shader: pastebin.com/2jsep56W
    🛒Amazon Affiliate Links
    If you feel like shopping and supporting me, here are some of my essential buys
    Productivity Mouse - amzn.to/3pqQjjN
    Low Profile Productivity Wireless Keyboard for Multiple Devices - amzn.to/43YtenR
    The BEST Office Chair - amzn.to/3NLbrKW
    Graphics Tablet for Your Game Assets - amzn.to/46zlNoX
    HDMI Extender - amzn.to/3NLDcTN
    🏅🏅Attributions🏅🏅
    Assets Used
    Skybox - artstn.co/m/1LgWz
    Pixel Art - cainos.itch.io/pixel-art-top-...
    Spritesheet - www.spriters-resource.com/ds_...
    Music
    'Permafrost' by Scott Buckley - released under CC-BY 4.0. www.scottbuckley.com.au
  • เกม

ความคิดเห็น • 113

  • @kplays_6000
    @kplays_6000 10 หลายเดือนก่อน +50

    Some tips for people following this:
    - The player animation should have both feet on the ground between each step, or should not show that frame at all whilst walking
    - Maybe slow the player down a little - he seems to be walking a little too fast for it to look right in a larger scale project
    - Move the camera up a little - whilst your player should be the centre of attention, you should still be able to see what's in front of him
    Great tutorial!

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +3

      thanks for the great tips!

  • @Casseous
    @Casseous 9 หลายเดือนก่อน +48

    I advise beginners to not use this tutorial as it does gloss over some finer details on creating this from scratch. Otherwise, it's a good tutorial for more seasoned devs.

    • @catcactus1234
      @catcactus1234 5 หลายเดือนก่อน +6

      Also the walk animation code is pretty bad. You can achieve the same thing just by checking the input axis value for all 4 directional inputs, then playing the correct animation based on the number it returns. If no input is detected, stop the animation. There’s no reason to manually update the frames when you can just call .play(“animation_name_” + direction) method on your animation player mode. It’s unnecessarily complex and weirdly limiting.

    • @cromazac
      @cromazac 4 หลายเดือนก่อน +8

      What tutorial should we use ;-;

    • @cromazac
      @cromazac 4 หลายเดือนก่อน

      ​@@catcactus1234 explain it in code form so I can ̶c̶̶o̶̶p̶̶y̶ ̶a̶̶n̶̶d̶ ̶p̶̶a̶̶s̶̶t̶̶e̶ ̶i̶̶t̶ understand it better

    • @cromazac
      @cromazac 4 หลายเดือนก่อน

      ​@@catcactus1234 can you explain it in code form so I can c̶̶o̶̶p̶̶y̶ ̶a̶̶n̶̶d̶ ̶p̶̶a̶̶s̶̶t̶̶e̶ ̶i̶̶t̶ understand it better

    • @casentinex1339
      @casentinex1339 6 ชั่วโมงที่ผ่านมา

      @@catcactus1234 Can you give a more in depth explanation, or point to a video that explains what you are talking about regarding checking the animations based on axis value?

  • @bryansmith508
    @bryansmith508 9 หลายเดือนก่อน +8

    I love your videos on HD2D! I appreciate how you walk through an entire scene, not just one aspect of the scene. It allows me to understand exactly how you went from scratch to the final product!

  • @Gatitasecsii
    @Gatitasecsii 6 หลายเดือนก่อน +3

    This has helped me kickstart my project so much!! I thank you from the bottom of my heart!

  • @ShadowOverflow
    @ShadowOverflow 7 หลายเดือนก่อน +4

    Your content is amazing! Your editing, speed, and style is top notch!
    Thank you for all of the effort you put in.

  • @revidev
    @revidev 10 หลายเดือนก่อน +4

    Awesome!🎉 . I'm eager to see combat mechanics from your game. Keep the good work!

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +1

      Thanks for the kind words! You're in for a treat, I'm currently planning the combat mechanics for my game!

  • @SaharatOfficial
    @SaharatOfficial หลายเดือนก่อน +1

    Instead of incremental turns, the easiest method for turning is just if Input.is_action_pressed: "move_left" rotation.y += 1 x delta. (-= if your going right.)

  • @AsatteGames
    @AsatteGames 6 หลายเดือนก่อน

    This really helped me a lot! Thank you for the video :)

  • @user-tp1fy3sp5c
    @user-tp1fy3sp5c 9 หลายเดือนก่อน +1

    Thank you very much for your tutorial, I have been looking for it and I had given up on this type of 2D to 3D format and it came out recommended, keep it up (if by chance you see spelling errors or misspelled words, I used a translator.).

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Thanks for the kind words! Glad you find this helpful and good luck on your project!

  • @yusarimahubara
    @yusarimahubara 6 หลายเดือนก่อน

    Dude wtf, this is top notch quality tutorial, keep going bro!

  • @TEDDeng
    @TEDDeng 3 หลายเดือนก่อน

    Really learned a lot from this video, much appreciate.

  • @casesolia7356
    @casesolia7356 2 หลายเดือนก่อน

    Fantastic video! Thank you so much.

  • @lagmaronchim1435
    @lagmaronchim1435 10 หลายเดือนก่อน +4

    great 2.5d tutorial, thanks!

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +1

      glad that you like it!

  • @meteorogames9523
    @meteorogames9523 9 หลายเดือนก่อน

    This is exactly what I was looking for, thank you sir!

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Thanks for the kind words, glad that I could help!

  • @bluzenkk
    @bluzenkk 10 หลายเดือนก่อน +26

    Suggestion:
    add a normal map on the 2D sprite so it react with the light dynamically.

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +4

      Thanks for the tip, going to research about that next!

    • @ohiasdxfcghbljokasdjhnfvaw4ehr
      @ohiasdxfcghbljokasdjhnfvaw4ehr 10 หลายเดือนก่อน

      nah that always looks ugly

    • @longtranha8695
      @longtranha8695 9 หลายเดือนก่อน +2

      If you draw a pixel art of something and you have to spend time to make a normal map of it -> A lot of time -> Solution : draw pixel with shadow cast same direction with 3D direction light

    • @neozoid7009
      @neozoid7009 8 หลายเดือนก่อน

      but how to enable shadow for the sprite ? my spite3D is not casting shadows

  • @angryybot6367
    @angryybot6367 10 หลายเดือนก่อน +7

    You can simply mark the UV as triplanar instead of setting its coordinates to 3, 2 ,1.
    the checkbox for this is right below the UV scale and offset

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +2

      that's cool, thanks for the tip!

    • @triskaideka13
      @triskaideka13 6 หลายเดือนก่อน +2

      you angryybot are a scholar and a gentlebot

  • @grayfaux_
    @grayfaux_ 6 หลายเดือนก่อน

    Fantastic video!

  • @Ah2o5b
    @Ah2o5b 10 หลายเดือนก่อน +2

    Great tutorial as always

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +1

      Thanks for the constant support!

  • @pipeliner8969
    @pipeliner8969 6 หลายเดือนก่อน

    thanks a lot, great video

  • @user-ni4ll1gr2h
    @user-ni4ll1gr2h 7 หลายเดือนก่อน

    3:57 what value does "facing" represent?

  • @benjaflinston
    @benjaflinston 2 หลายเดือนก่อน

    My character's sprite is blured. How I fix this?

  • @neozoid7009
    @neozoid7009 8 หลายเดือนก่อน +1

    I can't find the sprite sheet for download

  • @ebooooooy4249
    @ebooooooy4249 9 หลายเดือนก่อน +2

    This is fire, I've been looking for a HD-2D Style tutorial on Godot but almost all videos teach it on UE5. Do more videos about HD-2D Style and can you explain everything step by step. I'm a total beginner.

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Glad that you find this useful. Sure, think I can make a video for a total beginner.
      Curious which parts you find difficult to follow in this video so I can improve them

    • @ebooooooy4249
      @ebooooooy4249 9 หลายเดือนก่อน

      For example at min 3:12 you typed some code for the animation, where do I type it? is it a script attached to the animation?Honestly your videos are very informative but for absolute beginners the pace might be fast. Also there is another ytuber who posts similar 2DHD tutorials for UE5, you can probably grow your channel by doing the same thing for Godot. his channel is CobraCode incase you wanna get some ideas.@@gamedevaki

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Cool, thanks for details. CobraCode looks cool, thanks for the recommendation!

  • @SaharatOfficial
    @SaharatOfficial หลายเดือนก่อน

    Umm anyone realize the walking code is in Vector2? I debugged this for 30 mins to realize i needed to have direction.z instead of direction.y to move up and down.

  • @richardlitter6956
    @richardlitter6956 8 หลายเดือนก่อน

    I'm playing around with making something like this so I'll ask here and see if someone recognizes my issue if that's alright? I can see the invisible parts of my sprite when it moves. It blurs whatever's behind it so you can clearly see the edges of the sprite frame. Any idea what could have caused this? It's not even animated yet, it just happens when the player moves. I have the spritesheet imported the way you did it and I can't really find anyone else who's got this issue and it's driving me nuts :P

  • @DestusG
    @DestusG 9 หลายเดือนก่อน

    Thanks learned a lot

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Glad to hear that!

  • @Garretlike
    @Garretlike 6 หลายเดือนก่อน

    i have the problem that th players feed are like inside the tiles from a y direction with collision detection, is there some kind of offset so that the sprite does not seem to have its feet cut off from the block tiles?

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน +1

      I usually offset it based on the position of my tile. e.g. if my floor tile is on default position (0,0,0) and has a height of 1, I'll offset it by 0.5

  • @NexusBaum
    @NexusBaum 12 วันที่ผ่านมา

    how is your project going?

  • @fridyrogide8752
    @fridyrogide8752 9 หลายเดือนก่อน

    Well, that's quite a tutorial there !
    Fantastic

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Thanks, glad you like it!

    • @fridyrogide8752
      @fridyrogide8752 9 หลายเดือนก่อน

      @@gamedevaki Just show everything then loll

  • @Garretlike
    @Garretlike 6 หลายเดือนก่อน

    Should the SpringArm3D be bound to the player character? Shouldn't it be used in the level scene and the level scene inherits the player character? sry, i'm new to game development and just trying to think about structure a bit for my project as well. Hence, for some reason my animations for moving forward, back, left and right don't seem to work correctly. i think i did everything as according to the video. The sprite seems to orientate the specific frames at least in the directions it should look, but then is stuck on the one frame animation instead of doing the rest of the 6 frames for the specific direction it is facing. Anyone having a similar problem?

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน

      I'm mainly using the SpringArm3D to control the camera in relation to the player, that's why I bind it to the player.
      That way, when the player moves to different stages, it will still have the same SpringArm3D and Camera attached to it.

  • @sadaneduardo4391
    @sadaneduardo4391 หลายเดือนก่อน

    after godot completely failed to load and properly displays basic 3d models I also tried to use the 2.5d aproach but after I noticed godot is bugged even to load a bunch of images I just went back to unity

  • @CHnailer
    @CHnailer 6 หลายเดือนก่อน

    And if you want to add animations to attack moves Animation of storage position Do I have to draw another picture png and do it all over again?

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน

      Yeah, you need a separate animation for attacks.

  • @Chareidos
    @Chareidos 8 หลายเดือนก่อน +1

    Nice Tutorial. To the point.
    Unfortunately I have to look for another approach for implementing my 2D Character with Skeletal Animations into a 3D World.
    Bodyparts are using 2D Sprites (with 6 Frames for Directions).
    I do not think that it will work with Sprite3D?
    Maybe I need to look for some Tutorials with viewports in mind.
    But the video was overall useful and I still got plenty to take with me to make a 3D World rather quick and easy.
    Thank you for the Tutorial

  • @danielantonioreyesarmas359
    @danielantonioreyesarmas359 7 หลายเดือนก่อน

    Te amoooo!!!!

  • @ararashi8967
    @ararashi8967 9 หลายเดือนก่อน

    If i make it in mobile renderer, ¿ who are the parameters i need to change ?

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      mobile renderer would need some tweaking in the Depth of Field and bloom settings for greatest impact. World environment and light settings also need some tweaking for minor improvements.

  • @TA-MUSIIQUE
    @TA-MUSIIQUE 4 หลายเดือนก่อน +1

    I absolutely need this moving environment folllowing the camera of the character like you made with trees! Is that possible in Unreal Engine 5?

    • @TA-MUSIIQUE
      @TA-MUSIIQUE 4 หลายเดือนก่อน

      I need this tutorial in Unreal Engine :/

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน +1

      ah sorry, I don't have experience with Unreal Engine.
      I didn't really do anything crazy in this tutorial so it should be applicable to Unreal Engine 5

  • @triskaideka13
    @triskaideka13 6 หลายเดือนก่อน

    How do you get the trees to sway?

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน +1

      I've made a video to go through the tree sway here - th-cam.com/video/g17C_EXna3M/w-d-xo.html

  • @HE360
    @HE360 9 หลายเดือนก่อน +1

    I might adapt some of these ideas to Godot 3.5 since I probably won't be switching to Godot 4.0+ just yet.

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Good idea! Might need some tweaking though, especially in WorldEnvironment

  • @michealsfriendtrevor9761
    @michealsfriendtrevor9761 7 หลายเดือนก่อน

    can you make a video on how to flip the sprite of an enemy or other npc correctly so that they always face the player when you rotate the camera? My code only works when I am not rotating the camera. In my code, I make the enemy calculate the distance vector3 between it and the player when it is agro and normalized it, then I make the enemy choose to flip sprite or not based on the x axis of it. It worked fine before I saw your video and decide to add the rotate camera to the game like don't starve.

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน

      off the top of my mind, I'm thinking of using RayCasting to identify the camera position relative to the players to decide on the flipping and facing.

  • @TheNixtlyWorkshop
    @TheNixtlyWorkshop 9 หลายเดือนก่อน

    I Just have a question, how i can make the facing code? Like i should make a "onready var"?

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      Sorry, I don't quite get the question you are asking. Do you mind giving me more context?

    • @TheNixtlyWorkshop
      @TheNixtlyWorkshop 9 หลายเดือนก่อน

      ​​@@gamedevakii'm sorry for the delay, i got an error in the code: 'The identifier "facing" isn't declared in the current scope.' I use godot 3.5 because i cant use godot 4

    • @TheNixtlyWorkshop
      @TheNixtlyWorkshop 9 หลายเดือนก่อน

      I'm still new at godot

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน

      thanks for the context. yes, you need to define the variable through something like "var facing = 0"
      it's been a while since I've last used Godot 3.5, so I don't remember the intricacies but you would need to make sure facing is usable by the entire script, not just the function.
      you should be able to do that by placing "var facing = 0" outside of all functions

    • @TheNixtlyWorkshop
      @TheNixtlyWorkshop 9 หลายเดือนก่อน

      @@gamedevaki ok!!! Thank you!

  • @casul-4891
    @casul-4891 10 หลายเดือนก่อน +1

    Do you have any plan to make a game in steam?

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน

      That's like the dream! Not sure how long it takes for me to get there though.

  • @Yalloriess
    @Yalloriess 9 หลายเดือนก่อน +1

    Sad we didnt get to at least see the result at the end of the video

  • @user-xq3vh2bg1t
    @user-xq3vh2bg1t 5 หลายเดือนก่อน

    Wow, keep these awesome videos coming! What a relief to find someone who gets to the point, and also has great taste. Plus, you are the only tutorial maker I have yet to come across who does not sound castrated. For real: so much content I won't access because I can't bear hearing the eerily common soy tone - and often ESL (English as a Secondary Language) pronunciation. It all results in sounding like fingernails scratching across a chalkboard. Thanks for being different!

  • @collinvisser7108
    @collinvisser7108 10 หลายเดือนก่อน +1

    Very good video - nice and detailed but not going into lot of details - very good pacing.

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +1

      Thanks for the kind words, glad that you enjoy this video!

  • @NexusBaum
    @NexusBaum 4 หลายเดือนก่อน

    🙏

  • @grayfaux_
    @grayfaux_ 6 หลายเดือนก่อน

    I feel like a dithered shadow shader would set this off.

    • @gamedevaki
      @gamedevaki  4 หลายเดือนก่อน

      thanks for the great idea, let me try figure that out!

  • @glitched_code
    @glitched_code 9 หลายเดือนก่อน +1

    -Animating a sprite sheet like you described in the first part of the video is a bad idea. When you eventually will need to edit those animations it will quickly become an unmantainable mess, especially if you do it in code. It's better to use AnimationPlayer instead, since it has way more built in functionality and is easier to use for people that don't usually code, like animators, designers and sprite artists.
    -Did you dub this video using an AI voice model?

    • @gamedevaki
      @gamedevaki  9 หลายเดือนก่อน +1

      Thanks for the good point.
      In my opinion, animation player is ideal for complex animations like cut scenes or battles.
      I would prefer my approach for homogenous animation - imagine having to set the same key frames for 100s of sprite. Of course, it is up to each developer to make the judgement call.
      Yes. Using Tortoise TTS model.

  • @UZPvNUCaaQdF
    @UZPvNUCaaQdF 10 หลายเดือนก่อน +1

    This really isn't showcasing bloom or DoF very well (to be fair, a lot of Octopath players feel the effect is too strong in that game). I think you should build another scene and reassess whether your shaders are working as intended

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +1

      Thanks for the feedback. Agree that I failed to give bloom or DoF the showcase it deserves.
      Let me work on another video focusing on those effects across multiple scenes for a better showcase.

  • @KevinNijmeijer
    @KevinNijmeijer หลายเดือนก่อน +1

    Claiming HD-2D doesn't work on web is completely false, it's the shaders that you use in the scene that don't work. HD-2D as a visual style can 100% work on Web / mobile.

  • @CanalTVCP
    @CanalTVCP 29 วันที่ผ่านมา

    Are you alive?

  • @TentacleShark
    @TentacleShark หลายเดือนก่อน

    is...this voice an AI?

  • @notSoAnonyymus
    @notSoAnonyymus 10 หลายเดือนก่อน +3

    Recommendation: remove the AI voice use your own or ask a friend to read the line.

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน +10

      thanks for the feedback, being an Asian with English as my second language makes this a little challenging.
      not to mention the hate I've gotten from my old videos for my accent and grammar mistakes
      making videos is just a hobby for me, so I rather just use an AI voiceover so I don't need to deal with the haters lol

    • @temp_text7728
      @temp_text7728 9 หลายเดือนก่อน +6

      I appreciate the current voice settings used. It's clear and not hard to listen to like other AI voices. Better to be able to understand what is being conveyed clearly. I have struggled to follow some other tutorials where the mic used is not very good quality or there's no voiceover at all, so this is very helpful. Thank you OP!

    • @engame1702
      @engame1702 9 หลายเดือนก่อน

      do you know what ai voice did he use? i've heard mostly in yt shorts?

  • @zitronekoma30
    @zitronekoma30 2 หลายเดือนก่อน

    4:45 this code makes my skin crawl, please never do this. initiate all your stuff first, then make the if statements which just set a variable to either +PI/2 or -PI/2, then tween. this is so much needless code duplication.

  • @lynic-0091
    @lynic-0091 10 หลายเดือนก่อน

    Your previews are way too short, show off what you've made for longer! Lol

    • @gamedevaki
      @gamedevaki  10 หลายเดือนก่อน

      thanks for the feedback, I'll try adding longer previews in the future. curious what do you think is a good length for the end results showcase?

  • @ven7306
    @ven7306 10 หลายเดือนก่อน

    why you charge for source code?

    • @Ah2o5b
      @Ah2o5b 10 หลายเดือนก่อน +4

      It is his code he can do whatever he wants with it. Support other devs youtube ads don't pay the bills

    • @kplays_6000
      @kplays_6000 10 หลายเดือนก่อน +1

      if you don't wanna pay for it, follow the tutorial

    • @Luluskuy
      @Luluskuy 10 หลายเดือนก่อน +1

      It's marketing trick and nothing wrong with it

  • @ven7306
    @ven7306 10 หลายเดือนก่อน

    unsub because you sell out, why no free code? greedy.

    • @casul-4891
      @casul-4891 10 หลายเดือนก่อน +3

      ​@@iFruit9iXven dude is hilarious 😂. He's the epitome of "beggar asking too much"

    • @Ah2o5b
      @Ah2o5b 10 หลายเดือนก่อน +4

      It is his code he can do whatever he want with it don't be an 8 years old and grow up.

    • @lynic-0091
      @lynic-0091 10 หลายเดือนก่อน

      Lol you're pathetic

    • @kplays_6000
      @kplays_6000 10 หลายเดือนก่อน +2

      or take the time to follow the tutorial and learn from it, and you'll end up with the source code without having to pay. Get a grip

    • @Cretaal
      @Cretaal 10 หลายเดือนก่อน +2

      Oh no, and here I was excited to see your asset flip on kickstart. Shame...

  • @Vercidium
    @Vercidium 8 หลายเดือนก่อน +1

    I love this pixel-art HD style! Do you have a Twitter or Discord where we can talk about game dev?