How to Make 2D Endless Runner Game in Unity - Beginner Friendly - Dino Game
Download the Full Project : / the_game_guy
In this video, I will show you how to recreate chrome's Dino Game from Scratch to end in under 15 minutes. The video is targeted towards beginners and for that, I won't be using anything outside of Unity, the whole game will be created inside of Unity.
You will learn all the basics of creating an Endless Runner Game in Unity, basic player controls and creating obstacles that spawn at a random rate, just like in Chrome's Dino Game.
And by the end of the tutorial, you will have a plenty of stuff to play around with to bring more randomness into the game. For the game over menu and stuff, you can watch the video down below.
How to Make a Menu in Unity : • How to make an AWESOME...
Thanks for watching, if you have any questions, just leave them down in the comments section!
Some more unity tutorials which might be useful :
How to throw knife in UNITY :
• How to throw knife usi...
How to make an AWESOME game Menu :
• How to make an AWESOME...
How to make level saving System :
• How to make a simple L...
Remote Configuration by BRACKEYS :
• CHANGE YOUR GAME ANYWH...
Game difficulty by Brackeys :
• Difficulty in Video Ga...
How to make first person game in UNITY by BRACKEYS :
• MAKING YOUR FIRST FPS ...
Some interesting and fun Unity videos by DANI
I made an evil bot my friend :
• I Accidentally Made an...
I turned KZread into giant battle royal game :
• I Turned KZread into ...
I made a game in 30 Minutes :
• Making a Game in 30 Mi...
Music: www.bensound.com 🎵
Пікірлер: 86
My mans spoke faster than lightning. Thanks for the tutorial!!
This is the best tutorial, thank you
Thanks for being active, your tutorials are helping me, keep up the good work.
@TheGameGuy
2 жыл бұрын
Thanks mate, means a lot ♥️
Nice video and thanks for making a video like this :]
Yes this is PERFECT! Thank you!!!!
GREAT TUTORIAL TY!
If you guys are crashing as soon as you try out the SpikeGenerator script, be sure you are selecting the spike prefab as your spike variable, and not the spike that is already in your scene
where do you put the spike tag?
i am getting this error NullReferenceException: Object reference not set to an instance of an object
For the Object reference errors, pay close attention to what he has clicked on in the hierarchy or assets when adding scripts. I struggled for a while before realizing he added the SpikeScript to the Spike prefab he made earlier in the assets tray. Also hit a road block when I put the SpikeGenerator script on the NextLine asset which just made infinite spikes and crashed constantly. its a 20 minute video that I've watched like 3 hours of while trying to catch everything.
@olsonmovies
2 жыл бұрын
Thank you. This solved my problem!
@mrktgreen8101
Жыл бұрын
Thanks much for this comment bro✌
The type or namespace name 'TMP_Text' could not be found (are you missing a using directive or an assembly reference?)
it says error 0106 any ideas? idk anything about c# or someone can give me that code pls, i think just typing that code thing doesn't really effective
how do i overcome this error? error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
helo i know i am kinda late to comment but... for some reason when i jump it only works once then stops working... can u please help me?
The scoreboard is not working, I followed all the directions and once I hit play to test it, the scoreboard disappears and the player does not stop when it hits an obstacle. what should i do?
sir i have no error but i have problem i have no spone randomly i have spone one time
Perfect Tutorial Thank you for this lost a few hairs but was fun. :D
Getting this error: NullReferenceException: Object reference not set to an instance of an object PlayerScript.Update ()
why my spike clones just once? anyone can answer pls?
Hey I can’t add a rigid body 2d because it says that it conflicts with the box collider, any suggestions?
@TheGameGuy
2 жыл бұрын
You must be adding box collider instead of box collider 2d
I can't finish game, spikes comes front of me. How can I solve this?
good video👍👍
I'm currently stuck at the point where i keep getting errors at 5:00 when it says that i cannot implicitly convert type UnityEngine.RigidBody2D to RigidBody2D and i dont know what that means
@samuelv5978
4 ай бұрын
U cant type RigidBody2D u need to type Rigidbody2D
what program are you using for csharp?
@TheGameGuy
2 жыл бұрын
Visual Studio
@sellePLAYS
11 ай бұрын
great question. @thegameguy maybe put this on the description especially if it's geared toward beginners who only have Unity installed and nothing else. great tutorial tho! thank you
Hello, when my spike hits nextLine, it doesn't spawn another spike, can anyone help with this problem? There is no script errors etc.
@ImahTistic1
Жыл бұрын
too fast spike?
He generates no Spike Clone for me
Hi, your videos and channel are great, I'm having a problem and I need help. After I finished writing the spike Generator script, Unity gave me this error: error CS0266: Cannot implicitly convert type `UnityEngine.Object' to `UnityEngine.GameObject'. An explicit conversion exists (are you missing a cast?)
When I do the SpikeGenerator script it gives me a CS0246 error saying that SpikeGenerator could not be found, does anyone else have this problem cause I dont know how to solve it
@xus9380
Жыл бұрын
you need to save all scripts file
10:00 why do we use Vector2? Why do we use Time.deltaTime? you are not explaining anything
I can't add the Score to the Player? how can i fix it
@vincentdcn
2 жыл бұрын
did you ever get this fixed..? I'm having the same problem
@bajafresh8342
Жыл бұрын
i had this problem FOREVER TOO . make sure you create a UI titled “Text” and not “MeshPro Text” or something along those lines. You might have to add it as a component
I have the error: NullReferenceException: Object reference not set to an instance of an object PlayerScript.Update () (at Assets/Scripts/PlayerScript.cs:38)
@aros_
Жыл бұрын
omg i have the same thing. I tried to drag the text to the player put it didn't let me
@Dr4gonSt4lker
11 ай бұрын
@@aros_ because in newer versions of Unity TMP used instead of old Text. To fix it you have to declare public TMP_Text ScoreTxt instead of public Text.
Hi I have this in my unity consol : NullReferenceException: Object reference not set to an instance of an object SpikeGenerator.GenerateSpike () (at Assets/Scripts/SpikeGenerator.cs:23) SpikeGenerator.Awake () (at Assets/Scripts/SpikeGenerator.cs:16) Can you help me to fixed that please ?
@AxeyPM
2 жыл бұрын
you need to add the SpikeScript to the prefab you made of the spike
@darshandev1754
2 жыл бұрын
@@AxeyPM still gives the same error,
THANK YOOUUUUU
can you tell me how to make it without numbers after the ","
@Bfiwlqnwndidokd
2 жыл бұрын
There are many ways, for example: Create int variable scr. Then after: score += Time.deltaTime *4 write: scr = (int)score;(This will cast score into int). And instead of ScoreTxt.text = "SCORE: " + score.ToString("F") write ScoreTxt.text = "SCORE: " + scr.ToString();
@Bfiwlqnwndidokd
2 жыл бұрын
Hope you understood)
@franciszekkuxnicki5321
2 жыл бұрын
@@Bfiwlqnwndidokd I have better solution, if u dont want numbers after coma just chanfe"F" to "0"
@Bfiwlqnwndidokd
2 жыл бұрын
@@franciszekkuxnicki5321 oh, stupid me🤦♂️😂
Great tutorial - Maybe just a little fast at times but good content! :) Thanks
I can only get the player to jump once and then I have to check off Is Grounded.
@ImahTistic1
Жыл бұрын
press play
@guwinet5926
Жыл бұрын
Hello! I've encountered this as well. Make sure you tag Ground in the hierarchy to ground tag
My game keeps crashing due to unlimited spawning, how can I fix that?
@ImahTistic1
Жыл бұрын
the finish line at 11:45
Sir plz make stage perfab tutorial
everything went fine, only problem I am having would be my game does not stop when I hit a spike. Will need to tweak the code a little I guess
@bajafresh8342
Жыл бұрын
me too! Also my scoreboard disappears when this happens too. did you fix it on yours?
@ishannaik9093
6 ай бұрын
Same issue
👍👍👍
A very poor tutorial coming from someone who already understands this you rush through most of the script without explain properly what it means with blurred speech. Next time you need to explain the code as you aren't teaching the concept, which is key to learning
@alwaysmuede9323
2 жыл бұрын
exactly
@vincentdcn
2 жыл бұрын
THANK YOU!
3:55
7:40
I could only jump once. I had to go to another tutorial for jumping.
@Phillip.Grobler
2 жыл бұрын
u also had that issue... the tutorial name?
Geo kares
I'm going to say it looks good before doing it. I'm good at typing. So, I'll rely on typing skills. When the errors come, I'll delete and reinstall. I'll start to try after work today.
please speak game Tiles Hop,
2 months 🤷
@TheGameGuy
2 жыл бұрын
Sorry about that :( I will try to make at least 1 video every single week from now on.
activate windows
@TheGameGuy
2 жыл бұрын
#LifeGoals
slow down
@TheGameGuy
2 жыл бұрын
Got it :D
this tutorial sucks it just crashes!
waste of time
how do i fix this error SpikeGenerator.GenerateSpike () (at Assets/Scripts/SpikeGenerator.cs:23) SpikeGenerator.Awake () (at Assets/Scripts/SpikeGenerator.cs:16)
@AxeyPM
2 жыл бұрын
you need to add the SpikeScript to the prefab you made of the spike
if you dont want decimal just use this "F0" scoreTxt.text = "SCORE : " + score.ToString("F0");