Easy Tilemaps and Dynamic Auto Tiling - Unity 2D

  Рет қаралды 32,706

Game Code Library

Game Code Library

Күн бұрын

Пікірлер: 78
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
In response to: "Why is the pixel per unit set to 15 instead of 16❓" You can try it out with 16x16 - but with exact sizing with sprites this can cause tearing: you’ll see white lines flickering between your tiles! To fix this I use the easy way of setting the pixel per unit to be one less, which means we have a bleed edge - an overflow for the sprites! There are two other ways I know to fix this: 1. Manually edit your sprites to be bigger with a bleed overlay: so add a few extra padded pixels around all edges so it’s say 18x18, then you can use 16x16 in Unity safely! (Time consuming!) 2. Use a sprite atlas (found in the 2D menu) where you add an entry for each sprite in your tile map. Since this is a quick and easy version, I did my lazy way which I use for small projects! In professional level production you can use one of the above methods.
@timothykessler5029
@timothykessler5029 Жыл бұрын
not sure if the tearing is the same issue, but i just saw another video on tilemaps by MoreBBlakeyyy where he shows that turning off anti-aliasing in the project settings fixes this.
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
You can fix this issue by just creating a sprite atlas of all sprites used with tiles. Hope it helps :)
@nTu4Ka
@nTu4Ka Жыл бұрын
You deserve a lot more subscribers. Really good quality tutorial!
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thank you I really appreciate that 🤝 I’ll keep working hard to put out helpful vids! 🙏
@LukeCreates
@LukeCreates Жыл бұрын
A couple days ago when I was looking in to this I would have loved this tutorial. Explain things so well. Thank you.
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thank you I’m glad you think so! Hopefully next time I can make a video you need when you need it! 😝🫶
@SaintMemes701
@SaintMemes701 Жыл бұрын
You make the best and the quickest tutorials and it helps a lot thankyou very much
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
You're welcome! I glad you like them! I used to always get impatient with slow KZbin tutorials, so I plan to make the best and most concise videos I can! 🤩
@vigajad7677
@vigajad7677 4 ай бұрын
Short and clear, wonderful tutorial, exactly the thing I was looking for, thanks!
@GameCodeLibrary
@GameCodeLibrary 4 ай бұрын
So glad it helped and you enjoyed!! I always tried to make videos short and sweet, but people have asked me to slow down a bit now 😂 glad we have the same brain speed 🤝
@RadicalTrailers
@RadicalTrailers Жыл бұрын
A fantastic Tutorial, nice and clear and easy to follow 👍
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thank you so much! I really appreciate it 🥲 I worry if they’re either too fast or too slow, going to try find the perfect speed! Your comment helps my confident 🙏
@RadicalTrailers
@RadicalTrailers Жыл бұрын
@@GameCodeLibrary Well I was able to follow, and I'm super new to Unity, I think you nailed the speed, what I really like is the bubbles you have pop up showing exactly what you are doing in the Inspector/project/Heiarchy and Such, It really does make it easier to understand 😃
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
@@RadicalTrailers Yeah I had the idea for the text bubbles later on and I'm glad I added them!! Whenever I followed tutorials I'd forget what they'd said, so it's nice to have an on screen reference ☺ I have lots of video ideas so hope some future ones help you too! Thanks again for your opinions, helps so much! 🤠
@analog_dreamer
@analog_dreamer Жыл бұрын
Awesome tutorial, thank you
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
You’re welcome!! I’m glad you liked it
@abyssianknight736
@abyssianknight736 Жыл бұрын
Just found your channel,its just like watching a video from brackeys, just as clear and entertaining, love it
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thanks so much! Getting the brackeys comparison is high praise haha - I'll try keep up the vids!
@abyssianknight736
@abyssianknight736 Жыл бұрын
@@GameCodeLibrary looking forward to learning more from you 😁
@Mimi_py
@Mimi_py 9 ай бұрын
Good for a refresher on how to do it, People new to unity might struggle to follow along, Helped me so I like though
@GameCodeLibrary
@GameCodeLibrary 9 ай бұрын
Difficult to find the right balance sometimes - but I'm glad you enjoyed! Hopefully if it's too fast for new people, they can rewatch or pause it lots :p
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
On my Patreon you can get the package which includes this Tilemap and Rule Tile - so you don't have to set it up yourself: www.patreon.com/posts/tilemap... (My Patreon also includes all past and future code, packages and assets used on my channel!)
@StudioCowcowwow-y8p
@StudioCowcowwow-y8p 29 күн бұрын
Thanks for sharing!
@GameCodeLibrary
@GameCodeLibrary 29 күн бұрын
You’re welcome! Hope it helped!
@BenHollands-w3o
@BenHollands-w3o Жыл бұрын
Awesome!
@llamasoxschwartz7185
@llamasoxschwartz7185 Жыл бұрын
I love your voice
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thank you!! I try to sound the least annoying as possible 😂
@itsbarrex
@itsbarrex Жыл бұрын
wow! easier than I thought! thank you for this tutorial, love it! keep it up =D
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Glad you enjoyed! :-)
@totheMoon-qv4jn
@totheMoon-qv4jn 6 ай бұрын
Thank you, it really helped me 💪
@GameCodeLibrary
@GameCodeLibrary 6 ай бұрын
So glad it helped!! :-)
@romanartyushkin2486
@romanartyushkin2486 Жыл бұрын
Great stuff. Please do more.
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
I have lots and lots planned! Let me know if there is anything in particular that you'd like to see. :-)
@kozmobotgames
@kozmobotgames Жыл бұрын
Amazing tutorial!
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Thank you!
@kozmobotgames
@kozmobotgames Жыл бұрын
@@GameCodeLibrary ever since I was a child, I was always dreaming about making games. Although I opened my first YT channel for traditional drawing when I was 19 years old, I started a game development channel one year later. I am proud to see how is my channel growing after two years of actively posting new videos every week or two weeks. I am happy to have so many views and positive reviews from people who watch my tutorials!
@EpicHashTime
@EpicHashTime Жыл бұрын
Why is the pixel per unit set to 15 instead of 16?
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
You can try it out with 16x16 - but with exact sizing with sprites this can cause tearing: you’ll see white lines flickering between your tiles! To fix this I use the easy way of setting the pixel per unit to be one less, which means we have a bleed edge - an overflow for the sprites! There are two other ways I know to fix this: 1. Manually edit your sprites to be bigger with a bleed overlay: so add a few extra padded pixels around all edges so it’s say 18x18, then you can use 16x16 in Unity safely! (Time consuming!) 2. Use a sprite atlas (found in the 2D menu) where you add an entry for each sprite in your tile map. Since this is a quick and easy version, I did my lazy way which I use for small projects! In professional level production you can use one of the above methods. Hope that helps!! Long reply 😇
@EpicHashTime
@EpicHashTime Жыл бұрын
@@GameCodeLibrary Thanks. I tried setting my player sprite to one pixel smaller and it no longer looks like it's floating 👍
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
I’m glad! It’s always good to try out things to see how it works for your game 😊
@Novastar.SaberCombat
@Novastar.SaberCombat Жыл бұрын
It's always a good idea to give a little "wiggle room" to everything. Otherwise, collisions, layering, and even mechanics can look... well... too rigid and mechanical. In the original "Pac Man" game (1980's), controlling mr Pac guy allowed for "rounded" cornering during player manipulation. The ghost enemies were NOT permitted to do this. 🙂 This is why it was easier for players to gain ground and escape ghosts in "J-bends" or multiple curves as opposed to straightaways. What does this have to do with 15 pixels vs. 16? Well, the CORNERS of ledges can be rounded as well. This allows players to leap up to ledges (or fall from them) with less rigidity and blockiness. 🙂 🐲✨🐲✨🐲✨
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
@@Novastar.SaberCombat A great explanation!! 🤩
@emieljoormann6144
@emieljoormann6144 16 күн бұрын
super nice video! Why actually do you make the pixels per unit of the sprite 15 in stead of 16 pixels? Im not getting my head around it still. :p
@GameCodeLibrary
@GameCodeLibrary 15 күн бұрын
I pinned the answer at the top of the comments :-) (It's this) In response to: "Why is the pixel per unit set to 15 instead of 16❓" You can try it out with 16x16 - but with exact sizing with sprites this can cause tearing: you’ll see white lines flickering between your tiles! To fix this I use the easy way of setting the pixel per unit to be one less, which means we have a bleed edge - an overflow for the sprites! There are two other ways I know to fix this: 1. Manually edit your sprites to be bigger with a bleed overlay: so add a few extra padded pixels around all edges so it’s say 18x18, then you can use 16x16 in Unity safely! (Time consuming!) 2. Use a sprite atlas (found in the 2D menu) where you add an entry for each sprite in your tile map. Since this is a quick and easy version, I did my lazy way which I use for small projects! In more professional level production you can use one of the above methods.
@teamofwinter8128
@teamofwinter8128 9 ай бұрын
your voice is very soothing
@WhimsicalWyatt000
@WhimsicalWyatt000 3 ай бұрын
ayo
@bluzenkk
@bluzenkk Жыл бұрын
can you make a tutorial on using LDtk or Tiled. I think that will improve workflow than using the unity tile map edit.
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
I could do a video on the options for tilemaps other than unitys basic one! And show how to import with them all… I’m covering the basics of getting a project up and running in the easiest way right now, but I’ll get into details like this in the future!! Thanks for the suggestion 😊
@bluzenkk
@bluzenkk Жыл бұрын
@@GameCodeLibrary thanks for keeping an open mind. I've been digging to find more tutorials on Tiled Edit and LDtk. cuz i saw a KZbinr use Tiled and automated the workflow of adding collision and new tiles so effciently that makes the Unity Tilemap look so obsolete.
@WhimsicalWyatt000
@WhimsicalWyatt000 3 ай бұрын
My cube is gripping on to the side of a cliff with his teeth, how can I fix this?
@GameCodeLibrary
@GameCodeLibrary 3 ай бұрын
I show a fix for this in this video! The link should be at the right time, but it’s the chapter “fix sticking to platform” or something like that. It removes the friction from our player so they don’t grip the edge! kzbin.info/www/bejne/hYWYZGqIm7Otebc&si=LTlARrcLJ0nyrdq_
@johnathansuda570
@johnathansuda570 Жыл бұрын
Any experience with incorporating navmesh with tile mapping?
@kaviyy
@kaviyy Жыл бұрын
The used by composite part does not appear for me... what is the reason?
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Sorry for such a late reply! Was away this week :p On your actual tilemap component, make sure you add a Tilemap Collider 2D and then a Composite Collider 2D. After the Composite Collider 2D is added, the tick box should appear on your Tilemap Collider 2D. When ticked, it should merge your multiple tile colliders into one big collider! If it doesn't appear to - try resetting your project and seeing if your collider has updated. Hope this helps!
@harelweiss1039
@harelweiss1039 3 ай бұрын
How do I do that with five different upper tiles???????
@GameCodeLibrary
@GameCodeLibrary 3 ай бұрын
I have a video here about layering tilemaps: kzbin.info/www/bejne/i3rHYaCtltN1kMk
@mysticowlgames
@mysticowlgames Жыл бұрын
How would you work with sliding colliders or slopes in Rule Tiles? I am unable to figure it out
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Hey! I haven't tried it out myself, but I've seen this cool video for handling slopes and rule tiles! kzbin.info/www/bejne/mpWUd5hpds6Kmtk However, it's a paid for tool. I haven't seen anyone else work with rule tiles and slopes! So you could manually add the slope on after painting your map out with rule tiles simple block shapes! Sorry I couldn't help more, good luck :-)
@scoop9551
@scoop9551 Жыл бұрын
How would you make a platform made from tileMap falling for example ? I have a script working for gameobjects I created ( Like a rectangle platform ) , but I can't attach those to tile maps ?
@dreamspheree
@dreamspheree Жыл бұрын
I am using slopes in the tile map and the collider is not pixel perfect . And the character looks like it's floating
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
You can try using a polygon collider 2D and shaping that to your slope instead of the tilemap collider! I’ll try it out tomorrow to see if I can find something better if that doesn’t work for you 🙏
@dreamspheree
@dreamspheree Жыл бұрын
@@GameCodeLibrary thanks! you're too good i'll check it out
@dreamspheree
@dreamspheree Жыл бұрын
well i did some experiment, if i redraw the slopes in a new sprite sheet like 64x64 tiles (original is 16) i can see the tile collider is much more accurate... so weird unity over pass that
@AlwynCho
@AlwynCho Жыл бұрын
useful tutorial thankyou! keep good work
@battelbad12
@battelbad12 Жыл бұрын
The moment I saw aseprite I immediately sub 😂
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
Lol aseprite superiority 👌
@battelbad12
@battelbad12 Жыл бұрын
@@GameCodeLibrary wise word 🙏
@edithasd2806
@edithasd2806 Жыл бұрын
lol I solved it. Thanks a lot
@GameCodeLibrary
@GameCodeLibrary Жыл бұрын
I didn’t see the original problem but I’m glad you solved it 😝🙏
@GameCodeLibrary
@GameCodeLibrary 10 ай бұрын
❗❗❗😱📢 50% OFF LAUNCH SALE!! 😱👾❗❗❗ BUY THE COMPLETE GAME TEMPLATE NOW!!! gamecodelibrary.itch.io/2d-platformer-template
@FP-ih1lu
@FP-ih1lu 9 ай бұрын
super hard to follow along, I ran into 10 problems that you didn't run into, and nothing is actually explained for the viewer's understanding :(
@GameCodeLibrary
@GameCodeLibrary 9 ай бұрын
That’s a shame I’m sorry! What went wrong? Hopefully you can find a slower video that works for you 🙏
@yungorange209
@yungorange209 5 ай бұрын
When she’s Australian
PERFECT Tilemap Sorting Layers - Top Down Unity 2D #3
13:16
Game Code Library
Рет қаралды 8 М.
How To Use Auto Tiling in Unity 2020
12:11
gamesplusjames
Рет қаралды 56 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
How to Code (almost) Any Feature
9:48
DaFluffyPotato
Рет қаралды 715 М.
Create Dynamic Tilemaps in SECONDS - Unity tutorial
7:52
MoreBBlakeyyy
Рет қаралды 147 М.
How to RIG & ANIMATE 2D Game Characters | Unity 2024 Tutorial
8:29
Game Dev Rocket
Рет қаралды 8 М.
How To Wall Slide & Wall Jump In Unity
6:38
bendux
Рет қаралды 80 М.
Improve your Platformer’s Jump (and Wall Jump) | Unity
8:12
Dawnosaur
Рет қаралды 136 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
What if Old Minecraft Mobs were Created Today?
28:05
KazooCat
Рет қаралды 778 М.
Creating Tilemaps For Your 2D Game in Unity 2021 - Tutorial
7:07
Technique for Creating Beautiful Level Design
11:48
Pixel Architect
Рет қаралды 917 М.