PERFECT Tilemap Sorting Layers - Top Down Unity 2D #3

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • Let's plan out the layers for our top down game! We'll be adding in: Walk in front, Collision, Walk behind, and more! We'll look at collisions on tilemaps and using sorting layers to give our game an amazing sense of depth!
    Sprite sheet: pixel-boy.itch.io/ninja-adven...
    Old Rule Tile Vid: • Easy Tilemaps and Dyna...
    Full Package: www.patreon.com/posts/1068611...
    Full Playlist: • Top Down Tutorial Seri...
    All source code for all videos I have made and will make in the future can be found on my Patreon:
    / gamecodelibrary
    Be sure to subscribe to see what kind of adventure we can go on together! I'm excited! :-)
    If you have any suggestions, feedback or questions, be sure to comment below! Any opinions will help me out on this journey ♡
    Check out the full platformer playlist!
    • FULL Platformer Tutori...
    BUY THE COMPLETE PLATFORMER GAME TEMPLATE NOW!!!
    gamecodelibrary.itch.io/2d-pl...
    / shop
    #unity #gamedev #gamedevelopment #unity2d #tilemap
    0:00 - Intro
    0:18 - Plan
    1:33 - Asset Pack
    1:49 - Tileset Sprite Setup
    3:21 - Tile Palette Window
    3:43 - Create Tilemap
    4:05 - Create Ground Palette
    5:20 - Ground Layer
    5:30 - Add Sorting Layers
    6:42 - Create House Palette
    7:11 - WalkInFront Layer
    8:18 - Collision Layer
    9:16 - Player Collider
    9:58 - WalkBehind Layer
    10:45 - Decor Layer
    12:12 - Next Video!
    12:30 - Livestream?!*
    12:42 - *Rule Tile Preview
    13:07 - Outro

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

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

    easy to follow guide, good pacing, straight to the point! if I have two thumbs I would give this three thumbs up

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

      Thank you Tom 😌🙏 hopefully it can come in handy!

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

    Great video GCL! Thank you so much for this video. The explanation was Very clear, as always. I was using Tiled for the map but I think I'm going to use Unity's editor for the map too. Anyways, thank you so much! :D I'll keep an eye to the stream notif! :3

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

    1000 times thank you, I really struggled to understand this principle with layers, I look forward to your future videos :)

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

      So glad I could help!! Breaking them down into logical layers helps a lot with how I think about them too :P

  • @GiangNguyen-ho5st
    @GiangNguyen-ho5st หลายเดือนก่อน

    I think there is another technique, using the pivot point y axis to sort objects in front or behind one another.

  • @theoneandonly3086
    @theoneandonly3086 21 วันที่ผ่านมา

    using your vids to help make my own , so far so good , waiting for that camera movement vid

    • @GameCodeLibrary
      @GameCodeLibrary  20 วันที่ผ่านมา +1

      Glad you're enjoying it! Sorry on the wait for the next vid - my dad died so we had the funeral and all the paperwork to figure out! Still going through everything so can't give you a date for the camera vid sadly 🙏

    • @theoneandonly3086
      @theoneandonly3086 20 วันที่ผ่านมา

      @@GameCodeLibraryThoughts and prayers to you and you're family 🙏

  • @craigbryan1479
    @craigbryan1479 28 วันที่ผ่านมา

    I love your videos, I'm able to learn more from you than most other tutorials because your style suits me very well!
    However, you say that this series is for anyone as long as we are creating a top-down game. But that isn't really correct. A true top-down game would use the same walking animation for each direction but rotate the sprite to face that direction. I know that isn't the style you are going for with this game but would you perhaps consider a small video #2.5 to demonstrate how to do that?
    Thanks

    • @GameCodeLibrary
      @GameCodeLibrary  28 วันที่ผ่านมา +1

      You’re right!! I actually did this in a previous video - but since the sprite sheet I used contained a sprite for both directions, I thought I’d show it this way as well.
      You can check out my previous video where I flip the character!
      th-cam.com/video/_xYcrDjnjM8/w-d-xo.html

    • @craigbryan1479
      @craigbryan1479 28 วันที่ผ่านมา

      @@GameCodeLibrary I thought I'd watched all your videos. It seems this one slipped through the net. Thanks 😊

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

    Wonderful video. Very easy and good pacing. Please create more tutorial. Just a silly question, what can I do after drawing all the objects but later realize I draw on the wrong tilemap because I forget to change the layer in the palette? :)

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

      Thank you I’m glad you enjoyed! You can always use the eraser tool to remove any incorrect tiles, then redraw on the right map! You can also copy and paste tiles with the selection tool in the tilemap, but that can be tricky to get the exact ones you want 🤔

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

    nice and clear, how would you deal with animations from the player that extend beyond the rigid body, this would cause the part that's extended to clip through the point where the pillar is divided between layers

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

      There's a few different ways you can deal with this tricky issue!
      One way you could try is temporarily change the sorting layer of the player's sprite renderer - so when you play the animation it sets the layer to be one that you require (always infront? always behind? whichever works best for you!)
      There are more advanced ways of dealing with this using customer shaders for dynamic sorting, but I haven't worked enough with those to give any good advice there :p