Game Code Library
Game Code Library
  • 56
  • 135 815
PERFECT Tilemap Sorting Layers - Top Down Unity 2D #3
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-adventure-asset-pack
Old Rule Tile Vid: czcams.com/video/8UctaO5DwUE/video.html
Full Package: www.patreon.com/posts/106861111?pr=true
Full Playlist: czcams.com/play/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP.html
All source code for all videos I have made and will make in the future can be found on my Patreon:
www.patreon.com/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!
czcams.com/play/PLaaFfzxy_80EWnrTHyUkkIy6mJrhwGYN0.html
BUY THE COMPLETE PLATFORMER GAME TEMPLATE NOW!!!
gamecodelibrary.itch.io/2d-platformer-template
www.patreon.com/GameCodeLibrary/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
zhlédnutí: 903

Video

Idle and Walking Animations - Top Down Unity 2D #2
zhlédnutí 618Před měsícem
Using blend trees and the animation controller, this beginner friendly and full tutorial on Animations will give you everything you need! We'll set up our players idle and walking animations to get him moving in a FANCY way. Movement Video: czcams.com/video/DQY62meLVCk/video.html Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Package: www.patreon.com/posts/movement-with-2d-1047...
Movement with Unity Input System - Top Down Unity 2D #1
zhlédnutí 685Před měsícem
Beginner friendly and full tutorial on Player Movement using Unity's Input System! We'll also set up a default sprite for our player using the asset pack below. And look into serialized fields! Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Package: www.patreon.com/posts/movement-with-2d-104791237 Free Script: www.patreon.com/posts/free-script-with-104791310 Full Playlist: czca...
Let's Make a Top Down Game! - Unity 2D #0
zhlédnutí 1,8KPřed 2 měsíci
Beginner friendly and any genre!! In this vid we'll plan out top down base template! And create our Unity project together. The idea will be to make this base template to then use and branch off to other game genres! Super exciting! Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Playlist: czcams.com/play/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP.html All source code for all videos I h...
EASY Object Pooling - Unity Game Tutorial
zhlédnutí 533Před 2 měsíci
This EASY video will show you object pooling and also make a mini space shooter game! We'll only need one script to get object pooling going - then we'll look at how we can get objects from our pools! Object pooling greatly improves performance of our games - so is an important pattern to learn! You can also grab the WHOLE package for this tutorial and mini shooter for only $2.99 on itch: gamec...
COMPLETE Platformer Tutorial! Over 40 Features - Unity 2D 2024
zhlédnutí 3,5KPřed 3 měsíci
By the end of this video you'll have all the skills and features you need to make an amazing 2d platformer. BUY THE COMPLETE GAME TEMPLATE NOW!!! gamecodelibrary.itch.io/2d-platformer-template www.patreon.com/GameCodeLibrary/shop All source code for all videos I have made and will make in the future can be found on my Patreon: www.patreon.com/collection/14573?view=expanded Check out the full pl...
Infinite Parallax Scrolling Background - Unity 2D Complete Tutorial
zhlédnutí 3KPřed 3 měsíci
We're going to add parallax to our 2D scene's background layers, then make it endlessly scroll! This is a complete tutorial - from adding player, setting up the camera - to a beautifully scrolling background! Basically make a whole endless runner / side scroller in 7 minutes :o FREE Player Package: www.patreon.com/posts/102090173 FULL Parallax Package: www.patreon.com/posts/102091009 Background...
Add 2D Lighting to Existing Project - Unity 2D
zhlédnutí 547Před 3 měsíci
In this video we'll be looking at how to add URP 2D Lighting to an existing Unity project by adding in the URP package. Overview of 2D URP Lighting: czcams.com/video/pzBbqFrsNnk/video.html All source code for all videos I have made and will make in the future can be found on my Patreon: www.patreon.com/posts/start-menu-2d-100219159 Get my Platformer Package: gamecodelibrary.itch.io/2d-platforme...
Lighting in 2D Games! URP Template Overview - Unity 2D
zhlédnutí 318Před 3 měsíci
In this video we'll be looking at how to add 2D Lighting in a Unity game when using the 2D URP template with a new project. We'll look at a few types of lighting effects! Add lighting to your existing game: czcams.com/video/PpgRRb1sXrk/video.html All source code for all videos I have made and will make in the future can be found on my Patreon: www.patreon.com/posts/start-menu-2d-100219159 Get m...
Start Menu - 2D Platformer Unity #28
zhlédnutí 663Před 4 měsíci
In this video we'll be adding a start menu for the opener of our Platformer game! This'll include scene switching, for moving from the menu to the game, and also an exit button that'll close our application down. Also - the full controller is now available for purchase!! BUY THE COMPLETE GAME TEMPLATE NOW!!! gamecodelibrary.itch.io/2d-platformer-template All source code for all videos I have ma...
Background Music Manager - 2D Platformer Unity #27
zhlédnutí 423Před 4 měsíci
In this video we'll be adding background music to our game! We'll create a music manager which can be called from anywhere in our game to: play, pause, change and reset our background music! ❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️ gamecodelibrary.itch.io/2d-platformer-template All source code for all videos I have made and will make in the future can be found on my Patreon: www.pa...
Sound Effect Manager - 2D Platformer Unity #26
zhlédnutí 445Před 5 měsíci
In this video we'll be adding sound effects to our game! We'll create a sound effect library which will hold multiple audio clips to be randomly called - so our game stays interesting. Then we'll create a static Sound Effect Manager that will allow us to easily play our sound effects from any script in the project! ❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️ gamecodelibrary.itch.io/2d...
Speed Boost Item - 2D Platformer Unity #25
zhlédnutí 423Před 5 měsíci
In this video we'll be adding speed boost items to our platformer. On pickup - we'll increase our players speed (temporarily!) and activate a cool trailing particle effect. ❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️ gamecodelibrary.itch.io/2d-platformer-template All source code for all videos I have made and will make in the future can be found on my Patreon: www.patreon.com/posts/sp...
Hidden / Secret Areas - 2D Platformer Unity #24
zhlédnutí 437Před 6 měsíci
Hidden / Secret Areas - 2D Platformer Unity #24
Spike Traps and Bounce Traps - 2D Platformer Unity #23
zhlédnutí 511Před 6 měsíci
Spike Traps and Bounce Traps - 2D Platformer Unity #23
Falling Platforms - 2D Platformer Unity #22
zhlédnutí 372Před 6 měsíci
Falling Platforms - 2D Platformer Unity #22
Moving Platforms - 2D Platformer Unity #21
zhlédnutí 695Před 6 měsíci
Moving Platforms - 2D Platformer Unity #21
Drop Down Through Platforms - 2D Platformer Unity #20
zhlédnutí 493Před 6 měsíci
Drop Down Through Platforms - 2D Platformer Unity #20
BEST WAY to Dash through Enemies - 2D Platformer Unity #19
zhlédnutí 932Před 7 měsíci
BEST WAY to Dash through Enemies - 2D Platformer Unity #19
Healing with Health Items - 2D Platformer Unity #18
zhlédnutí 499Před 7 měsíci
Healing with Health Items - 2D Platformer Unity #18
Enemy Drop Items on % - 2D Platformer Unity #17
zhlédnutí 711Před 7 měsíci
Enemy Drop Items on % - 2D Platformer Unity #17
Player Aim at Mouse and Attack Enemy - 2D Platformer Unity #16
zhlédnutí 651Před 7 měsíci
Player Aim at Mouse and Attack Enemy - 2D Platformer Unity #16
Game Over Screen and Retry Button - 2D Platformer Unity #15
zhlédnutí 892Před 8 měsíci
Game Over Screen and Retry Button - 2D Platformer Unity #15
Player Health and On Hit Effect - 2D Platformer Unity #14
zhlédnutí 1,1KPřed 8 měsíci
Player Health and On Hit Effect - 2D Platformer Unity #14
Advanced Object Spawning on Tilemap Platforms - 2D Platformer Unity #13
zhlédnutí 1,1KPřed 8 měsíci
Advanced Object Spawning on Tilemap Platforms - 2D Platformer Unity #13
Dynamic Enemy AI to Jump Gaps and Chase Player - 2D Platformer Unity #12
zhlédnutí 2KPřed 8 měsíci
Dynamic Enemy AI to Jump Gaps and Chase Player - 2D Platformer Unity #12
Hold Button to Load Level - 2D Platformer Unity #11
zhlédnutí 1,3KPřed 9 měsíci
Hold Button to Load Level - 2D Platformer Unity #11
Jump Through Platforms (No Code!) - 2D Platformer Unity #10
zhlédnutí 955Před 9 měsíci
Jump Through Platforms (No Code!) - 2D Platformer Unity #10
Progress Bar UI and Unity Events - 2D Platformer Unity #9
zhlédnutí 1,2KPřed 9 měsíci
Progress Bar UI and Unity Events - 2D Platformer Unity #9
Advanced Item Pickup with C# Interfaces - 2D Platformer Unity #8
zhlédnutí 1,5KPřed 9 měsíci
Advanced Item Pickup with C# Interfaces - 2D Platformer Unity #8

