Velvary
Velvary
  • 38
  • 712 838
Automatic Sorting on a Tilemap - Behind and In Front - Unity Tutorial
In a 2D game there is no real depth. All the object are only aligned on two axes and therefore one surface. In regard of the used camera angle it might be neccessary to create some kind of fake depth so that the player gets a feeling of 3D - or also called 2.5D.
In Unity this can be done very easy based on the Y coordinate. By adjusting the "Transparency Sort Axis" Unity will handle this for you and your player will be able to be in front and also behind objects on your tilemap.
As long as you are not using complex shapes and structures this simple approach should work in most of the cases. But as it is common with tilemaps: a lot will work, but just not everything. Do no despair ;)
Useful links for other camera angles:
docs.unity3d.com/2021.1/Documentation/Manual/Quickstart2DPerspective.html
docs.unity3d.com/2021.1/Documentation/ScriptReference/TransparencySortMode.html
docs.unity3d.com/2021.1/Documentation/Manual/Tilemap-Isometric-CreateIso.html
Relevant Videos:
Tilemaps Basics: th-cam.com/video/DTp5zi8_u1U/w-d-xo.html
Tilemap Colliders: th-cam.com/video/DTp5zi8_u1U/w-d-xo.html
Make Your Character Move: th-cam.com/video/xrLlZ1mHCTA/w-d-xo.html
Animate Your 2D Character: th-cam.com/video/0cycus0Ojnc/w-d-xo.html
Customizing Unity: th-cam.com/video/Ee7heJLaM_o/w-d-xo.html
Download the Character here: opengameart.org/content/16x18-character-base-template-collage
=========
💬 DISCORD: discord.gg/2sNEerVssZ
❤ SUPPORT ME: www.patreon.com/velvary
🎮 PLAY MY GAMES: velvary.itch.io/
🦜 TWITTER: Velvary1
💡 ...MORE TUTORIALS: th-cam.com/users/VelvaryGames
=========
Timestamps:
00:00​ - Intro
00:24 - The Approach
00:48​ - Preparations / Requirements
01:45 - ! URP Explanations !
02:06 - Adjusting the Sort Mode
02:​39 - Testing The Setting
02:55 - Troubleshooting
03:05 - The Pivot Point
04:55 - Rechecking the Order
05:25 - Further Information
05:45 - Thank you for watching :)
มุมมอง: 25 386

วีดีโอ

