How to Create YSORTING in Godot 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • In this video we are going to go over how to add ysorting in godot 4, many things have changed with the way ysorting is implemented in godot 4 and it is honestly much better in godot 4 than the ysorting system was in godot 3.
    Download Free art pack: game-endeavor....
    make sure to download the free as that is all we will need for this series.
    Link RPG Godot 4 series playlist: • How to Make an RPG in ...
    ----------------------------------------------------------------------------------------------------------------------------------------
    Thank you so much for watching I really hope this video helped.
    if you did enjoy then please go and click that subscribe button to help out the channel. I means so much and I love your feedback in the comments to let me know what it is that you enjoyed. Again thanks so much and I would love to see you again!
    have a great rest of you day and of course be safe :)
    - thanks DevWorm,
    ----------------------------------------------------------------------------------------------------------------------------------------

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

  • @dev-worm
    @dev-worm  ปีที่แล้ว +8

    link to the full series: th-cam.com/play/PL3cGrGHvkwn0zoGLoGorwvGj6dHCjLaGd.html

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

    for anyone who is having issues here the steps for Y sorting : Make sure player Y Sort Enabled is Disabled and Z Index = 1, Z as Relative = ON, The TileMap Z index = 0, Z as Relative = ON, Y Sort Enabled = ON, all layers Y Sort = ON, grass layer Z Index = 0, cliff layer aka second layer Z index = 1, Last layer Trees ets Z Index = 1 make sure all 3 Layers have Y Sorting = ON

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

      Dude you're a life saver...my collision wasn't working for some reason, and this fixed the issue! Thanks a lot mate👍👍

    • @AKinToHumanity
      @AKinToHumanity 3 วันที่ผ่านมา

      Thank youuu my enemy was clipping under while the player was not, turning the tilemap z index to 0 solved it :)

  • @Koden
    @Koden ปีที่แล้ว +63

    7:15 Little tip. Godot will do simple math for you. So if you have the y position at 13 and you wanna move it by 15 positively, just do 13 + 15 and it will solve and give you the number. This works for anywhere that you can put in numbers, even resolution. It's very useful so you don't need to try to do mental math or bust out a calculator. If I recall right this works with - + * /

  • @Milham-hg7hf
    @Milham-hg7hf 5 หลายเดือนก่อน +41

    if you have an issue where the y sorting is not work. try this :
    1. assume that you have turn on the "y sort renabled" at tilemap in ordering sectionn
    2. you have to turn on "y sort enabled" in layer section too, and give the layer z-index 1

    • @SGLaih
      @SGLaih 4 หลายเดือนก่อน +3

      My champion.

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

      Thank you! Clicking forever finding the box I missed.

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

      thank you

    • @MalikAliyev-ld7uj
      @MalikAliyev-ld7uj 2 หลายเดือนก่อน +1

      Its about 3 a.mI have been trying to solve this problem for like 4 o'clock, thank you :D

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

      To build off of this: your player and ysort layer need to have the same z-index. Just figured it out.

  • @mrw2202
    @mrw2202 ปีที่แล้ว +25

    This is an amazing tutorial. You're like one of the only people doing tuts for latest version of Godot. Keep going and you'll corner the tut market.

  • @kizzle_mi_nizzle6069
    @kizzle_mi_nizzle6069 9 หลายเดือนก่อน +12

    As a first time godot learner and programer I find these videos are great for learning the features of godot. This one was a bit choppy but I understand you are playing with a brand new feature so it makes sense. The best part of this for me so far was the programing the character node. Other programing learning tools i've use basically give you a list of things to write without explaining how functions or variables work which I found odd as when I asked my brother he explained it clearly in under 60 seconds. I found the practical use of the programing code shown in game as well as clear explanations of why you were writing each line of code really helped where vetran programers with their beginner tutorials has not helped me. So thanks for making these videos. Super excited to start my first project!

  • @miadietrich7347
    @miadietrich7347 9 หลายเดือนก่อน +31

    Got stuck, but something that helped me: turn Y-sorting on for the collision shape of your player, not the player themselves. Also, don't forget to turn it on for the whole world, lol.

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

      THANK YOU!

    • @bruno.barradas
      @bruno.barradas 8 หลายเดือนก่อน +3

      Thanks.

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

      Thank you!

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

      Good thinking, thanks :D

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

      What if I don't have a collision shape, I wonder.

  • @MaddMennn
    @MaddMennn ปีที่แล้ว +15

    You have made learning and using Godot accessible to me after weeks of struggling to find an up to date course. Thank you!

    • @dev-worm
      @dev-worm  ปีที่แล้ว +1

      so glad to hear that bro, if you ever need any help Im here for you.

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

      i need help : 10:30 im still in front of the tree what can i do to fix that ??

  • @dustaone8521
    @dustaone8521 ปีที่แล้ว +48

    I'm a complete beginner and I'm enjoying the series so far, but sometimes it's really hard to follow what you are doing with the erratic mouse movements and clicking through panels super fast, especially when you get mixed up or forget something. It would be much easier to follow if you slowed down a little bit and maybe edited/scripted a bit more and/or explained in a voiceover what errors you made and how you're fixing them.
    Thanks.

    • @peterzinn2058
      @peterzinn2058 ปีที่แล้ว +14

      Just wanna chime in and say that I'm not a complete beginner and still feel this. Content is great, but a little extra scripting and editing wouldn't hurt. The back half was challenging to follow.

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

      HOT TAKE - The man is giving away gold for free. Be gracious. He is building a game, AND educating us. THANKS DUDE!!! We need to put the work in if we want to follow his tips. He's not going to spoon food you, no one should. This isn't a university class. Good luck everyone, happy gaming.

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

      @@Amazing_Software No one is disagreeing with that,we're just saying things can be improved a bit. Also no uni class spoon feeds you everr

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

      @@Amazing_SoftwareBro, constructive criticism is good for him too, better tutos can attract more ppl and more subs.

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

      @@ACharlar22 Ok good point. But is there anyone else making better tutorials than this guy? We should give credit where it's due.

  • @fancycactus234
    @fancycactus234 ปีที่แล้ว +52

    I could not seem to get the Y Sort Origin to set but finally realized you have to set the number, then click the tile to apply that number to the tile. Just in case anyone else was confused.

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

      OMG I just spent 5 minutes trying to figure out why it wasn't working... Thank you!

    • @WeirdBrainGoo
      @WeirdBrainGoo 8 หลายเดือนก่อน +2

      Thank you! I had the same problem. At 6:21 it seems DevWorm turns Y-sorting on on the player, but that didn't work for me. Turning it on on the collision shape instead made it work like it should. :D

    • @albert69Einstein
      @albert69Einstein 5 หลายเดือนก่อน +2

      thank you. while this is a good tutorial, still needs some polish. instructor needs to be more verbal in EXACTLY what they are doing. i.e. what keystroke or buttons they are pressing.

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

      I couldnt get my player's head to stop dissappearing behing the "chest". Once I turn off y-sorting on the player it, it now appears normal. What is your player's Ordering/y-sort value ? enabled(checked) or disabled(unchecked) ?

  • @Aelux5216
    @Aelux5216 7 หลายเดือนก่อน +8

    Anyone who's player is disappearing after passing y = 0, the warning that was ignored here seems relevant, as ysort layer seems like it should be above the regular tilemap layers, so on the ysort layer z-index you want to set that to 1 and also set your player root nodes index to 1 as well

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

      I had the same problem ! Thank you.

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

      Wow, just that I was looking for!

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

      Life-saver! Thank you, I saw so confused.

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

      bless your soul. I was scrolling through all the solutions people had and none fixed it till this one

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

      Thanks!

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

    For anyone who may still be having problems with y-sort not working. Make sure the root node has Y-sort enabled as well.

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

      I am sorry what is root node

    • @rompevuevitos222
      @rompevuevitos222 9 หลายเดือนก่อน +3

      @@feryanwibowo241The top node in your scene
      Altho this is misleading, because the actual root node is the game window, which is a node only visible while the game is running on the Remote tree view

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

      This commentary helped someone.
      Thank you.

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

      This worked for me! I miss having a node to sort this kind of thing. Checking a box in every single node involved in y-sorting is extremely tedious and easy to forget...

    • @Mr.RandomMoo
      @Mr.RandomMoo 2 หลายเดือนก่อน

      Thank you :)

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

    For me I had to set the world>TileMap>Layers[ysort layer]>Z index to 1 to make the ysorting work. It made the second error warning disappear.
    Great video!

    • @dev-worm
      @dev-worm  4 หลายเดือนก่อน

      glad you were able to figure that out and everything was able to work!! thank you!

  • @tuckerwoollard2613
    @tuckerwoollard2613 4 หลายเดือนก่อน +3

    for anyone struggling to see the character, your tile map needs to be highest on the node list. Also the other little error he got about the z index, the tile map itself is set to 0 so in your ysort layer just put z index to 1 or 2 or however many layers you got, just not 0

    • @dev-worm
      @dev-worm  4 หลายเดือนก่อน

      thanks for pointing that out!

  • @Slipping_thru_the_Seams
    @Slipping_thru_the_Seams ปีที่แล้ว +16

    i really appreciate your series. i do wish you would edit out some oopsies as it gets confusing at times

    • @dev-worm
      @dev-worm  ปีที่แล้ว +2

      haha thanks bro, ill work on that

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

    I came across this randomly. Didnt know what y sorting was but this was what I was looking for. I really appreciated the way this video went down and really appreciated the quality in your tutorial. I subscribed and look forward to more stuff. :)

  • @Daniel.LeePhotography
    @Daniel.LeePhotography ปีที่แล้ว +1

    this is amazing man!!!! thank you so much!! please keep making more videos about godot4. I think youre the most up to date and helpful godot teacher there is currently

    • @dev-worm
      @dev-worm  ปีที่แล้ว +2

      working on many tutorials as we speak :D

  • @marksievert6774
    @marksievert6774 ปีที่แล้ว +1

    I'm following you series to try to get the basics to make my game. thank you.

  • @MetaDataAutomation
    @MetaDataAutomation 8 หลายเดือนก่อน +3

    Can someone please explain to me, at around 7:00 when we go to the player and we do a negative off-set of -15 to the Y, which is it doing here specifically? I played around, and if you don't do this step, your characters body will go behind the plants when in front. Is this some kind of layering technique? And when I make my own game, will it always be -15 that I set this by?

    • @h-angrygirl
      @h-angrygirl 6 หลายเดือนก่อน +1

      Thank you very much, I thought that this value was not "specific" and I put another one and it didn't work for me, you solved my error thanks to your comment, I hope someone answers why it is set -15

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

    this is very interesting, when I tried this ysorting with Godot 4.0, I had so much hassle and it was just not working. I downloaded the most recent version of Godot 4 (I believe I downloaded Godot 4.2), and now, I was able to get Ysorting to work with legitimately NO issues, hassle, no stress. Everything that worked for you worked for me. Everything you encountered that did not work did not work for me either. In other words, this newest version of Godot 4 is working perfectly with your tutorial videos! Thank you so much!

  • @ibrahim_punisher289
    @ibrahim_punisher289 ปีที่แล้ว +2

    plz continue and dont stop because i forgot every thing in godot it and when godot 4 release i cant understand anything . thanks alot

    • @dev-worm
      @dev-worm  ปีที่แล้ว +3

      episode 4 is pretty long lol because its a combat system, but hoping to get it out tomorrow!

    • @ibrahim_punisher289
      @ibrahim_punisher289 ปีที่แล้ว +2

      @@dev-worm i hope

  • @ozangozoglu6155
    @ozangozoglu6155 ปีที่แล้ว +2

    Thank you so much. Without your videos, achieving my personal dream would be a lot harder. I will do my best.

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

    If I don’t use a tilemap and have a lot of objects in a scene, I try to organize them into blank white nodes, like putting all the enemies in an “enemies” node and trees in a “trees” node. But Y sorting doesn’t work when I do this. I thought it would because the blank nodes don’t have any transforms. So, my only option might be to just let them stay messy as siblings of my player node.

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

    not gonna lie, this was really difficult for me to get and figure out. NOT YOUR FAULT it was all me, but after rewinding a bunch, I finally got it. Thanks for helping me to get it. On to the next part in the tutorial!

  • @mihirparab2172
    @mihirparab2172 ปีที่แล้ว +1

    OMG YES!! I'VE BEEN WAITING FOR THIS..

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

    Thanks was looking for this feature and didn't know it was so extremely easily implemented in godot, awesome!

    • @dev-worm
      @dev-worm  3 หลายเดือนก่อน

      amazing to hear!! i hope it was able to help! thank you!

  • @RG-ef8vm
    @RG-ef8vm 6 หลายเดือนก่อน +1

    Tip: If you want to select a tilemap tile without applying the current collision shape, use CTRL+click. If the tile does not have a shape drawn, you will need to select the Add polygon tool to draw a new shape (tiny box above the image of the tile you just selected).

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

      what a crazy shit... even after reading your comment I spent 1 hour to find out why it reset shape ... ugliest UX

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

    I'm gonna have to buy like 10 copies of your game dude. THANK YOU!!!!!

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

      Glad I could help lol!

  • @Jephed_
    @Jephed_ ปีที่แล้ว +1

    You're a lifesaver! Thanks for the video. This helped me a lot!

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

    Спасибо огромнейшее!!! Один из самых полезных туториалов!

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

    Tip for if you feel like your player is getting caught up on the bottom or top of ysort objects as you pass close by them:
    Go back in TileSet, physics layer 0, and on the troublesome objects, flatten the polygon on that side that you're getting caught on.
    Too many triangles and sharp edges while doing this is why you're getting caught up on stuff.
    Try to remember now moving forward when setting the points for new object.
    It's okay to trace a root coming from a tree, just don't go crazy. Keep it simple.
    You wouldn't like it in a game you paid good money for, getting caught up on everything while running around or away.
    So try not to do it yourself. ;)

    • @dev-worm
      @dev-worm  5 หลายเดือนก่อน

      very good point!

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

    Mine finally works now, i had to combine a few comment suggestions;
    I set all of the y-sorting on each individual thing (trees, rocks etc) to -16
    i set the Z for the y-sorting TileMap Layer to 1
    i set the Z for the player to 1
    it now works! :D
    Hope this helps someone!

    • @dev-worm
      @dev-worm  4 หลายเดือนก่อน

      thanks for pointing all this out!! I know it will prove to be helpful!!

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

    Ysorting makes it look like already some professional top down RPG game 😍😍 I'm excited for the next videos in this series, thank you so much, @DevWorm 😃

    • @dev-worm
      @dev-worm  6 หลายเดือนก่อน

      thank you so much!! I hope the rest of the series proves to be helpful!

  • @alphaios7763
    @alphaios7763 7 หลายเดือนก่อน +2

    I started having issues with Y sorting at some point, thought I'll never get it fixed. enabled Y sort all over the place, started panicking... and then I tried setting Y Sort Origin on the objects layer (named ysort in the video - where all objects are placed). I set it to 10 and was still behind the objects, then set it to -10 and VOILA - everything worked as expected (in front of stone when walking in front, behind it when walking behind)! hope it helps someone!

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

    0:40 intro
    1:00 Add Tile Collision Shapes
    4:22 Add Player CollisionShape2D
    5:38 Fix Player CollisionShape2D
    7:40 Add Y-Sort Origin to Tiles
    10:22 Enable Y-Sort to Tilemap
    10:50 It Works
    Enable y-sort to:
    - world scene
    - worl node
    - tilemap
    - ysort layer inside tilemap
    - player scene
    - collision shape 2d inside player scene
    (i think i'm not forgetting any)

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

    you are INCREDIBLE, i was looking for it and dont even know the name of "ysort" for search, thanks m8 God bless u

    • @dev-worm
      @dev-worm  8 หลายเดือนก่อน

      thanks brother! so happy to hear that you were able to find what you needed!

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

    FOR ANYONE STILL NOT GETTING CORRECT Y SORTING. They need to be on the same Z layer. From what i have seen. I haven't tested this with tile maps. I am testing this on pickups.

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

    Your MAIN node MUST be a NODE-2D not just a node. That way you can make the y-sort enabled for the whole world node under Ordering.

    • @dev-worm
      @dev-worm  3 หลายเดือนก่อน

      correct! im sorry i didnt point this out in the video!

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

      Replying to thank you as I didn't realise that with the new tilemap system in 4.3 that I had my tilemaps as children of a normal node. Thanks!

  • @the-birbo
    @the-birbo 2 หลายเดือนก่อน

    I couldn't get it to work until I figured out I needed to set the layer's z-index to 1 and the player's z-index to 1.

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

    this is a very helpful tutorial! thanks!

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

    i was about to not use godot for the lack of digestible information on the new version of the game until i found your channel

    • @dev-worm
      @dev-worm  10 หลายเดือนก่อน

      I'm working on being so much more consistent with my upload schedule!!! trying for every other day from here on out. I want to do everything I can to try and help the Godot community.

  • @НиколайИванов-с3ш1л
    @НиколайИванов-с3ш1л ปีที่แล้ว +2

    Hello, dear DeWorm. Do the lessons on creating a simple level system. An example of such a system. the player takes experience points, and after that his characteristics of speed, attack, etc. change. Or how to make sure that after filling the experience bar progress strip so that the player's weapon changes?

    • @dev-worm
      @dev-worm  ปีที่แล้ว +3

      will for sure create that in the next series, which is going to be a survival game, so player stats will forsure be in that

    • @НиколайИванов-с3ш1л
      @НиколайИванов-с3ш1л ปีที่แล้ว +1

      @@dev-worm cool, and there you can explain how to make the simple construction system .

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

    For anyone have issue character disappear when moving up. Check the entire tile map to see if the map below the y = 0 coordiante.

    • @dev-worm
      @dev-worm  3 หลายเดือนก่อน

      very good point!

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

    Make sure when you are initially making your tiles that you do the shift+drag method for the entire tile that you want to make. I inidivually clicked each tile in an "entitiy" and it did not correctly apply the gravity. I got hung up on the shrub because of that, I was not getting the entire shrub to do the collision for at a time.

  • @makermatt93
    @makermatt93 5 หลายเดือนก่อน +2

    Something that confused me that I finally fixed. When I created the tileset, I pressed "yes to automatically create tiles in the atlas", which made everything one block so I could not select the entire tree, which in turn I was unable to correctly put the ysort on it.
    You need to press no and then hold shift click to make larger tiles as he shows.

    • @dev-worm
      @dev-worm  5 หลายเดือนก่อน

      good point! glad you solved it and understand it a bit better now! I shouldve made that more clear in the video! thanks for pointing that out though!

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

      @@dev-worm yes, you should!

  • @LRamony
    @LRamony ปีที่แล้ว

    Perfect series, Perfect video

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

    hi, i have some problem and i dont know how to solve it. When i'm selecting the tiles to ysort they do not fit into one but are divided. Can someone help please?

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

    When I have z index = 1 in my y_sort layer and z index = 0 in every other layer / node, suddenly the physics layer doesn't work. When all of my z index numbers are set to 0 (and "y sort enabled" is selected in my world, tilemaps and player nodes), it suddenly works. Not sure why, but thought I'd put that out there in case someone else ran into the same issue.

  • @pranksies4496
    @pranksies4496 ปีที่แล้ว

    Very Chill explanation, love it

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

    why does it show 2 players at diffrent position both operating simultaneously but one is with ysort and other is not? HELP

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

    This feature convinced me to now try out Godot now. Seems so much easier that what I'm used to from Unity.

    • @dev-worm
      @dev-worm  5 หลายเดือนก่อน +1

      goodluck in Godot! if you need any sort of help in Godot then feel free to let me know!

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

      @@dev-worm thx, maybe I'll come back to that offer later on.
      Currently I finished godots 2D tutorial, now I'll rebuild it on my own.
      After that I'll come back to your tutorial.
      From there on I'm probably good to go. A lot feels very familiar, coming from unity.

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

    use the pill shape and, under "transform", turn it by 90 degrees

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

    why do all tiles share the same physical points config ? My tree and bush have same physical points... and when I change points for bush they also change points for tree...

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

    really good video series to learn godot as a beginner!
    the only feedback i'd like to give is that you seem to move quite fast and it's hard to keep up with what's happening, especially when you go back and forth bc something didn't work on the first try. great stuff nontheless

    • @dev-worm
      @dev-worm  6 หลายเดือนก่อน +1

      thanks! sorry its a bit fast I do apologize! I wish back when I was filming these I would've noticed that so I could've slowed them down in turn making them easier to understand

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

    Awesome walk throughs so far! One question I have is why does the enemy ignore physics layers? thank you!

    • @dev-worm
      @dev-worm  หลายเดือนก่อน +1

      it may be because the enemies layers and mask arnt the same as the environment or maybe there isnt a collisionshape within the enemy? Hoping to help.. but i am totally unsure unless I could look at the project!

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

      @dev-worm appreciate it! I have copied everything from your tutorial playlist so it's all the exact same. Not sure if yours works, and I missed a small detail.

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

    me and the homies LOVE y sorting

  • @GalaxyJammed
    @GalaxyJammed ปีที่แล้ว +2

    Will you be able to make a system where you can find better weapons in crates that will upgrade your overall strength (no exp or anything needed)? Great video btw!

    • @dev-worm
      @dev-worm  ปีที่แล้ว +1

      in the next series that will be a survival series

  • @spacetrip7278
    @spacetrip7278 ปีที่แล้ว +29

    im not usually negative but map oh man is the collison explination so bad

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

      It's not negative if it's helpful. And he's still got some learning to do himself.

    • @hexaldecima6839
      @hexaldecima6839 7 หลายเดือนก่อน +6

      Haha 😅😅😅
      I think this guy at the time was still getting used to the new update and its changes.

  • @protobeing3999
    @protobeing3999 11 หลายเดือนก่อน +2

    is there a way to do this with out tile maps? I've basically imitated this using a foreground/background layer, but if there was a way to program it a little more fluidly in a game that does not use tile maps - that would be ideal.

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

      Yes, all 2D nodes have Y sorting

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

    i messed with the Y-Sort enabled setting. To hide behind the elements you have configured, you just need to enable “cliff" on TileMap, Ordering, and World.

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

    i have an interesting little bug. I added a camera and stuff to my player so i could make a bigger map and explore. Well I drew my map all around the world origin, and after setting the ysort stuff, everything above the world origin got hidden (including the player until i turned off the ysort on the world node.) Even with that fix however, anything from my ysort tileset that i draw above that point disappears immediately. Anyone have a solution for me? I was considering just moving the worlds origin point up to the top, so that I can't go above it, hiding the elements of the scene, but i can't figure out how to do that if you even can. Inversely I don't think that I can move all the tiles down beneath it either can I? It doesn't matter for the purposes of this tutorial, but for my reference going forward i'd love to hear any suggestions! Thanks in advance!

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

      had this same problem

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

      @@coocool92 after further tinkering I realized it has to do with the y sort layer origin not the world. However if you move that origin it fucks up the ysort, so I guess just going forward if I want to use this method instead of making instanced scenes i have to draw the map beneath that point

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

      @@hollowtongue oooh thank you, helped me understand what was wrong. At least now we know for the future

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

      @@coocool92 I'm so glad I could help :) hopefully my information isn't flawed tho I'm still new to this stuff! So use my info as a jumping off point to seek what you need. I will say chatgpt can help figure things out but they need to update it's info for Godot 4 before it can be super useful for this iteration. But it may help at least. Good luck on your dev journey friend!

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

      @@hollowtongue Good luck to you too!

  • @armyofchickens6062
    @armyofchickens6062 ปีที่แล้ว +2

    how would you set the y sorting origin if im using a 2d body for my trees? (for chopping down animation is y I set it to a 2D body

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

    When i enabled ysort for the map/node, some objects simply disappeared. Why is that?

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

    i have a question. If players z index 0 and tilemaps layers 0 and 1. I need to make collision for player for both these layers. How to make it?

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

    Great work on everything! But you missed the collisions of the cliff :(

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

    Thanks for this, great tutorial, but I have an issue where my objects (trees, rocks, stumps etc.) are going behind the grass/ground layer instead of in front of it like in the video and it only seems to happen in the top half of the map, the bottom half is fine. Anyone know how to fix this?

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

      im getting the same error where im phasing through tiles aswell.

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

    Many thanks, this Tutorial helps me a lot

    • @dev-worm
      @dev-worm  11 หลายเดือนก่อน

      Glad to hear that!

  • @masterwgcstudios8764
    @masterwgcstudios8764 ปีที่แล้ว +1

    How would YSorting work between two sprites? For exmaple a player and enemy or player and npc?

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

    amazing tutorials bro keep it up

    • @dev-worm
      @dev-worm  6 หลายเดือนก่อน

      thanks brother!

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

    I came accross this problem that no tutorial seems to explain, nor do I get any help from the documentation: how to make y sorting work with CharacterBody2Ds. So if I have an enemy or an NPC, I cannot get my player character to go behind them. I've offset the sprites, turned on Y sorting in everything, nothing works. I wonder if it's a problem with the sprites themselves (like having too much empty space below the character or something) or if there's some way to set a Y sort origin for CharacterBody2Ds, but I cannot get it to work.

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

    okay works but now the player goes behind the tilemap if I go above the tilemap y sort, I can just move the tilemap upwards so far that this wont ever happen but is there a better way?

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

    why cant my character go infront of objects every object is in front?

  • @jbn1087
    @jbn1087 22 วันที่ผ่านมา +1

    but now you can still walk on top of the cliffs, right?

    • @dev-worm
      @dev-worm  21 วันที่ผ่านมา +1

      yes!! if you are on the other side of the collision then you should beable to!

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

    im having an issue where when i try to walk in fornt of an object, my player clips through. any got any ideas

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

    idk if this helps anyone, but for me y sorting worked after i only enabled it for the world and tilemap, not the player.

  • @saintdark1
    @saintdark1 ปีที่แล้ว

    waiting for the next one!!!

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

    Wasn't sure if I missed something but for the cliffs, do you just have to go in and paint collision on all of them as well?

    • @dev-worm
      @dev-worm  5 หลายเดือนก่อน +1

      or you could put the cliffs you want infront of the player on a different level in the tilemap and increase the z-index so it shows in front of the player

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

      @@dev-worm didn't even think of that option! Thanks man

  • @h-angrygirl
    @h-angrygirl 6 หลายเดือนก่อน

    Hello, I will use the translator, I apologize if something is not understood, my problem is that I followed the entire tutorial to the letter but when I run the game my person "gets" under the tree trunks, I don't understand, It should be seen completely from the front but it gets underneath, when passing behind it it hides perfectly but the problem is when passing in front

    • @dev-worm
      @dev-worm  6 หลายเดือนก่อน +1

      is y-sort turned on, on all the nodes? even the parent nodes? and the main scene node? and also are you getting any errors? I really want to help you out so let me know so we can try and solve this!

    • @h-angrygirl
      @h-angrygirl 6 หลายเดือนก่อน

      ​@@dev-worm Hello, thanks for responding to my comment, I was able to solve it thanks to the comment of the user @Testikillz, he commented the following below, perhaps he has not seen it
      "Can someone explain to me, around 7:00, when we go to the player and do a negative offset of -15 to the Y, what is it doing here specifically? I played and if you don't do this step, the Your character's body will go behind the plants when it is in front. Is this some kind of layering technique? And when I make my own game, will it always be -15 like I set it to?”
      Thanks to this comment I realized that the value -15 was the one I had to set and I couldn't change it, when I put another one I got the error, could you explain to us why -15 was set? thank you

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

    can't you just accomplish the same by just using the z-index... or is there something I'm missing that might make y-sorting a better approach?

    • @dev-worm
      @dev-worm  7 หลายเดือนก่อน +1

      yes.. but the player won't go infront or behind the tree... because it'll only either go infront or only behind.. y-sort just changes the z-index based on the y coordinate!

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

      @@dev-worm Oh yeah, I didn't notice yesterday because of the collision so I thought the character was in front of the stone with the z-index.. Now that I see that you said the same thing in the video I feel dumb.. Thank you for making this video.

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

    how do you do this if you arent using tile maps ? :(

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

    In 1:29 you click on the tree. How do you make an 'object' composed of different tiles like that tree? I find myself adding collision shapes to each individual tiles of the tree trunk, instead of just having one collision shape. Any help is appreciated.

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

      It's in his previous video of the playlist.
      To quote Whisping1:
      You need to go world scene -> TileMap, then select TileSet at the bottom, next press Setup. You need to select whole tree as one tile using Shift + drag your mouse with pressed left button. If before tree was selected like separate tiles, you will need to erase these tiles w/ eraser tool. Do not forget to turn eraser off after erasing.

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

      ​@@anthoniG it's quite unintuitive to find it out, I hope they make it more clear on future version. Thanks a lot for the tip!!

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

    Idk how I got here, but my ysort only worked properly when i turned the setting OFF on my player scene(in the world scene instance)

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

    Curious on how you have the tree as 1 giant area you can click and not 9 individual areas like I have it. When I click one of the 9 areas, only that area is shown in the paint properties area, when I continue to click the other areas, only those appear there. How do I make the area 1 large one like you have so I can see the whole tree in the paint properties area? If that makes sense.

    • @dev-worm
      @dev-worm  3 หลายเดือนก่อน +1

      yes so in the tileset editor you can right click on the tiles and delete the existing tiles so you are able to create your own and when you create your own you can click on a area then hold down shift and drag to create a box which will end up being a tile that takes up multiple tile areas. So for you just delete the 9 tiles that make up the tree then hold shift and click and drag mouse to create the bigger tile out of those 9. hope this helps a bit! thanks for reaching out!

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

      @@dev-worm Ok, i remember that in the previous video but I ignored it because it was already selected haha. Better just follow along with what you are talking about I guess..haha

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

    I'm currently trying to figure out what's wrong. I have Y sort on the tilemap and the layers I need it on for. Did the origin point, collision boxes, y sort on the player, but the player is still appearing on top of the trees.

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

      As it turns out, if I waited a couple more seconds, you mention turning it on for the world. When I did that, it worked.

    • @dev-worm
      @dev-worm  7 หลายเดือนก่อน +1

      haha glad to hear!

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

    currently having an issue of ysorting. I hear alot of people in comment saying they fix it because you can turn on vsorting on player and world. But Ysorting is toward children nodes?Don't really understand what that means

    • @dev-worm
      @dev-worm  6 หลายเดือนก่อน +1

      y-sorting can only be enabled on those children if the parent node aka the world.. is also y-sort set to true

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

      @dev-worm of that's the Case maybe player and world is both parent nodes. I will have to check that on my days off

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

    Started watching your series to learn how to program a game, and so far its been very helpful. However, in this video you have the same warning on your tile map that says "a y-sorted layer has the same Z-index value as a not Y-sorted layer" and I can't figure out how to remove that. The problem that I'm having now is everything above the X axis line is Y-sorted and my char is walking behind it all. I do have all my trees and rocks and whatnot on their own layer, and everything below the X-Axis and left/right of Y-axis line are working as intended. I'm confused, if ya see this, could you attempt to assist with the issue, thanks!

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

      Same issue im having.. Idk how to fix that

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

      Actually figured it out, each layer has a Z-Index, and you have set them in correlation to your character. Basically make your char a higher # so it walks on top of everything, but higher than your character if ya need to go under it, then Y-Sorting for going behind.
      Its confusing especially if you're building with an X-axis for each layer of tiles but if ya play around and test with it, you'll get it. @@whitedovedown5266

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

      @@whitedovedown5266 you want to set the ysort layer z-index to 1 and also set your player root nodes index to 1 as well

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

      you want to set the ysort layer z-index to 1 and also set your player root nodes index to 1 as well

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

    Sorry for blowing up your notifications with fifteen comments and then erasing them. Basically I was having trouble at multiple points in the process, panicking, commenting, then subsequently figuring it out 😅

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

      haha!! all good!! glad you were able to figure everything out!!

  • @twisted4872
    @twisted4872 3 วันที่ผ่านมา

    good stuff

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

    my character just appears behind the tree both above and below the collider. :S

  • @dh.bricks
    @dh.bricks 4 หลายเดือนก่อน

    I set everything to Y-sort. I made the Y-sort origin. I made the separate layer for the tilemap. Is there something I am missing ? (edit was grammar)

    • @dh.bricks
      @dh.bricks 4 หลายเดือนก่อน

      i fixed it, i had to set the tilemaps ordering z index to be the same as the player. I also had to put my y origin at the top of my 16x16 tile by setting it to -8

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

    my player character is always behind the objects, how do i fix that

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

      nvm, if anyone has the same problem 6:50 fixes it

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

    Thanks

    • @dev-worm
      @dev-worm  2 หลายเดือนก่อน +1

      thank you!! i hope it helped!

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

    even after doing a lot of mumbo jumbo I couldnt figure out how to do the y-sort thing, I'll be glad if anyone could help me

  • @irusher.gaming
    @irusher.gaming 5 หลายเดือนก่อน

    How i can do this for Enemy, he use animated sprite 2D

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

    This is being very helpful \^-^/

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

    Really nice tutorial, thank you so much! But Godot is still so dumb as we have to toggle on SO MANY Y-sorting checkboxes :(

    • @dev-worm
      @dev-worm  หลายเดือนก่อน

      yes it is a lot of those checkboxes lol

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

      @@dev-worm in 4.3, i added tile map layer instead of tile map and now my character not hiding behind trees

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

      @@dev-worm though i did everything same and also no errors

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

      @@dev-worm problem solved, i make the player child of ysort tilemaplayer node

  • @legendaryredfox
    @legendaryredfox ปีที่แล้ว +1

    Nice video! But I think you left out the cliff part

    • @dev-worm
      @dev-worm  ปีที่แล้ว +2

      ohhhh. thats on me... my bad. the cliff would just be a collision shape at the bottom of it so you cant just walk up it, no ysort or zindex needed just a simple collisionshape at the bottom

    • @legendaryredfox
      @legendaryredfox ปีที่แล้ว

      @@dev-worm Thanks! :D

  • @arshianiyaifar5889
    @arshianiyaifar5889 ปีที่แล้ว

    That was GREAT

  • @ECytchannel
    @ECytchannel ปีที่แล้ว +1

    I'm having a problem with the Ysort of the character... it works when walking behind, but in front; his head is painted behind the object as well.

    • @kruchynix9639
      @kruchynix9639 ปีที่แล้ว

      you found any solution?

    • @kuivapastelli
      @kuivapastelli ปีที่แล้ว +3

      It's not exactly the clearest thing how the Y Sort works.
      However, here are the settings I used to get it working myself.
      Y Sort Enabled:
      world > Ordering: true
      TileMap > Layers > ysort: true
      TileMap > Ordering > true
      player > Ordering > false
      player > AnimatedSprite2D > Ordering and CollisionShape2D > Ordering: does not matter

    • @Alex002c
      @Alex002c ปีที่แล้ว +1

      You may not have set the offset of the player so that his sorting indicator is at his feet. Have a look at 6:40 onward

    • @CallumJones92
      @CallumJones92 ปีที่แล้ว

      @@Alex002c Ah, thank you! I missed that it was 'y' offset and not just moving the sprite upwards.

    • @meruginger934
      @meruginger934 ปีที่แล้ว

      @@kuivapastelli that was the solution for me....

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

    1:44 and 8:09 I honestly didn't understand how you got 1 square y and I have all the squares separate, how can I fix it?

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

      aye man, 6 months later but go back to your tileset, delete the squares with the eraser and select the objects while holding shift+ctrl and mouse drag.