TILEMAPS in Unity
Вставка
- Опубліковано 29 кві 2024
- Learn how to use the Tilemap tools in Unity to easily create cool 2D levels.
Watch TILESET in Photoshop: • TILESET in Photoshop (...
● Download Tileset: downloads.brackeys.com/tutoria...
● Extra Features: github.com/Unity-Technologies...
● Extra Examples: github.com/Unity-Technologies...
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
► Join Discord: / discord
♥ Subscribe: bit.ly/1kMekJV
● Website: brackeys.com/
● Facebook: / brackeys
● Twitter: / brackeystweet
····················································································
Edited by the awesome Sofibab and Lebonques.
····················································································
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
♪ Baby Plays Electro Games
teknoaxe.com/cgi-bin/link_code...
♪ Shaving Mirror Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
creativecommons.org/licenses/b...
For new viewers these tilemap extras are now available in the 2D pack, with example ruletiles available for import in Package Manager -> 2D Tilemap Extras -> Waterfall Animated Tile, Pipe Rule Tile, and Dungeon Rule Tile.
wait so does this mean i dont have to separately download it for unity if i select the 2D option when im creating, or is there a whole pack i should download from unity for making my game? im a beginner and this will be my first game!
Oh my god his icon is brackets. Brackeys. His name... and his icon... Why didn't I notice this sooner?
OnlineShopping haha welcome to the secret group of us who have realised this! You will be sent an invitation to or hq tomorrow.
Mindblown
woah
woah, lol
Lol I never realized that either
*That desktop background though!*
Sykoo you guys should colab
I agree, that would be *SUPER UNITY COLLAB* :P
Exactly
@@detritus9069 not anymore
@@fransiscowijaya no
If people are still having problems with the lines appearing after 10 other fixes (like what I went through), changing the cell gap in the grid's inspector to -0,001 will make sure the lines are gone, while the tiles themselves look the same to the naked eye.
you are a lifesaver
i have changed it and still have the lines
Don't forget to set the sprite filter to point(no filter)
Thanks a lot ^^
Bless your soul
1:55 thanks so much for showing me the point, I was so confused why the pixel art was blurry
Great video. When i started with 2D Tiles in December, i had to learn all this the hard way ^^ turning off Antialiasing and Compression, setting Tile Size etc. until it looked right.
Now that you've shown me the Terrain Tiles i'm definitely gonna check out those 2D extras from Unity; painting a level is so painfully slow when you have to switch the tile for corners and walls all the time by hand :/
Just awesome as usual!!! Thanks a lot for your videos, I'm an indie developer and I use your tutorials a lot during my work. Thanks again for your work!
Yo Brackeys, you are now officially my favourite yourube channel ever, thank you for the awesome content man!
The work you are doing is massive you deserve all your viewers and more.
Keep up.
this is sooo wonderful!!! it finally convinced me becoming a patron of yours. keep up the good [2D] work!
If you're having trouble when updating slices in your tileset using a fixed tile size, try slicing just once but with all your empty spaces filled with something (like a solid color). This way your tiles and palettes will update as you go and you'll just need to clear up your main file after to get the transparent parts.
Exactly the video I've been looking for, 2 years later and you're still helping people out
doesnt work anymore though :,(
You should do a video on biomes and procedural terrain. I know you have one already but it’s really basic. I would appreciate it if you do it!
Helpful tips:
if you use default settings for tilemap, and you found when you paint tiles on grids, it's too small or too big, you can change the "Pixels Per Unit" value in the texture's inspector.
for example, your texture is 32x32 per unit, then you change this value to 32
Yep! Hugely important point. Don't just change grid size to match up like I've seen some novices do. Change the PPU to match your tilesize. In my case 16x16 but it can be anything.
He covered this @ 1:32
I keep watching this over and over for reference. Great video. It covers everything I need to know!
Thank you for your video! Just bought a bundle with RPG elements from Humble Bundle, and this tutorial helps me out a lot :)
Very clear.
Love your work, you fuel my passion for making games, thank you
3 years late, and still the only game dev tutorial channel I honestly learn anything from!
Yeah me to
true, but sadly he decided to put up with making games
thx for the hint with disabling anti aliasing! i always wondered why the lines appear
Thank you so much! I have watched about 5 videos on tile maps, and this is the first one that explains every question I had
Damn this is just was i was looking for a few days. You helped me a lot =D
Love your videos tho
For those having trouble with the tilemaps having lines reappearing (like gaps): try putting the sprites on a sprite atlas, set the filter to Point, set the Compression to None, leave everything else by default, and click "Preview Pack". This helps me :)
What about resizing them? Every tile takes 3x3 while i only need 1x1, how do i scale them? I tried 1x1, 30x30 and 40x40
@@aneade8892 Try creating a new default sprite material, turning on pixel snap and then applying this to the tile maps
My new favorite channel. Oh god I’ve only seen a few but I’m on a Unity kick now after using Unreal for quite some time. I’m going to binge watch all of your videos for the next few days.
I've been following you Brackeys for many years. Thank you for this tutorial video
for those having hard time trying to fit there sprite image to fit the tile map's grid, select the sprite image and go to the inspector and change the *"pixel per unit"* to fit the pixels use in creating your sprites for example
(if im using a sprite image with 16x16 thats *160x160* then change the 100 default pixel per unit in the inspector to 160x160 then hit apply to fit the pixels used to creating that sprite if not your sprite might not fit the grind, like its too big or too small)
Thx!
Absolute legend, thanks
Make a vid about building system in game with tilemap
HECK YEAH! I was showing your previous TileMap videos to people at Global Game Jam 2018! Well done, again!
Thanks a lot Brackeys!! I had the same problem as you had and the solution to create the palette in order it's just what I needed. Thanks again and new sub!
Great Tutorial, although collision wasn't explained (Still, easy to figure out). Also, it seems the auto tiles and animated tiles still haven't been included with 2019.3?
My Gosh This guy is the best Teacher i have ever had .Thank u so much brackeys .
oh and i subbed
Between brackeys and udemy I have managed to learn a lot about C# and Unity and how to handle the engine. Seriously great resources.
Thanks! With one artist on my dev team, this is an insane time-saver.
Always trust Brackeys to come up with quality, top notch stuff. Hats off.
Thank you brackeys for your tuts, they're really helpful, clear and precise tuts! more power
Never skips a step, never assumes you already know something yet still manages to keep it concise. A very talented teacher
You should do a mobile game tutorial or something if you haven't already
By the way I love your channel so much, you have helped so many people in the game industry and I'm thinking of becoming a Patreon supporter📱🎮👾
No GRQ Schemes!
It is really good to see how you are progressing! I wish you success in your career
I love you. you have no idea how long ive searched for the answers you have now given me
How do you move tiles in a tile palette like at 5:51? I tried using the 4 arrow move button but it didn't move any of the tiles.
EDIT: Nevermind I figured it out. First, you unlock tile palette editing, then you use the select tool on the far left of your palette window, then switch to the move tool I mentioned earlier, then move freely.
thanx pro
Bro this actually saved me, thanks, I've spent like a month trying to figure this out lol
edit: I can't figure it out and I'm dying inside
edit 2: I figured it out!
God im stupid i was spending like 5min
"Wtf does he mean... i cant get this to work."
Somehow, even after reading (too quick i guess) your message, i still missed the step of clicking on the select tool.... So now i feel stupid, but at least thats one problem fixed. Thanks.
cloudsat7326 how do you unlock the tile palette editing? I know you commented this over a year ago but I’m hoping you could reply decently quick
Play 2 Win for my unity 2d, theres the word “edit” just above all the tiles in the tile palette view
If you still have the line. You could try to go to the Grid component, and set the Cell Size from 1 to 0.99, both the X and Y.
This was the solution that worked for me. Thank you!
I've just checked because I thought it was a long time since the last video. And at the same moment (1 minute ago) you uploaded it. I approve. :)
Choosing "Automatic" type of slicing is also quite useful, if you have problems with "Grid By Cell Size"
You are awesome!
It's like a good StackOverFlow on UA-cam but with something more inspirational!
Brackeys, I love your videos, how would we get perfect pixel? I mean that pixelart looks really weird on Unity, like, the pixels get resized by the position of them...
it is quite relieving to see big creators like you having silly concept gaps like importing tiles the wrong way, just like beginners like me do, that definitely gives me hopes that one day i will become a proper game developer!
Pretty much well done a pleasure to follow (audio is pro level). I'd recommend to integrate the corrections, as it would be worth it.
To everyone with the lines between the tiles even after turning off anti-aliasing here is the solution.
In the asset folder (or any place) right click and and click create, then choose material.
In the Inspector panel for the new material click on the shader and change it to Sprite and then Default. Make sure Pixel Snap is checked.
Following this, in the Hierarchy click on any tilemaps you have and go back to the Inspector panel on the right. In the Tilemap Render press the circle beside the Material and choose the new material you made.
Ta Da!
wow, thanks!
...why did this make more lines..?
thank you so much
Thanks bro!
I got more lines too ):
You can also rotate tiles by pressing "[" or "]"!
Wow. Thanks a lot. 2d-extras/terrain - is what I needed in unity tilemaps. I loved this feature in Tiled editor.
can u share how you imported it to the project?
Thx you so very much for making this video! Wasn't aware of those features at all and it is gonna be so useful for the project I am working on atm. :)
A video on asset bundles maybe?
When I disable the anti-aliasing I have this lines... Why?
Thanks so much for this tutorial! Very helpfull! I used it as a reference in one of my videos, I gave you credit in the description :) I'm making my first game while sharing everything that I learned that week :) Hoping to inspire other beginner developers while motivating myself to keep going!
Thanks Brackeys!! Been waiting to learn more about this.
Thanks for this tutorial Gyllenhaal
Disabling anti-aliasing didn't seem to solve the problem of getting rid of the lines/gaps on the tile map, I still get the background appearing through gaps where tile ends, I've seen suggestions to edit the tiles in Photoshop to solve this, however when you have over 1000 tiles this would be very time consuming, does anyone have an alternative suggestion to this that would solve the problem?
Pixel snap on the material works
I saw in another video that you can click on the Grid and in Cell Gap, put in a VERY small negative number, like -.0001 and it takes care of the issue. YMMV.
Yes. Get tile to unit. I got it a few years back and its amazing.
i am late but if someone else has problems here might help
check what type of tilemap are you using?
did you check if your tile size fits your grid ?
"By default, a Tilemap’s cell size is set to 1x1 unit, which is fine for a traditional Tilemap with square tiles where a tile’s pixels per unit matches its resolution. For hexagonal and isometric Tilemaps, we’ll need to change that. To find our cell size, we’ll divide the tile’s pixel resolution by its pixels per unit setting."
this is amazing, thanks brackeys!
Your thing is great, everything. I'm a tutorial junky and yours are top of the line. Thanks!!
I downloaded the package, dropped it in unity, but it only gives me errors and doesn't give me any of the options you showed. There's also no install/use guide so I don't know what's right or wrong - anybody else dealt with this issue?
Yes me too
Did you figure it out?
I ran into the same problem. Here's what I did to fix it.
Download the 2d Extras features as a zip file.
Extract the zip to any location on your hard drive.
Open your project in unity and go to the Window menu and select Package Manager.
On the Package Manager window select the + in the upper left of the window and select Add Package from Disk.
Navigate to where you unzipped the 2d Extras and select the Package.json file in the 2d-extras-master folder.
To get the samples he shows you need to download the 2d-techdemos at the link above.
Copy the Assets and Package folders to your project folder and merge them with the existing Assets and Package folders.
You should be good to go.
@@mbrown1253 i followed these instructions exactly and now my project won't open because of package errors. i feel like this is more trouble than it's worth.
When you say "hierarchy", it sounds like "horror key"
he could prounounce it like " high-ar-key
Equally disturbing every time I watch this. Like, I feel I have to check under my bed or in the closet.
Really good video, you can explain all the things so good ! :D
Great vid ! You haven't talked about the use of the tile map for 3d environment, but this is very handy :)
So I downloaded your photoshop-edited tileset, and changed to no anti-aliasing.. but still, the black flickering is all over the place. What should I do?
Turn off Bilinear filtering on your tilemap textures.
Is there a way to add colliders to all the tiles placed in the tilemap
Edit: Never mind I figured it out. You just add a tilemap collider to the tilemap itself.
Thank you :)
The tutorial I needed, thanks man !
Those small captions were killing me the whole time :D
Thanks for the video!!
when I import my tilemap it loads it in but I never actually see the tiles in the pallete
Set the sorting layer of tilemap to default and sorting order to 10 or something
For me the exact opposite happens.
Its visible in the palette but it doesnt show up in the tilemap
5:13 all the tiles are super small in the tilemap box, I can't tell what they are
You can zoom in
I've not been hearing Jason's name as a Patreon anymore. It was one of those things that completed your credit section. I could what you'd say next. I miss those times. Thanks for you tutorials. It's been lovely from the beginning.
Excellent tutorial, you are an incredible teacher!
I followed the instructions, but when I drag my tiles into the palette window, they don't show up. They get created, but they don't go into the window. Help?
@@part-timetoaster5075 pretty sure its because you have "edit" enabled. I had this problem too. Just click on the edit button in your tile pallete window. Very bad GUI design.
Well, I've met this problem too, and I haven't googled any proper solution (though there are a lot of posts about this issue). For me it shows up when I choose Cell Size to automatic (in create palette window, not in sprite editor). Hope it would be useful to someone.
I still have the weird lines between tiles even after the anti-aliasing was disabled...
Disable the compression and filter on the Sprite itself in import settings
@@wahhajmustafa1907 thank you!
@@wahhajmustafa1907 I fking love you my dude
@@wahhajmustafa1907 I LOVE YOU
@@wahhajmustafa1907 I still have lines even with those changes too :(
brackeys always got the best tutorials
if you have a character in scene on layer 1, you can change the topmost tilemap layer to -1 and then -2 and so on and that will fix any visual glitches (mine would go behind the tiles on certain inputs )
whenever i use the tiles palette my grid goes away and i can only paint in tiny 1x1 squares in a huge area
did you find a fix because i have the same problem
I'm having the same problem.
Figured it out: Highlight your palette and change the "Pixels Per Unit" to "32", and apply.
I love this new tool in Unity but I my pixel art tends to jitter every time my camera moves and it looks pretty bad (but only when there is camera movement). Does anyone know why this happens?
Felipe Dermann my guess is your monitor refresh rate. I have seen screen tearing on my monitor in Unity when it runs at 59 hz.
My understanding is if your camera moves faster than the player, it follows to quickly and gets ahead and needs to correct by jumping back real quickly. If you haven't established a camera speed variable to smooth out the movement, do that and make sure it's not going faster than the player.
Wow! Great introduction on how to use Tilemap!
A lot of people seem to get stuck because they're not slicing up the tilemap image, The sprite has to be set to [Multiple] mode instead of the default [Single]. Next, open up the sprite image asset in the Sprite Editor window, and choose [Slice > Grid By Cell Size] to slice up the image into multiple sprites that are the same size in pixels as the tiles in the tilemap sprite image asset.
DID YOU HAVE TO UPLOAD THIS AFTER I LEARNED THIS?
Well, it'll be usefull for people like me =]
Kealo and me :D
i know how yo feel
thats why i am going to wait for shader tutorials
crazy gamer wait hes gonna do that!? DAMN IT!!
i can't find tilemp option in 2d game object
osamation omar same
Hey, could you make a tutorial on how to make an event system ( random events chosen from a list after you go to a ? node) like in Slay The Spire? Thanks for all the content you made so far, you're amazing! :)
Great Stuff, I would love to see a video on Procedural and physics based animation!
0:30 Is that how they pronounce "You da man" in Sweden?
lol
He is from Norway
Please, how to make game like tekken or MK or SF
A good example to see amazing tile art is secret of mana. A lot of the maps are tiles. What they did is to cover them up with tiles. So you have 2-3 layers of tiles which really makes it hard to see that they use tiles at all. ;)
Good video ;)
It'd be nice to see a video on the new Unity Hub
Edit: And shader stuff!
wait how it is only 36 views and only 18 like is UA-cam Broken #BrackeysIstheBest and can you brackyes make a tutorial about maya for game modeling pls
I guess someone should do a tutorial on how to manage the unimaginably large amounts of 'real-time' view counts youtube servers need to deal with on a minute to minute basis and you'd understand it is not actually 'broken'. It's simply set up in such a way the priority is with uploading / downloading videos so we can watch whatever new stuff Brackeys puts out, instead of having to wait for a somewhat meaningless counter to update itself LOL.
edit: by the way, you're correct about the likes lol. Missed that the first time.
yeah, it's just youtube being youtube...
Brackeys is still one of the best unity guys, don't get me wrong.
no blender ftw
I downloaded the 2D extras tilemap feature which includes the other tilemap features for animated tiles, pipeline tiles and blah blah blash. Then i extract the zip folder to the Assets folder of my 2d project. However i coudnlt use the feature and i got an error. Am i doing something wrong? Please help me!!
pretty sure you gotta unzip the files, you can do this by using a program like winrar. Hope this helps!
Im very new to unity in general and ive just been watching all of your vidoes before starting anything and I was just wondering if you planned on making videos that would teach making a 2d game using these types of maps. I just cant really find any videos on how to do things like player movement and stuff for 2d. If you could maybe consider making videos about it I would love it TY!
Lol I noticed the logo was brackets after reading the comments. Amazing tutorial again! :D
I’m an indie developer an I have a small UA-cam channel, I’m fairly novice I’ve been doing Game art for around a two years transferring from 2d to 3d Im curious on thoughts of my progress if you have any free time, and also this tilemap video is going to do wonders for me on my next upcoming game ! Thank you so much
Amazing work brother. Can't wait to play your game.
ps: if you need any help in programming, i would love to help.
Wow thank you I really appreciate that! Right now the only tricky part for the code portion of the game is setting up a database, we seem to have alot of trouble with that.
Avidi is there anything specific you find hard about creating a database for it? :)
Sykoo yea there is, you can email me at avidihd@gmail.com an We can talk about everything if you are interested, thank you for the help
i would love to help you but i know very little about database. :(
I misread the title as TIMELAPSE xD
I just realised timelaps and tilemaps have the exact same letters, except the "m" and "l"...
The more you know...
Kealo true lol
lol
I know that this comment is old but I just need to point out that your spelled timelapse wrong
Brackey's sir you are the best thank you so much for making Unity easy to understand
This was incredibly useful, thank you!
I need some help, it doesn't show tile map for me in 2d object. I don't know maybe, I missed a step or something but I can't find it.
Golden Gamer download the lstest unity version
thx, u don't know how long I waited for an actual answer, even if I do feel dumb for not thinking of that :P
Golden Gamer np bro, but one thing ineed to say is. Dont update it by pressing update when you open unity because that will only go to the newer version. Forexanple if u have 5.6.0 it will update to 5.6.1. Instead just go and download the unity 2018 installer from the website
PROJECT: Joza100 I couldn't find the update button so that's what I did :P
Golden Gamer ok nice xd
that ugly weird lines. disabling anti-aliasing didn't work!
Pixel snap on the material works
@@miksuko Still won't work
I know im late af but set filter point on point (no filter) on the sprite itself that works for me.
Could you do a further video on how to manipulate a tilemap (adding and removing tiles via interaction) at runtime?
Omg yess! I've waited so long for this!
Who is here after brackeys quite UA-cam
Me
9 yo: **unity is a copy of Mario Maker >:(**
@@disrespecc9678 I am of that age and find this offensive.. This is more like 20+ yo
Love this video man, you're a star.
Omg thank you so much this was so helpful