Adding Collisions For Your Tilemaps and 2D Character - Unity Tutorial
มุมมอง 36K2 ปีที่แล้ว
Collisions are an essential part of every game. This tutorial explains how to finally combine your tilemaps and your moveable, animated player with nicely working collisions and comes with a lot of tips and tricks on how to solve common problems. Relevant Videos: Tilemaps Basics: th-cam.com/video/DTp5zi8_u1U/w-d-xo.html Tilemap Colliders: th-cam.com/video/DTp5zi8_u1U/w-d-xo.html?t=320 Make Your...
How To Animate Your 2D Character in Unity
มุมมอง 32K2 ปีที่แล้ว
Getting a character to move in your game is only one part of the recipe, but without animations... Well ok, there are games without animations, but since you are here, I assume you want animations. So: ...but without animations you are missing the second part. In this tutorial we will build up on the state from the previous video linked below. Of course you can also use the content of this vide...
The New Way for Making a Character Move - New Input System Player Movement - Unity Tutorial
มุมมอง 41K2 ปีที่แล้ว
Getting a character to move in your Unity game engine takes some understandment. In this tutorial you will learn how the New Input System works and how you use it to move a 2D character. By combining a Sprite Renderer and a Rigidbody2D we will make moving as simple as possible. This tutorial is focused to be beginner-friendly and explains all the steps that happen. Building op on this we will a...
How to Make Amazing Lights For Your Tilemap with URP 2D - Unity Tutorial
มุมมอง 20K2 ปีที่แล้ว
Skip the URP Setup: 05:33 Since Unity released its Universal Render Pipeline (URP) with 2D support it is possible to create amazing light effects for 2D games. In this tutorial I will show you the basic setup and how to use the most important features. This is done by recreating the effects from my "Tilemaps 2021" thumbnail. For everyone coming from an existing project, we will upgrade it to us...
InGame Tilemap Editing - Part 9: Showing Previews On Their Target Tilemap - Unity Tutorial
มุมมอง 2.5K2 ปีที่แล้ว
By showing every preview on its target tilemap, we can get rid of previews that are visible and placed tiles that are invisible in the background afterwards. Additionally the RuleTile behavior is much more smooth with this approach. So we dissolve the PreviewMap handling. ABOUT THIS SERIES: In this tutorial series you will learn how you can create an ingame UI where your players can draw on a g...
Let's really fix: Saving and Loading Tilemaps - Unity Tutorial
มุมมอง 1.5K2 ปีที่แล้ว
This video provides a fix for my first video about saving and loading tilemaps: th-cam.com/video/icBN5Cr-kFk/w-d-xo.html For some people the InstanceIDs might get changes as they are internal Unity values. Since this never happened for me I thought using this approach should be fine, but I got educated otherwise on my Discord channel. My first fix, using Unitys AssetDatabase as a fallback solut...
InGame Tilemap Editing - Part 8: Using Rule Tiles / AutoTiling - Unity Tutorial
มุมมอง 3.4K2 ปีที่แล้ว
In this episode I will show you how easy you can integrate rule tiles (autotiling) into the existing code. But to make it even better there are some changes that need to be made. ABOUT THIS SERIES: In this tutorial series you will learn how you can create an ingame UI where your players can draw on a grid. We are going to use Unitys Tilemaps and there will be a lot of coding involved. You'll le...
InGame Tilemap Editing - Part 7.2: Updating the Build History - Undo & Redo Steps - Unity Tutorial
มุมมอง 6972 ปีที่แล้ว
In this episode we will create an option for keeping a build history in memory. With an undo and a redo function we will be able to iterate through this history. ABOUT THIS SERIES: In this tutorial series you will learn how you can create an ingame UI where your players can draw on a grid. We are going to use Unitys Tilemaps and there will be a lot of coding involved. You'll learn how you can a...
InGame Tilemap Editing - Part 7: The Build History - Undo & Redo Steps - Unity Tutorial
มุมมอง 1K2 ปีที่แล้ว
In this episode we will create an option for keeping a build history in memory. With an undo and a redo function we will be able to iterate through this history. There will also be part 7.2 soon. Feel free to check out the complete source code in the according GitHub repo. The singleton explanation from episode 1: th-cam.com/video/hx3ieBzVNg0/w-d-xo.html ABOUT THIS SERIES: In this tutorial seri...
Let's Fix: Saving and Loading Tilemaps - Unity Tutorial
มุมมอง 1.5K2 ปีที่แล้ว
Please check out the updated version: th-cam.com/video/2S6q9ykTmy0/w-d-xo.html For some people the instanceIDs might get changed as they are internal Unity values. Since this never happened for me I thought using this approach should be fine, but I got educated otherwise on my Discord channel. This code update provides some small fixes and uses Unitys AssetDatabase as a fallback solution to ret...
InGame Tilemap Editing - Part 6: Placement Restrictions - 2D Level Builder - Unity Tutorial
มุมมอง 1.9K2 ปีที่แล้ว
In this tutorial series you will learn how you can create an ingame UI where your players can draw on a grid. We are going to use Unitys Tilemaps and there will be a lot of coding involved. You'll learn how you can add the UI with clickable buttons, how to show a preview where an item would be placed and of course you can place it. It will then be drawn onto a tilemap. This part - Part 6 - you ...
InGame Tilemap Editing - Part 5: Delete Tiles / Create Custom Tools - Unity Tutorial
มุมมอง 3.5K2 ปีที่แล้ว
In this tutorial series you will learn how you can create an ingame UI where your players can draw on a grid. We are going to use Unitys Tilemaps and there will be a lot of coding involved. You'll learn how you can add the UI with clickable buttons, how to show a preview where an item would be placed and of course you can place it. It will then be drawn onto a tilemap. Part 1: I explained the b...
Saving and Loading Tilemaps - Unity Tutorial
มุมมอง 7K3 ปีที่แล้ว
If you have any problems, check out the updated version (after watching this one): th-cam.com/video/2S6q9ykTmy0/w-d-xo.html When you create a level for your game, Unity will save it automatically. But what if there will be changes during runtime or even better, the player creates a big part of the tilemap? Well then you need to save it on your own. But don't worry, creating a basic saving and l...
InGame Tilemap Editing - PART 4: Automating the UI - 2D Level Builder - Unity Tutorial
มุมมอง 2.3K3 ปีที่แล้ว
In this tutorial series you will learn how you can create an ingame UI where your players can draw on a grid. We are going to use Unitys Tilemaps and there will be a lot of coding involved. You'll learn how you can add the UI with clickable buttons, how to show a preview where an item would be placed and of course you can place it. It will then be drawn onto a tilemap. Part 1: I explained the b...
InGame Tilemap Editing - PART 3: Different Tilemaps - 2D Level Editor with Unity - Tutorial
มุมมอง 2.3K3 ปีที่แล้ว
InGame Tilemap Editing - PART 3: Different Tilemaps - 2D Level Editor with Unity - Tutorial
InGame Tilemap Editing - PART 2: Lines & Rectangles - 2D Level Editor with Unity - Tutorial
มุมมอง 3.3K3 ปีที่แล้ว
InGame Tilemap Editing - PART 2: Lines & Rectangles - 2D Level Editor with Unity - Tutorial
InGame Tilemap Editing - 2D Level Editor with Unity - Tutorial
มุมมอง 19K3 ปีที่แล้ว
InGame Tilemap Editing - 2D Level Editor with Unity - Tutorial
Creating Animated Tiles for your Tilemap in Unity - Tutorial
มุมมอง 50K3 ปีที่แล้ว
Creating Animated Tiles for your Tilemap in Unity - Tutorial
Creating and Saving a High Score List in Unity - Tutorial (Highscore Part 2)
มุมมอง 17K3 ปีที่แล้ว
Creating and Saving a High Score List in Unity - Tutorial (Highscore Part 2)
Storing Data (Objects & Lists) with JSON - Unity Tutorial 2021
มุมมอง 51K3 ปีที่แล้ว
Storing Data (Objects & Lists) with JSON - Unity Tutorial 2021
Creating a High Score Easily - Unity Tutorial 2021 (Highscore Part 1)
มุมมอง 3.5K3 ปีที่แล้ว
Creating a High Score Easily - Unity Tutorial 2021 (Highscore Part 1)
Animating Point Counter Changes (Point Counter Part 2) - Unity Tutorial
มุมมอง 1.9K3 ปีที่แล้ว
Animating Point Counter Changes (Point Counter Part 2) - Unity Tutorial
Creating a Point Counter in 4 Minutes - Unity Tutorial 2021
มุมมอง 6K3 ปีที่แล้ว
Creating a Point Counter in 4 Minutes - Unity Tutorial 2021
Animated Scene Transitions in 5 Minutes - Unity 2021 Tutorial
มุมมอง 24K3 ปีที่แล้ว
Animated Scene Transitions in 5 Minutes - Unity 2021 Tutorial
Creating Tilemaps For Your 2D Game in Unity 2021 - Tutorial
มุมมอง 250K3 ปีที่แล้ว
Creating Tilemaps For Your 2D Game in Unity 2021 - Tutorial
Fixing Tile Palette Unwanted Offset in Unity 2021
มุมมอง 8K3 ปีที่แล้ว
Fixing Tile Palette Unwanted Offset in Unity 2021
Auto Tiling in Unity - Tilemap Rule Tiles - 2021 Tutorial
มุมมอง 45K3 ปีที่แล้ว
Auto Tiling in Unity - Tilemap Rule Tiles - 2021 Tutorial
How to Customize Unity / EASILY SAID - Unity explained
มุมมอง 6693 ปีที่แล้ว
How to Customize Unity / EASILY SAID - Unity explained
Easy & Smooth Camera Follow in Unity - Tutorial
มุมมอง 5K3 ปีที่แล้ว
Easy & Smooth Camera Follow in Unity - Tutorial