Komentáře

  • @wasdolgaming6718
    @wasdolgaming6718 Před 11 minutami

    OMG thanks, really thanks, I was stuck on this for 8 hours straight (I just had to go to Quality and there upgraded it), thank you so much, u got a new subscriber

  • @GhostHack_1
    @GhostHack_1 Před 9 hodinami

    Your videos are gems. Thanks so much for posting them!

  • @gustavoincode7620
    @gustavoincode7620 Před 2 dny

  • @Cerowsee
    @Cerowsee Před 3 dny

    What would I have to do to make the sprite not flip during my idle animation.

  • @GhostHack_1
    @GhostHack_1 Před 4 dny

    Something to keep in mind when using the `Update()` function in unity, is `Time.deltaTime()`. You'll want to multiply by that when moving your player around to keep the experience smooth across multiple systems whose specs may differ and effect the framerate. Really like the format of your videos and your energy. Thanks so much!

  • @nèBảo1405
    @nèBảo1405 Před 8 dny

    It took me all day to code but this video does it in just a minute :)))

  • @NOpainNoGain176
    @NOpainNoGain176 Před 9 dny

    That was Super Helpful, Hoping to see more content, Thank you.

    • @GameCodeLibrary
      @GameCodeLibrary Před 9 dny

      I’m glad it could help you!! Hopefully I can get back to releasing stuff soon 🙏 busy times!! Thank you!

  • @KIRANTD-ek9bo
    @KIRANTD-ek9bo Před 12 dny

    Будто бы в видео не полный код.

    • @GameCodeLibrary
      @GameCodeLibrary Před 12 dny

      I start with the code from this video: czcams.com/video/pYu36PLmdq0/video.html The rest of the code is in the video! The full package is also on my Patreon for free if you wanna grab it and see

    • @KIRANTD-ek9bo
      @KIRANTD-ek9bo Před 12 dny

      @@GameCodeLibrary А можете подсказать почему когда я управляю объектом, с помощью кода для перемещения, то постоянно в рандомные моменты персонаж резко останавливается, и не продолжает двигаться вперед, почему?

  • @arsyt5707
    @arsyt5707 Před 14 dny

    your tutorials are super helpful and easy to follow! thank you so much!!

  • @totheMoon-qv4jn
    @totheMoon-qv4jn Před 14 dny

    Thank you, it really helped me 💪

  • @theoneandonly3086
    @theoneandonly3086 Před 15 dny

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

    • @GameCodeLibrary
      @GameCodeLibrary Před 15 dny

      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 Před 14 dny

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

  • @HellTraveler
    @HellTraveler Před 17 dny

    lovely quick guide !

  • @jj_realm7040
    @jj_realm7040 Před 18 dny

    Hi there, Thank you so much for all of your videos. So basically this video is a compilation of all the 28 videos previously? Thank you

    • @GameCodeLibrary
      @GameCodeLibrary Před 18 dny

      Hey! Yeah this video: czcams.com/video/Pkc4A1ukbJU/video.html Is one big long vid of the previous 28 :-) Some people prefer it all in one video rather than separate! If you're looking for specific features, the individual videos are better!

    • @jj_realm7040
      @jj_realm7040 Před 17 dny

      ​@@GameCodeLibrarythank you so much. ❤❤

  • @FlashProUA
    @FlashProUA Před 18 dny

    Thanks!

  • @giovani74
    @giovani74 Před 19 dny

    This is one of the best instructional videos I have seen. Nice work

  • @iop313
    @iop313 Před 19 dny

    Have to admit the best one so far all other script didn't worked but now the enemy doing something (flothing)

  • @bentheafrican
    @bentheafrican Před 19 dny

    nice tutorial, the problem I'm facing with the code is that the player jumps once and that's it, it can't jump mutliple time once you hit play. do you have any solution? Because I'm using Unity 2022.3

  • @gamertonic9398
    @gamertonic9398 Před 21 dnem

    When I reach the Aim part of the video [up to 3:48] my player movement suddenly moves really slow and I don't know what the issue is?

  • @RicityYT
    @RicityYT Před 22 dny

    pov: im explain the fnaf lore

  • @winter7843
    @winter7843 Před 22 dny

    Great tutorial, this code helped me a lot, thank you very much.

  • @craigbryan1479
    @craigbryan1479 Před 22 dny

    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 Před 22 dny

      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! czcams.com/video/_xYcrDjnjM8/video.html

    • @craigbryan1479
      @craigbryan1479 Před 22 dny

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

  • @seaderwerks3046
    @seaderwerks3046 Před 24 dny

    I just wanted to say thank you. I've been stuck on a spawning prefab issue now for a few days and just recently came across this video you uploaded. Implemented a similar approach and now my fishing mini game works in my game. Thank you for this tutorial.

    • @GameCodeLibrary
      @GameCodeLibrary Před 23 dny

      So glad I could help!! I love this method of spawning objects since you can reuse this script over any game in the future 🙏 hope your game goes well!

  • @_maxt
    @_maxt Před 24 dny

    this is exactly what I was looking for. quick and to the point without fluff. thank you

    • @GameCodeLibrary
      @GameCodeLibrary Před 23 dny

      Exactly why I started this channel, I was tired of the long winded explanations! I use my own videos as quick reminders now too haha

  • @RicityYT
    @RicityYT Před 24 dny

    ima make a game call MaRiomagined, basically Super Mario Bros. on the nes, but better! new sub

    • @GameCodeLibrary
      @GameCodeLibrary Před 23 dny

      That’s such a fun idea and also such a clever name I love it!

    • @RicityYT
      @RicityYT Před 23 dny

      @@GameCodeLibrary thanks! i cant do it rn, but i can learn how to do it. im busy this week, but im very excited to work on it

    • @RicityYT
      @RicityYT Před 22 dny

      more to add on this, basically, instead of defeating bowser, he's ki- i mean, unaliving him, and he's going through different places, not a direct copy of mario for the nes bc the big boi company gonna get angy and lawsuit :(

  • @Elaoz
    @Elaoz Před 24 dny

    beautiful job

  • @MrFactor02
    @MrFactor02 Před 24 dny

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

    • @GameCodeLibrary
      @GameCodeLibrary Před 24 dny

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

  • @geob7676
    @geob7676 Před 27 dny

    I have a problem! Unity says the code is correct, but the player always resorts to facing backwards!!! Do you know any fixes for it???

    • @GameCodeLibrary
      @GameCodeLibrary Před 27 dny

      On your characters sprite renderer, tick “flip x” or something like that! Your sprite must be facing the opposite way to mine :P

  • @91tj
    @91tj Před 27 dny

    I am trying to make a proper parallax effect for a year I guess... And this is the only tutorial that really helped me. You are awesome!!! I wish I can like 1 million times...

    • @GameCodeLibrary
      @GameCodeLibrary Před 27 dny

      So glad this worked well for you!! It’s also the easiest I’ve made parallax work so I’m glad you liked it :-)

  • @gamertonic9398
    @gamertonic9398 Před 27 dny

    I'm so surprised this channel doesn't have more subs. You teach in such an easy to learn way. Thanks so much! 🌟

    • @GameCodeLibrary
      @GameCodeLibrary Před 27 dny

      So you glad enjoyed!! As long as I can help even one person then I feel happy 😌🙏

  • @gnomewarlord7128
    @gnomewarlord7128 Před 29 dny

    You're my favourite amongst the british "people"

  • @skie1978
    @skie1978 Před 29 dny

    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 Před 29 dny

      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 🤔

  • @rayhasmoro
    @rayhasmoro Před měsícem

    Anyway to make the bounce a knockback? so instead of the player being knocked flat up they will be lobbed away from the spikes

  • @rayhasmoro
    @rayhasmoro Před měsícem

    What can we do to make the falling platform respawn if it fell?

  • @byronmorley2907
    @byronmorley2907 Před měsícem

    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 Před měsícem

      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

  • @GiangNguyen-ho5st
    @GiangNguyen-ho5st Před měsícem

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

  • @rvargas0972
    @rvargas0972 Před měsícem

    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

  • @Tariqalzidan
    @Tariqalzidan Před měsícem

    i have a problem i cannot jump and use the animation to the left side

  • @TomDytorn
    @TomDytorn Před měsícem

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

    • @GameCodeLibrary
      @GameCodeLibrary Před měsícem

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

  • @99darkprince
    @99darkprince Před měsícem

    I learn something new every time I watch these videos. They are perfect in explanation and easy to understand. Amazing work!

    • @GameCodeLibrary
      @GameCodeLibrary Před měsícem

      So glad they can help! I try to make them unique with a new thing in each, so that's good that it's working :p Thanks for the inspiring words!