Make Your FIRST COMPLETE Game in Unity | BEGINNERS
Вставка
- Опубліковано 5 тра 2024
- EXPAND FOR TIMESTAMPS - I make a breakout clone game and the entire process in real-time from start to finish. Including prototyping core mechanic, transitioning between game states, loading levels, spawning objects, cleaning up, keeping score, handling menu screen transitions, and high scores. This video is for beginners that want to learn about Unity and how to take the step to move from a game mechanic prototype and turning it into a "re-playable" game with menus.
Project Download: www.dropbox.com/s/qpk15rgs192...
Timestamp Shortcuts:
00:00 Intro
02:55 Starting in Unity
03:00 Organizing Folders in Project
03:30 Creating the First Game Object - the ball
04:45 Changing perspective to orthographic camera
07:00 Creating your First Script - ball physics movement
07:35 Defining your First Variable
08:45 Accessing a Rigidbody from a script
09:15 Setting the ball's initial velocity
10:00 Bounce the ball in OnCollisionEnter()
10:15 Reflecting a Vector3 to bounce the ball properly
11:30 Importance of the FixedUpdate() function
11:55 Forcing velocity of the ball to a constant speed
12:40 Keeping ball velocity consistent after impact
13:15 Adding walls and ceiling to play arena
13:40 Using control key to snap movement in Unity
15:05 Freezing the axis of the ball to horizontal/vertical movement only
16:25 Controlling the paddle with mouse
16:45 Freezing paddle movement to left / right only
17:45 Correct way to force repositioning of a Rigidbody to from a script
18:10 Translating mouse movement (screenspace) to world space with ScreenToWorldPoint
20:05 Hiding the Mouse Cursor
21:05 Switching the Rigidbody to a Kinematic Object (make it "rock solid" =)
21:45 Creating the Bricks / Blocks
22:50 Creating a PREFAB (Very important - don't know what a prefab is? Check this out)
23:50 Spacing between the bricks / blocks
24:00 Stressing the importance of PREFABs again - demonstrating the use of them
25:10 Exposing a variable in a script as a public variable so it can be changed in the Unity "inspector"
26:00 Are you a fan of big score or small scores??
26:25 Using OnCollisionEnter to reduce the hit counter
27:00 Destroying the brick / block on ball impact
28:00 Creating your first material - coloring the bricks blue
28:30 Adding more bricks to the level, duplicating and positioning bricks
30:20 Adding rotational animation to bricks
32:05 Offsetting the rotation for twisting type of effect of the blocks
33:10 Changing bricks to a metallic reflective look
33:40 Adding a white flash Amiga style "hit flash effect" like the good old side scrolling games
37:00 Using "Invoke" to delay a call to a function - in this case to restore the material after flash
38:10 Moving the bricks into a Level Prefab
38:50 Creating the GAMEMANAGER script - this is controlling the game states and user interfaces!
40:00 Changing the ball and the paddle to prefabs so they can be "Instantiated"
40:45 Creating your first User Interfaces / Menu Screen
41:25 Creating the Main Menu UI panel
41:35 Adding the Play button to the Main Menu
41:55 Scaling the menu to maintain the same size compare to the screen size
42:30 Creating the Play UI panel with score, ball, and level counter
43:00 How to position UI elements - the RectTransform, anchoring point, alignment, and position
45:25 My 5 year old daughter explains what a Breakout Clone is
46:45 Using control . (period) to easily implement "using" statements
47:05 Exposing access to Score Text - Ball Text - and Level Text
47:30 Exposing access to UI panels, Menu - Play - Level Completed - Game Over
48:00 Creating the Level Completed UI Panel
48:50 Creating the Game Over UI Panel
49:20 Hiding unwanted UI Panels
49:30 Creating a State Machine with states Menu, Init, Play, LevelCompleted, LoadLevel, GameOver
49:50 Making it possible to switch states using a SwitchState method
50:45 Ending the CURRENT State and beginning a NEW State
51:45 Ctrl Period to implement all missing cases
52:50 Showing and hiding panels on Begin / End States
54:55 Making the Play button work
57:00 Using Properties to update UI Score / Ball / Level texts
59:15 Adding points to score
1:01:00 Initializing variables
1:02:00 Adding more levels
1:05:40 Instantiating new ball
1:08:00 Game Over when no more levels
1:08:30 Loading New Level
1:09:25 Delaying a State Transition
1:12:40 Switch paddle (for ball direction control) and brick to 3D objects (Blender)
1:22:25 Detecting when ball / life is lost with IsVisible
1:27:00 Editing Levels - Overwriting Prefabs
1:27:30 Ending Level when no blocks remain
1:32:50 Waiting for AnyKey press
1:35:00 Persistent Highscore
1:39:50 Reset Level on Game Over
1:42:00 Scrolling Star Field Background
1:47:00 Unpacking and Overwriting Prefabs
1:52:15 Outro / Ending
1:52:40 On the topic of climate change
/ imphenzia
teespring.com/stores/imphenzia
www.imphenzia.com
/ imphenzia
TIMESTAMPS:
00:00 Intro
02:55 Starting in Unity
03:00 Organizing Folders in Project
03:30 Creating the First Game Object - the ball
04:45 Changing perspective to orthographic camera
07:00 Creating your First Script - ball physics movement
07:35 Defining your First Variable
08:45 Accessing a Rigidbody from a script
09:15 Setting the ball's initial velocity
10:00 Bounce the ball in OnCollisionEnter()
10:15 Reflecting a Vector3 to bounce the ball properly
11:30 Importance of the FixedUpdate() function
11:55 Forcing velocity of the ball to a constant speed
12:40 Keeping ball velocity consistent after impact
13:15 Adding walls and ceiling to play arena
13:40 Using control key to snap movement in Unity
15:05 Freezing the axis of the ball to horizontal/vertical movement only
16:25 Controlling the paddle with mouse
16:45 Freezing paddle movement to left / right only
17:45 Correct way to force repositioning of a Rigidbody to from a script
18:10 Translating mouse movement (screenspace) to world space with ScreenToWorldPoint
20:05 Hiding the Mouse Cursor
21:05 Switching the Rigidbody to a Kinematic Object (make it "rock solid" =)
21:45 Creating the Bricks / Blocks
22:50 Creating a PREFAB (Very important - don't know what a prefab is? Check this out)
23:50 Spacing between the bricks / blocks
24:00 Stressing the importance of PREFABs again - demonstrating the use of them
25:10 Exposing a variable in a script as a public variable so it can be changed in the Unity "inspector"
26:00 Are you a fan of big score or small scores??
26:25 Using OnCollisionEnter to reduce the hit counter
27:00 Destroying the brick / block on ball impact
28:00 Creating your first material - coloring the bricks blue
28:30 Adding more bricks to the level, duplicating and positioning bricks
30:20 Adding rotational animation to bricks
32:05 Offsetting the rotation for twisting type of effect of the blocks
33:10 Changing bricks to a metallic reflective look
33:40 Adding a white flash Amiga style "hit flash effect" like the good old side scrolling games
37:00 Using "Invoke" to delay a call to a function - in this case to restore the material after flash
38:10 Moving the bricks into a Level Prefab
38:50 Creating the GAMEMANAGER script - this is controlling the game states and user interfaces!
40:00 Changing the ball and the paddle to prefabs so they can be "Instantiated"
40:45 Creating your first User Interfaces / Menu Screen
41:25 Creating the Main Menu UI panel
41:35 Adding the Play button to the Main Menu
41:55 Scaling the menu to maintain the same size compare to the screen size
42:30 Creating the Play UI panel with score, ball, and level counter
43:00 How to position UI elements - the RectTransform, anchoring point, alignment, and position
45:25 My 5 year old daughter explains what a Breakout Clone is
46:45 Using control . (period) to easily implement "using" statements
47:05 Exposing access to Score Text - Ball Text - and Level Text
47:30 Exposing access to UI panels, Menu - Play - Level Completed - Game Over
48:00 Creating the Level Completed UI Panel
48:50 Creating the Game Over UI Panel
49:20 Hiding unwanted UI Panels
49:30 Creating a State Machine with states Menu, Init, Play, LevelCompleted, LoadLevel, GameOver
49:50 Making it possible to switch states using a SwitchState method
50:45 Ending the CURRENT State and beginning a NEW State
51:45 Ctrl Period to implement all missing cases
52:50 Showing and hiding panels on Begin / End States
54:55 Making the Play button work
57:00 Using Properties to update UI Score / Ball / Level texts
59:15 Adding points to score
1:01:00 Initializing variables
1:02:00 Adding more levels
1:05:40 Instantiating new ball
1:08:00 Game Over when no more levels
1:08:30 Loading New Level
1:09:25 Delaying a State Transition
1:12:40 Switch paddle (for ball direction control) and brick to 3D objects (Blender)
1:22:25 Detecting when ball / life is lost with IsVisible
1:27:00 Editing Levels - Overwriting Prefabs
1:27:30 Ending Level when no blocks remain
1:32:50 Waiting for AnyKey press
1:35:00 Persistent highscore
1:39:50 Reset Level on Game Over
1:42:00 Scrolling Star Field Background
1:47:00 Unpacking and Overwriting Prefabs
1:52:15 Outro / Ending
1:52:40 On the topic of climate change
More people like you its necesary in the world.
Thanks!
Thanks - happy to share :)
first of all, kudos on doing this (the tutorial, the index, etc) for your streamers, and second of all, you forgot one of the most important timecodes:
41:01
The ball is not jump
I am using 2020.1.10f1 version of unity
The best unity tutorial on UA-cam so far. Not because of the complexity of the game, but because you explain every bit of your changes to the project, which makes the whole process not only be extremely easy to follow but also a true learning experience for beginners.
You deserve a big thumb up.
Just finished your beginner guide, now onto this! Thank you so so much, the community is infinitely grateful for you
Came out really nice. Appreciate the live tutorial format, other tutorials feel so over rehearsed, better to give a true reflection of the challenges in building these sorts of projects.
Thanks - glad it came across that way, I hope to make more in this format, it's tricky to keep them short but live since making games does take some time even if it's much easier these days. Maybe smaller games of this magnitude are doable to begin with!
@@Imphenzia Waiting for more tuts!
That was a great little tutorial! I've always been a fan of these breakout-style games.
I'd love to see more of these from you, maybe highlighting different concepts or mechanics.
This is my first game I am making and you have no idea how much your video has helped! Thank you so much for all your hard work, it's greatly appreciated!
Best complete Unity game tutorial i have seen. Very clear and structured combined with a good game design that you can reuse for your own projects. Well done! Looking forward for more Unity material!
This video one of the best thing in 2020 till now , I cant say it's the perfect tutorial video about game development cause it's Beyond that ♥️
Thanks - hope it can be of some use =)
@@Imphenzia If definitely helps! I appreciate your work! Thank you very much!
@@Imphenzia It absolutely helps, your videos are fantastic. I'm actually trying to build more of a data science application, but the Unity engine seems to be a good fit, and your videos are the most useful ones I've found so far. One minor complaint/suggestion... is there any way you could increase the font size in the script programming videos? There's a ton of unused blank space to the right, so I think an increase in font size would still fit, and it would help me tremendously. I have a ton of programming experience, but am just starting out with c# so stupid little things like "is that F capitalized? or not f?" keep tripping me up.
really glad you made this, i'm on the last part of the junior programmer tutorials and this helped me a lot. using states is something i'm going to incorporate into my future games. hope to see more recent tutorials soon. thank you so much!
Excellent video. Really appreciate seeing some of your "best practices" for game development. And a great introductions to the aspects needed for a game in unity.
I am very happy that your channel exists. This content is extremely useful for people who just started making games. Thank you Imphenzia
There are no words to say just how awesome and helpful this tutorial was. I probably took longer to get through it than I intended, but I came away with what I feel is greater comprehension and confidence. Thank you for being a resource for those trying to learn.
Thank you for making the introduction into 3D game development so much more manageable for people who have no experience! I’ve been programming and making 2D platforms or top downs for a long time, but the jump to 3D always seemed so intimidating! After some failed attempts with WebGL I definitely lost the confidence to try again, but luckily a combination of my recent searches and UA-cam’s Algorithm brought me here! Been binging your videos ever since. Very excited to start working on a new project.
I really enjoy your tutorials. I couldn't expect a clearer, educative and funny to follow material to onboard video game development with Unity. Please keep on !
so I just stumbled upon your channel and I was absolutely fascinated by your 10min challenges. I'm working on a small f-zero clone in unity and your tutorials helped me soooooo much (for blender&unity both). thank you very much. keep on doing the good stuff :D
Amazing, thank you. So great to see all the ins and outs and trial and errors.
This is absolute gold, thank you very much for your work. I saw a lot of unity tutorials on youtube, yours are the best. Hope to see more Unity tutorials soon
Awesome Tutorial! Walked through step by step, learned a whole lot about c#, (I have coding history in c++ and Visual C#) Learned so much!
Keep pumping the tutorials out and I'll keep learning!
I really feel like a pro after watching your tutorials. I can actually understand what is happening and why and it is an amazing feeling.
Thank you for covering up the UI topic as well as gameplay, it's rare!
I appreciate how you make really detailed timestamps.
Thank you a lot, I had a project for my university about making a simple game with Unity, I have watched your video "LEARN UNITY - The Most BASIC TUTORIAL I'll Ever Make" and I applied everything you said in it, and then I moved to this video, I worked with you step by step and it was amazing. Thanks a lot and keep going.
EXCELLENT tutorial! I know it said "beginners", but I learned a lot from your GameManager script, like how to keep track of game states, as well as saving out info between games in PlayerPrefs. Thank you!!
This is the second tutorial i am about to watch of yours and i am already confident this is what i am looking for. Keep it up🔥
Thank you for this great tutorial!
I have found it sufficienlty slow and deep to make a newbie confortable to assimilate the basic information but speedy enought to make progress fun.
A friend and I are planning to take part in an upcoming game jam, thanks for helping us learn game development!
This and your other unity beginner tutorials are awesome. Thank you so much for putting up great content.
It's one of the best tutorial for beginners that i have ever seen. Thanks a lot and keep going at the same way!
Thank you for your efforts to making these videos!
And as always: I really enjoyed your style.
Thank you.
Thanks, that's great to hear!
Dude, I loved this tutorial. I'm currently trying to get into Futuregames to study more video game programming and following this tutorial, really helped! Thanks a lot!
Great video. A little fast in parts but then I've only been using Unity 2 weeks!
You've put a lot of work into this. It takes a lot of time recording, re-recording and then editing.
Many thanks!
i really like your workflow with the blender color palette and using it in unity. i usually create simple models like this as i don't know how to create realistic textures but all the time i baked them on a separate texture file and etc. But this seems like a very time-saving method for this kind of models. thanks!
I've followed the whole thing, and it was awesome! Thanks for doing it.
I love your humor!!! and I recently find your channel, your work and enthusiasm it's amazing... please don't stop doing this long tutorials! Thanks!!!
Absolutely love your videos, the deep dive into unity is exactly the videos I need 👍 can't wait to start diving into your blender videos next
Amazing tutorial @Imphenzia. This really got me wanting to continue with my game!
this is the second tutorial of yours I'm doing and big thanks for making those. what a time to be alive where all this information is given for free. if I had one suggestion it would be to pay a bit more attention to pacing. sometimes there is not too much to take in and then all of a sudden you go 1 mile a minute, jumping between windows and stuff. you still did a wonderful job, thanks!
Thank you, thank you, thank you!!!! Love your humor and your style. I come from over 37 years of GWBasic, Basic, Visual Basic, VBA, HTML, XML, SQL all within the realm of business software. Due to 2020, I found myself making the switch to C# and then happened across Unity. After watching 1 video of yours, all of the graphical side of programming made sense within Unity and I was able to give a sigh of relief when at the end of your 15ish minute video I had already built a complete game within my head. I had been fighting to build my own game engine, so all the concepts are familiar, but your video here just connected the final dots with how to deal with the GameManager within Unity. I look forward to creating my first 3D game. And a big thank you for your Blender tutorials as well. I do not have the skills built yet, but I am confident that I will be creating my own low-poly models for the list of future games that have already been stacking up, LOL. Thank you and know you are appreciated.
I appreciate that everything in this video was genuine. All graphics where created with unity's built in system and if not you gave the blender tutorial!
Nothing is more frustrating then when a tutorial is using a random graphics package you cant easily customize yourself. Great Video
This is a great video! As said, there are not much tutorials about Game state. This is pretty important element of the video game , soo thumbs up!!
Hi, thank you greatly for taking the time to make this video. I really enjoyed the longer format since it gives you a real sense of what problems and issues you need to solve to make even a simple game. It steps beginners to Unity (like me) through the problem solving process from start to finish. Loved it! Please make some more in this format, maybe with a different game concept each time... eg a platformer, or a side scroller?
@Imphenzia - Thanks for doing these videos you have given me the bump i needed to actually try working with Blender/Unity
Couldn't ask for a better tutorial. Perfect pacing. Informative. Detailed. Clear. And just the right amount of humour (mostly about balls, hahaha). Legend!
Wow. So much content in one video. Great idea and execution. Thank you.
One of the best tutorials I've seen, learned a lot and enjoyed it, thank you so much!
Thank you very much for all your hard work. This tutorial is well-structured and explained. I learned a lot from it. It was very inspiring. Thank you again.
Hello! I am Javier from Spain. I just want to thank you for all your effort. I just got started with Unity and I love it. You don't know how much I understand you about children at home ... Hehehe. But from a developer perspective, they can be the perfect testers. Thanks again, you are a great inspiration.
Thank u a lot for this great tutorial. Fully completed this and all works perfect! Looked for some advices in making GameManager, and got good explanations in this video. Started blender with your lessons, and now Unity aswell :) Thank u, and keep a good job!
great tutorial, lots of concepts to digest, thanks a bunch for taking the time to make this!
Your tutorials are great ! You are a fantastic teacher ❤ Never found a better Unity tutorial than yours.
I am new to creating games. so this tutorial is perfect for me. The particles at the end was a nice bonus. So now that I have watched this it's time to get started and download unity.
This and the other tutorial for beginners has helped me a lot. Thank you very much for this.
One of the greatest tutors , i have ever seen online .
Thanks so much for doing this, I really enjoyed following along with this video and I think you're a great teacher
Thank you for taking the time to make this tutorial, it's a shame you got few views/likes as it's very well made and touches many sides of game programming.
You're welcome! Maybe it'll gain more views over time :)
@@Imphenzia 136k views, thats good in my book! Just finished your Unity basic tutorial and will start this one tomorrow. Thank you for your work, it helps a lot!
@@Imphenzia magic of the interwebs! I just found it and your basic tutorial and after about a week of trying to introduce myself to Unity with other supposedly newbie-friendly guides (looking at you, CodeMonkey) I was relieved and overjoyed to find your tutorials which actually start FROM THE BEGINNING and allowed me to actually start using Unity! Thank you!
Great Tutorial! I'd love to watch more of these long ones. 👍
Love your style of teaching! Thanks for this awesome Unity tutorial. And I cant understand how this video only has 933 likes :-/
I love the content you have been putting out and this video coming out of nowhere just blew my mind... I wish you all the best with your youtube channel, it's going to be huge ;] Thank you for all the videos and have a great day!
Awesome, I'll make more with other game genres but I'll try to keep them informative and not tooo lengthy =) Thanks again and have a great day too!
I haven't watched it, yet. But I plan on following it very soon.
Thank you for what you do! I would love to support your Patreon in the future.
Thanks you for this great Tutorial.
I´m a total Beginner and this helped me very much with getting in touch with Unity.
I hope i can get as near as possible to your skills in the future :D
For me , you are a living legend. Thank you.
awesome tutorial again, Thank you! So many valuable things covered!
This is the best tutorial. So much love it. Thanks for the great tutorial.
Riktigt bra tutorial! Försöker lära mig Unity efter att ha använt Game Maker i 7 år och det här var väldigt lärorikt
One of the best tutorials i've seen.
It's a gift to being a good teacher, and few have that gift.
Thats the best Gamemaking tutorial ive ever seen!
You explain everything nicely + give a lot of usefull tips! Thank you for your Great work here :)
Appreciate the video mate, great lessons and I'm so keen to see where I can take this! Well earned sub.
I don't really ever subscribe to channels. After watching your insanely basic Unity tutorial, then your intro Blender low-poly tutorial, then this, I've subscribed. I'm not sure if I'll get to the point of making my own games, but I've really enjoyed your candor and details. I am going to try to use Unity to make some "Lego" animation videos for an art project I'm doing, and I think with these 3 videos I might have most of what I need. The effort you put into this is much appreciated, and the simulated realism with kids in the background was another nice touch! If you have some free time and would like to help with some guidance, I would very much appreciate anything you could provide. I'm sure you could do what I'm trying to do in an hour, and it'll probably take me several weeks. Cheers!
Awesome topics in there Stefan. Really covers everything you need to know to get off the ground.
Thanks Todd! When I wrote the timestamp shortcuts I realized there are a few basic topics covered =)
I love the indepth tutorials! A great way to get things done "holistically" haha
If I could I would hit the like button 100K times, thanks for the videos. I just joined your channel today and can't express how I'm happy to see your tutorials.
Really enjoyed this, great info and very clear. Thanks!
Great work. Thanks a lot. Also, the bit at the was so unexpected that it caught me off guard for a second.... Then my brain caught up and I had a great laugh.
That's a good afford you made so we can learn easily.
Also Thanks for the timestamps ❤️
Thanks for that. Reflect method, needed that :)
Brilliant tutorial!!! Learned a lot, thank you.
The "How dare you" caught me off guard! haha
Great video. Thank you so much!
You're a BEAST! Your tutorials are the best out there!!
Thanks alot!!
back in and recently got soft soft again, it felt strange and i had previously just taught myself the software. Finding your videos is helping
One of best tutorial on Unity5 i ever seen till today, yhanks a lot, you expalined some passages very well.
Cool, glad you like it - thanks :)
Hey man this is my second tutorial I have watched from you. The other being the "most basic tutorial ill ever make". I completed that one and am almost finished with this one.
I cant believe the amount of info you have been able to pour into my brain. The only thing is that you dont explain why/how the commands are the way that they are sometimes but I get that you need to keep it short. Explaining it to that degree would take time and be almost a classroom style setting.
I imagine Ill get more understand as I continue to program and get better at it. I plan to use all your videos for this. Thanks!
if your interested in certain commands you can read the documentation on that command
Wow that two hours went quickly! Thank you so much for taking the time to put this together! I love how clearly you explained everything, and how every single gap that I considered as I was watching - eg. "he's forgotten about X" - was eventually wrapped up very cleanly. Amazing content. 👍👍👍
This... tutorial... is EPIC. I've starting and stopping attempting to make a game in unity for months now. I followed you start to finish and now I've got the bug to keep going. Thank you for such an in depth view on this. Whoever commented to get you to do this, you da man too and I agree, these long format videos are awesome. I will watch and share each one of these you put up!
Tack för en mycket bra tutorial 👍🏻
like legit one of the best tutorial youtubers, saw a coouple of unity and blender ones and holy shit very noice
Tack för en riktigt bra video
Excellent tutorial.
I lovef it a lot! Thanks very much.
thanks so much, looking forward to more videos, like your other subscribers I'm learning a lot
If anyone is wondering why -35 doesn't bring your cube to the edge of the screen, it's because you need to switch your aspect ratio to 16:9.
Thank you for being an super inspiration for us al!
Awesome video. Watched it all the way.
I prefer the long ones over serialized ones. You got a subscription from me.
Really good video. Thank you for sharing your knowledge
i just love your tutorials
Awesome tutorial. Thank you! You have a new fan and subscriber here!
thank you for this tutorial, i put lot of time to finish it but it was very useful
Thank you So much for ur ti and support
Brilliant tutorial thank you.