ความคิดเห็น

  • @jmaslaki
    @jmaslaki 2 วันที่ผ่านมา

    It still comes out as {"Items":[{"instanceID":-39626},{"instanceID":-39660}]} instead of a readable file Did I miss something?

  • @toshiroh5997
    @toshiroh5997 2 วันที่ผ่านมา

    Thank you! It's been about one week since I starded learning game development. For some my game objects in which I want to customize collision and order in layer, I create a parent object with different tilemaps, is this a good practice?

  • @hanni6383
    @hanni6383 7 วันที่ผ่านมา

    What can i do? My player have a height of 2 tiles. If i go behind a tree with a lets say 6 tiles height i just cant sorting the bottem tile wiith the colloder part. How can i solting the second tile, the tile with the tree trunk?

  • @hanni6383
    @hanni6383 11 วันที่ผ่านมา

    Wie können wir unseren Character Sprinten lassen? Ich möchte, dass wenn man die Shift Taste gedrückt hält, sich die speed Variable um einen Prozentwert, den man am besten auch als Variable verändern kann erhöht.

  • @robbyunderdog4922
    @robbyunderdog4922 25 วันที่ผ่านมา

    you the goat fr

  • @streuselu9474
    @streuselu9474 27 วันที่ผ่านมา

    good tutorial

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

    When I place tiles in the tile palette, the order is messed up. How can I place them in the tile palette in the right order at once?

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

    Very well done

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

    aptal evladı neyi sürüklüyorsun

  • @vendle-wr1ep
    @vendle-wr1ep หลายเดือนก่อน

    i do have a question if I where to make a small 2d game if I used free tile maps from a website and built my game up of that but created the story and basically the characters dialogue and everything else would I get in trouble for using the tile maps made by somebody else and or maybe added a few more designs to it

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

    This is very helpful to me as an artist, now I know how make sheets easier for the programmer to use! Thank you!!

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

    THANK YOU, YOU SAVE MYY ACTIVITY!!!

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

    my character is UNDER the map wth am I supposed to do? 😭

    • @soupstack-o2d
      @soupstack-o2d หลายเดือนก่อน

      Check the layer order of the map and the player under the 2d sprite component, You can set the map to something like -1 so its below everything. Not sure if u still need this though

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

    Ty so much <3

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

    Should i make 2 rule tiles one for corners and the other for slopes? since they both have the same rules

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

    thank you

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

    I hope you'll continue making videos soon. I followed every video in this tutorial and everything was crystal clear and very informative. I could even improvise to make it fit my game better. Thank you so much ! I'd love if you could make more videos about how to do some generative things, like for instance duplicate the background so that the character could walk as far away as he'd like and there'll always be a map to walk on, as well as make stuff pop in and out of the map (like loot boxes the player can loot for gear) and have other characters walk and interact with our player. Anyways this was extremely helpful, I subscribed. Thank you so much.

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

    great video

  • @GameStore-26
    @GameStore-26 2 หลายเดือนก่อน

    good one🍹

  • @ms1-Alex
    @ms1-Alex 2 หลายเดือนก่อน

    My player gets suck into the colliders

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

    Awesome !!! Thanks

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

    u da goat

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

    For anyone watching this in 2024, the "Add 2D Vector Composite" option at 2:36 is now "Add up/down/left/right Composite." As far as I can tell it functions exactly the same.

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

    How to access the data from the file and implement it into unity? Hopefully you have a continuation video of this? Will look through your videos, this one was good for writing to a file, but there is no accessing the data into unity.

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

      That is what reading the file is for. You read the data back into unity using the file name.

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

    how to fix when ever i start the game it shows the animation how to make it as when i press the button it only shows animation

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

    Wow thank you for the tutorial series! So good!! Helped me out big time!

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

    i feel like i am missing something here. it's great how i got 1 tile working. but how about the rest of them? how do i make multiple tiles? do i have to make a new wave tile each time?

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

    Thank you a lot for this video! Very quick and helpful!

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

    your voice is so beautiful and this is a great tutorial, thx

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

    It’s not working can’t figure out why

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

    Thanks for your help, but I help new question that why i cant add tile collider for this animated tile :(

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

    This was super helpful, thank you so so much!

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

    Best movement video her on TH-cam!

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

    I Hate unity for this. Your video was the best instructions i've seen, thanks. But how can Unity take about 30 clicks to place some green 2d blocks on the ground and think this is normal. It is 2024 and this is something like in the early 2000's I think i'll look for something with a better user interface or give up.

  • @Story.Teller.5124
    @Story.Teller.5124 5 หลายเดือนก่อน

    This video is amazing. 10 out of 10

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

    thx

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

    thank you! so much! i now can make my game!

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

    Thanks to you my knight is less strange thanks

  • @DonWon-uz3wp
    @DonWon-uz3wp 6 หลายเดือนก่อน

    Great Tutorial, Thanx!

  • @DonWon-uz3wp
    @DonWon-uz3wp 6 หลายเดือนก่อน

    Thanks, great tutorial!

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

    For save Vector3 need create serializable version this class [System.Serializable] public class SerializedVector3 { public float x; public float y; public float z; public SerializedVector3(float x, float y, float z) { this.x = x; this.y = y; this.z = z; } public SerializedVector3(Vector3 vector3) { x = vector3.x; y = vector3.y; z = vector3.z; } } public static class Vector3Extensions { public static Vector3 ToVector3(this SerializedVector3 serializedVector3) { return new Vector3(serializedVector3.x, serializedVector3.y, serializedVector3.z); } public static SerializedVector3 FromVector3(this Vector3 vector3) { return new SerializedVector3(vector3); } }

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

    Nice tutorial! Also can use path to directory %Application%\Assets\StreamingAssets private static string GetPath (string filename) { return Application.persistentDataPath + "/" + filename + ".json"; // return Application.streamingAssetsPath + "/" + filename + ".json"; }

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

    Super straight to the point, deeply detailed, and overall soooo helpful and informative! Thanks!

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

    Thank you for this awesome explanation

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

    Hi, I know this is quite the old video and I'm not realle expecting anyone to answer hahaha, but has anyone else by any chance have the issue that if I don´t move the mouse the rotation stays stuck to the last point I was aiming at, instead of where the mouse currently is (I I move the character without moving the mouse it stops following the actual mouse). I'm aware this might be some sort of Unity limitation, but is there some sort of workaround or some other way of doing it that allows the character to follow the mouse even if I'm not currently moving it? Thank you in advance!!!!

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

    Amazing video! Two things I had trouble with: set the tile map renderer to individual instead of chunk, and if you have a composite collider, be sure to uncheck and recheck the "Used By Composite" button to reset after you have changed the pivot points.

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

    11:30 i was sure that there will be a mistake in my code, but nah, this tutorial is amazing, im glad i found you

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

    the boat 🤣! thanks for the great tutorial, I will subscribe!

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

    Is your Discord server still active? Got some questions ._.

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

    This is great stuff. Thank you! :)