![Game Code Library](/img/default-banner.jpg)
- 61
- 155 056
Game Code Library
United Kingdom
Приєднався 21 кві 2023
Tutorials for modular features and simple games. Add into your existing games, or create a new game together!
You can get access to all the code files used in these videos from my Patreon:
www.patreon.com/GameCodeLibrary
You can get access to all the code files used in these videos from my Patreon:
www.patreon.com/GameCodeLibrary
Menu with Tabs UI - Top Down Unity 2D #6
Let's add the UI in for our games menu system and add tab functionality! We'll be able to add as many tabs as we like to the top and switch between the corresponding pages. Then we'll be ready for our inventory and settings that we'll add in future videos - as well as any others you may want to add!
Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack
Full Package: www.patreon.com/posts/menu-ui-with-top-111355566
Full Playlist: ua-cam.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!
ua-cam.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 #topdown
0:00 - Intro
0:31 - UI Canvas
1:03 - Menu Panel
1:53 - Tabs UI
3:49 - Pages UI
4:48 - Tab Text
5:25 - Import Custom Font
7:12 - MenuController Script
8:52 - TabController Script
11:29 - Tab Script Setup
12:22 - Tab Event Triggers
13:47 - Working test!
13:58 - Next Video
14:35 - Outro
Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack
Full Package: www.patreon.com/posts/menu-ui-with-top-111355566
Full Playlist: ua-cam.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!
ua-cam.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 #topdown
0:00 - Intro
0:31 - UI Canvas
1:03 - Menu Panel
1:53 - Tabs UI
3:49 - Pages UI
4:48 - Tab Text
5:25 - Import Custom Font
7:12 - MenuController Script
8:52 - TabController Script
11:29 - Tab Script Setup
12:22 - Tab Event Triggers
13:47 - Working test!
13:58 - Next Video
14:35 - Outro
Переглядів: 211
Відео
Map Transitions on Trigger - Top Down Unity 2D #5
Переглядів 25614 днів тому
When walking to the edge of our map, we'll set the map to move to the next area! We'll do this with adding collectible waypoints to our map grid so we can control all map movements. Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Package: www.patreon.com/posts/triggered-map-2d-110520888 Full Playlist: ua-cam.com/play/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP.html All source code for al...
Player Tracking and Camera Bounds - Top Down Unity 2D #4
Переглядів 34328 днів тому
Let's get our camera following our player and also staying within the bounds we set! So the camera will follow our player until hitting the sides of our boundary collision and stop. Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Package: www.patreon.com/posts/player-tracking-109790549 Full Playlist: ua-cam.com/play/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP.html All source code for all...
PERFECT Tilemap Sorting Layers - Top Down Unity 2D #3
Переглядів 1,5 тис.2 місяці тому
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: ua-cam.com/video/8UctaO5DwUE/v-deo.html Full Package: www.patreon.com/posts/106861111?pr=true F...
Idle and Walking Player Animations - Top Down Unity 2D #2
Переглядів 9103 місяці тому
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: ua-cam.com/video/DQY62meLVCk/v-deo.html Sprite sheet: pixel-boy.itch.io/ninja-adventure-asset-pack Full Package: www.patreon.com/posts/movement-with-2d-1047...
Player Movement with Unity Input System - Top Down Unity 2D #1
Переглядів 9633 місяці тому
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: ua-c...
Let's Make a Top Down Game! - Unity 2D #0
Переглядів 2,1 тис.3 місяці тому
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: ua-cam.com/play/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP.html All source code for all videos I h...
EASY Object Pooling - Unity Game Tutorial
Переглядів 6153 місяці тому
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
Переглядів 4,4 тис.4 місяці тому
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
Переглядів 4,6 тис.4 місяці тому
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
Переглядів 6895 місяців тому
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: ua-cam.com/video/pzBbqFrsNnk/v-deo.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
Переглядів 3455 місяців тому
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: ua-cam.com/video/PpgRRb1sXrk/v-deo.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
Переглядів 7265 місяців тому
Start Menu - 2D Platformer Unity #28
Background Music Manager - 2D Platformer Unity #27
Переглядів 4546 місяців тому
Background Music Manager - 2D Platformer Unity #27
Sound Effect Manager - 2D Platformer Unity #26
Переглядів 4946 місяців тому
Sound Effect Manager - 2D Platformer Unity #26
Speed Boost Item - 2D Platformer Unity #25
Переглядів 4596 місяців тому
Speed Boost Item - 2D Platformer Unity #25
Hidden / Secret Areas - 2D Platformer Unity #24
Переглядів 4707 місяців тому
Hidden / Secret Areas - 2D Platformer Unity #24
Spike Traps and Bounce Traps - 2D Platformer Unity #23
Переглядів 5567 місяців тому
Spike Traps and Bounce Traps - 2D Platformer Unity #23
Falling Platforms - 2D Platformer Unity #22
Переглядів 4137 місяців тому
Falling Platforms - 2D Platformer Unity #22
Moving Platforms - 2D Platformer Unity #21
Переглядів 8328 місяців тому
Moving Platforms - 2D Platformer Unity #21
Drop Down Through Platforms - 2D Platformer Unity #20
Переглядів 5408 місяців тому
Drop Down Through Platforms - 2D Platformer Unity #20
BEST WAY to Dash through Enemies - 2D Platformer Unity #19
Переглядів 9928 місяців тому
BEST WAY to Dash through Enemies - 2D Platformer Unity #19
Healing with Health Items - 2D Platformer Unity #18
Переглядів 5278 місяців тому
Healing with Health Items - 2D Platformer Unity #18
Enemy Drop Items on % - 2D Platformer Unity #17
Переглядів 7638 місяців тому
Enemy Drop Items on % - 2D Platformer Unity #17
Player Aim at Mouse and Attack Enemy - 2D Platformer Unity #16
Переглядів 7009 місяців тому
Player Aim at Mouse and Attack Enemy - 2D Platformer Unity #16
Game Over Screen and Retry Button - 2D Platformer Unity #15
Переглядів 9679 місяців тому
Game Over Screen and Retry Button - 2D Platformer Unity #15
Player Health and On Hit Effect - 2D Platformer Unity #14
Переглядів 1,1 тис.9 місяців тому
Player Health and On Hit Effect - 2D Platformer Unity #14
Advanced Object Spawning on Tilemap Platforms - 2D Platformer Unity #13
Переглядів 1,2 тис.9 місяців тому
Advanced Object Spawning on Tilemap Platforms - 2D Platformer Unity #13
Dynamic Enemy AI to Jump Gaps and Chase Player - 2D Platformer Unity #12
Переглядів 2,2 тис.10 місяців тому
Dynamic Enemy AI to Jump Gaps and Chase Player - 2D Platformer Unity #12
Hold Button to Load Level - 2D Platformer Unity #11
Переглядів 1,4 тис.10 місяців тому
Hold Button to Load Level - 2D Platformer Unity #11
I really hope that the save system will be implemented via JSON. As there is some confusion about how to work with it correctly. Although I already have experience of writing my own saving system - but some things in it did not work as I expected.
Yes I am going to do saving with json! I’ll keep it as a simple json file to begin with so it’s easy to see how it’s saving, then we can look into serialising later on :-) The method I’ll show is the one I use for all my games so it should hopefully work for any for you too! I’ll try get the saving vid out next week 🙏
A good and underrated channel! I give likes to every video, now I will also write comments for promotion.
Thank you for your support!! Means a lot to me, I’m glad you enjoy the videos too.
Hello, I encountered an issue while implementing 8-directional movement. Everything works perfectly, but when moving diagonally, two buttons need to be pressed, and when releasing them, they are released at different times. Because of this, the last diagonal direction is not maintained. Could you suggest any solutions?
I have another video where I go into more detail for diagonal movement! BEST Top Down 8 Directional Animation - Unity 2D ua-cam.com/video/_xYcrDjnjM8/v-deo.html This one should solve any issues you have
i was gonna say " if this updated" 😂 u just posted today. Thanks, i have a project to develop and menus is something I've been delaying to learn👍🏻
Good timing then! 😝 I make everything as clean and simple as possible, so hopefully this makes learning menus easy! :-)
Thank you so much for this video GCL, it was very great, interesting and useful! Hope you have a very nice day, keep it up you're a pro! :D
Thanks a bunch! Your support means a lot! :-)
Keep up the fantastic work! Greatly appreciate the videos!
Thank you for your support, I'm happy you like them! :-)
Awesome Tutorial! Thanx.
You’re welcome I’m glad you enjoyed :-)
im still confused on how i just find your channel now. You have the best video on unity. 🙃
Maybe I need better tags on my videos or something 😝 thank you I’m glad you enjoyed!! :-)
Super Cool! It was great video, thank you so much GCL!
I'm glad you enjoyed!! You're welcome :-)
What a cute little guy. I wanna squish him
Valeu!
Thank you!! I’m glad you enjoyed 🙏🌅
Great really useful, should be helpful to many, thanks and welcome back.
Thank you, you showed me where to get very complete template assets, made me use flip and how to jump. Thank you again :D.
So glad you found it useful :-)
NEW VIDEO = NEW PROGRAMMING SKILL LEARNED LETS GOO keep up the videos, thanks alot!
Yay!! So glad you enjoy them and still learn from them :') Hopefully I can get more videos out more frequently! Thank you!
Always so clear and to the point. Top tier tutorial!! :)
I'm glad you enjoy them :') Thanks for the support!
Lady your presentation sucks this is why they say women can't code ☠️
When she’s Australian
I will definitely try this! Thank you!
what an amazing video. thanks
Glad you enjoyed 😇
Really appreciate the work you put into making these tutorials...thankyou!
You’re welcome I’m glad you enjoy them 😇
these tutorials are great
So glad you enjoyed 🙏
quick question, when i hit the ground, my character does not go back into movement, it just plays the "jump" animation over and over no matter what i do. any suggestions?
i think i found the error, great video thanks alot!
Glad you found the solution 😄
Great videos!
Thank you I’m glad you like them!
ok so far this has been helpful for me with getting some basic frameworks in for my game, but ive run into an issue with the jump code, around 10.40 she puts in a line of code that seems completely normal and looks like it should work, but after ive written out the rest of the lines of code and am ready to save it i get the error message "PlayerMovement.Jump(InputAction.CallbackContext)': not all code paths return a value", literally everything is the same as how it is in the video and I cant for the life of me figure out whats wrong and its driving me crazy. Can anyone help PLEASE??
If you function is: Public void The void states that there is no return value needed. So the only thing I can suggest is to make sure it says public void Jump! Can you paste your jump code if this isn’t the fix?
@@GameCodeLibrary that worked! thank you so much!
tysm
You’re welcome 😇
certified GCL banger
Thanks for the great video
You're welcome :-)
Nice! Once again, it's a top quality effort. Simplistic and able to apply to other games / idea.
Thank you!! I try my best to make every video as modular as possible :-)
Thank you so much for making these! Very easy to follow and I love your teaching style!
You're welcome I'm so glad you enjoyed!!
fantastic! thank you so much. everything is so clearly explained step to step, I will definitely be following and checking out your future videos.
You're welcome! I'm glad you enjoyed it :-)
Another simple yet quality video! Great work.
Thank you :-)
Huge thanks for your tutorial!! :) unfortunately I ran into a little problem in the end... when my Player is landing on a platform after jumping, shortly bevor he goes from fall into idle, he does one quick jump again for a second or so, and I can't tell why this is happening... help
Do you have a tutorial for creating ladders?
I don't but that's a fun idea! I'll write to down and try get a video out on it in the future :-)
@@GameCodeLibrary Thanks! I tried another tutorial and it came out wonky because of the Composit collider (Box collider doesn't work for some reason. Might be because ladders are on a different Layer.) The character won't stay dead center of the ladder and sometimes won't climb the ladder at all. (Just hops. Doesn't Jump as I don't have the Up key set as Jump.) Also add a grapple beam or rope for a project, please. I got one in mine but trying to debug it myself. It doesn't want to grapple anything but the Default Layer and that makes the character Spiderman across the level when that's not what I want.
Hi, love your videos, easy to follow and understand. Finally someone who can actually teach me Unity. I hope you don't mind me asking but I was wondering would you be able to add the ability to swim to the player code? - I'd like to add water tiles and swim in them when the player is inside them, like the original Super Mario Bro's game where Mario swims in water stages. I have searched all over and can't find any tutorials on how to do this at all, so I don't even know where to begin. But it would be great to have in the player code. Thanks.
Thank you, I'm so glad you enjoy them!! That sounds interesting - I hadn't thought of adding water!! I'll add it to the list of features I have down so I can do it in the future when I figure it out haha :-P Thank you for the suggestion!!
Thank you so much! I saw many tutorials on parallax and this is the only one that worked 🫰
So glad it worked well for you! :-)
Hello, the tutorial is great and I'm grateful for it. However, I would like to ask for a more in-depth explanation of the movement float value. Why are we multiplying by 1 - parallaxEffect?? And why is it used to decide whether or not we are relocating the background? In essence, what I'm asking is, what does the variable movement represent?
The movement variable represents the movement of the background's position with respect to the camera. I'm still not able to grasp why we're shifting the background's position when the movement becomes greater than the startPos + length
Perfect timing on Top Down 2D, I needed this.
I’ll get continuing on the series soon! 🙏
What a lovely way of presenting and more importantly very clearly outlining what you need to do without wasting time, thank you!
So glad you enjoyed!!! I love videos when they get to the point as fast as possible 😝 but some people find it too fast! Still trying to find the balance. Thanks again!
I like your videos, but I sometimes struggle to keep up, maybe if you do it slower, would be better for all of us. But otherwise thanks 100 times for free content like this! ;)
Yeah I think I edited them to be too fast!! :p I didn't want people getting bored, but also that makes it hard to follow along! I've tried slowing it down in my latest vids - I'll keep it in mind and chill out a lil more hahaha Thank you and you're welcome :-)
@@GameCodeLibrary How long did it take for you to learn C#?
@@rragy1848 I used it at uni for 3 years and I'm a senior software dev atm using c# in my day job - which I've been at for almost 5 years! So that's 8 years now wow that's so long lol... I've been doing game dev in my own time all those years too! :-) But honestly I don't use a lot of my work skills in game dev - I simplify the code for games as much as I can since it can become bloated fast with features added!
@@GameCodeLibrary 8 Years in total, is quite a long time.. I started to learn Unity nearly a year ago, but it doesn't go that easy. But hopefully one day will be better..
This is so helpful! Tried multiple other tutorials before this, were all full of confusing, roundabout instructions. This is clear, straight to the point, and very well organized.
So glad you enjoyed!! That’s exactly why I started making these videos - I tried following others online and would get annoyed at how badly they were made 😭 you’d follow along and they’d be like “woops made a mistake gotta go back!!” Ahh!! I’ll get some new vids up soon hopefully 🫡 Thanks!
Thank you so much!
You’re welcome I’m glad you enjoyed 😊
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
So glad I could help!! I always forgot how to do this too, so I'll probably be using it as a reminder myself in the future :p