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

  • @heyandre.design
    @heyandre.design2 жыл бұрын

    My mans spoke faster than lightning. Thanks for the tutorial!!

  • @whitesheep1417
    @whitesheep14172 жыл бұрын

    This is the best tutorial, thank you

  • @matthewsenera9836
    @matthewsenera98362 жыл бұрын

    Thanks for being active, your tutorials are helping me, keep up the good work.

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    Thanks mate, means a lot ♥️

  • @Hollowdude15
    @Hollowdude15 Жыл бұрын

    Nice video and thanks for making a video like this :]

  • @samidayan2376
    @samidayan23762 жыл бұрын

    Yes this is PERFECT! Thank you!!!!

  • @Dkeem86
    @Dkeem86 Жыл бұрын

    GREAT TUTORIAL TY!

  • @itsrascal8121
    @itsrascal81212 жыл бұрын

    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

  • @ChupaChups2626
    @ChupaChups26262 жыл бұрын

    where do you put the spike tag?

  • @jayansh374
    @jayansh3742 жыл бұрын

    i am getting this error NullReferenceException: Object reference not set to an instance of an object

  • @jarrodsneed4100
    @jarrodsneed41002 жыл бұрын

    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

    @olsonmovies

    2 жыл бұрын

    Thank you. This solved my problem!

  • @mrktgreen8101

    @mrktgreen8101

    Жыл бұрын

    Thanks much for this comment bro✌

  • @prathibasingaravelu3440
    @prathibasingaravelu34409 ай бұрын

    The type or namespace name 'TMP_Text' could not be found (are you missing a using directive or an assembly reference?)

  • @kckibitz5067
    @kckibitz5067 Жыл бұрын

    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

  • @100shadesofray6
    @100shadesofray62 жыл бұрын

    how do i overcome this error? error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

  • @Phillip.Grobler
    @Phillip.Grobler2 жыл бұрын

    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?

  • @bajafresh8342
    @bajafresh8342 Жыл бұрын

    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?

  • @KhattakVibess804
    @KhattakVibess8042 ай бұрын

    sir i have no error but i have problem i have no spone randomly i have spone one time

  • @jameslemon3684
    @jameslemon36842 жыл бұрын

    Perfect Tutorial Thank you for this lost a few hairs but was fun. :D

  • @prachetmakwana6011
    @prachetmakwana60112 жыл бұрын

    Getting this error: NullReferenceException: Object reference not set to an instance of an object PlayerScript.Update ()

  • @richardkareem2320
    @richardkareem2320 Жыл бұрын

    why my spike clones just once? anyone can answer pls?

  • @meteorarcade165
    @meteorarcade1652 жыл бұрын

    Hey I can’t add a rigid body 2d because it says that it conflicts with the box collider, any suggestions?

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    You must be adding box collider instead of box collider 2d

  • @aliseftali38
    @aliseftali382 ай бұрын

    I can't finish game, spikes comes front of me. How can I solve this?

  • @eggseatpegs
    @eggseatpegs2 жыл бұрын

    good video👍👍

  • @FaneOnYT
    @FaneOnYT Жыл бұрын

    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

    @samuelv5978

    4 ай бұрын

    U cant type RigidBody2D u need to type Rigidbody2D

  • @hddh6983
    @hddh69832 жыл бұрын

    what program are you using for csharp?

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    Visual Studio

  • @sellePLAYS

    @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

  • @kjanskas
    @kjanskas Жыл бұрын

    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

    @ImahTistic1

    Жыл бұрын

    too fast spike?

  • @allabouteverything4925
    @allabouteverything49252 жыл бұрын

    He generates no Spike Clone for me

  • @hirad7695
    @hirad76952 жыл бұрын

    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?)

  • @erkanjoc1940
    @erkanjoc19402 жыл бұрын

    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

    @xus9380

    Жыл бұрын

    you need to save all scripts file

  • @alwaysmuede9323
    @alwaysmuede93232 жыл бұрын

    10:00 why do we use Vector2? Why do we use Time.deltaTime? you are not explaining anything

  • @Nebeneinkommen
    @Nebeneinkommen2 жыл бұрын

    I can't add the Score to the Player? how can i fix it

  • @vincentdcn

    @vincentdcn

    2 жыл бұрын

    did you ever get this fixed..? I'm having the same problem

  • @bajafresh8342

    @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

  • @ImahTistic1
    @ImahTistic1 Жыл бұрын

    I have the error: NullReferenceException: Object reference not set to an instance of an object PlayerScript.Update () (at Assets/Scripts/PlayerScript.cs:38)

  • @aros_

    @aros_

    Жыл бұрын

    omg i have the same thing. I tried to drag the text to the player put it didn't let me

  • @Dr4gonSt4lker

    @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.

  • @popcorn7149
    @popcorn71492 жыл бұрын

    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

    @AxeyPM

    2 жыл бұрын

    you need to add the SpikeScript to the prefab you made of the spike

  • @darshandev1754

    @darshandev1754

    2 жыл бұрын

    @@AxeyPM still gives the same error,

  • @yourlocalpilot0
    @yourlocalpilot0 Жыл бұрын

    THANK YOOUUUUU

  • @franciszekkuxnicki5321
    @franciszekkuxnicki53212 жыл бұрын

    can you tell me how to make it without numbers after the ","

  • @Bfiwlqnwndidokd

    @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

    @Bfiwlqnwndidokd

    2 жыл бұрын

    Hope you understood)

  • @franciszekkuxnicki5321

    @franciszekkuxnicki5321

    2 жыл бұрын

    @@Bfiwlqnwndidokd I have better solution, if u dont want numbers after coma just chanfe"F" to "0"

  • @Bfiwlqnwndidokd

    @Bfiwlqnwndidokd

    2 жыл бұрын

    @@franciszekkuxnicki5321 oh, stupid me🤦‍♂️😂

  • @danielotto
    @danielotto2 жыл бұрын

    Great tutorial - Maybe just a little fast at times but good content! :) Thanks

  • @olivespeedruns
    @olivespeedruns Жыл бұрын

    I can only get the player to jump once and then I have to check off Is Grounded.

  • @ImahTistic1

    @ImahTistic1

    Жыл бұрын

    press play

  • @guwinet5926

    @guwinet5926

    Жыл бұрын

    Hello! I've encountered this as well. Make sure you tag Ground in the hierarchy to ground tag

  • @gottagetcrapdone2100
    @gottagetcrapdone21002 жыл бұрын

    My game keeps crashing due to unlimited spawning, how can I fix that?

  • @ImahTistic1

    @ImahTistic1

    Жыл бұрын

    the finish line at 11:45

  • @shubhamshrivastava8508
    @shubhamshrivastava85082 жыл бұрын

    Sir plz make stage perfab tutorial

  • @jesseescobedo1497
    @jesseescobedo1497 Жыл бұрын

    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

    @bajafresh8342

    Жыл бұрын

    me too! Also my scoreboard disappears when this happens too. did you fix it on yours?

  • @ishannaik9093

    @ishannaik9093

    6 ай бұрын

    Same issue

  • @mirnawazali
    @mirnawazali2 жыл бұрын

    👍👍👍

  • @luke6164
    @luke61642 жыл бұрын

    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

    @alwaysmuede9323

    2 жыл бұрын

    exactly

  • @vincentdcn

    @vincentdcn

    2 жыл бұрын

    THANK YOU!

  • @DertyDub
    @DertyDub2 жыл бұрын

    3:55

  • @DertyDub
    @DertyDub2 жыл бұрын

    7:40

  • @Gothicqueen03
    @Gothicqueen032 жыл бұрын

    I could only jump once. I had to go to another tutorial for jumping.

  • @Phillip.Grobler

    @Phillip.Grobler

    2 жыл бұрын

    u also had that issue... the tutorial name?

  • @sheerazali5178
    @sheerazali51782 жыл бұрын

    Geo kares

  • @ts_cohn
    @ts_cohn2 жыл бұрын

    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.

  • @walney2008
    @walney2008 Жыл бұрын

    please speak game Tiles Hop,

  • @excalibur4203
    @excalibur42032 жыл бұрын

    2 months 🤷

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    Sorry about that :( I will try to make at least 1 video every single week from now on.

  • @Laleluis
    @Laleluis2 жыл бұрын

    activate windows

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    #LifeGoals

  • @tmclellen7296
    @tmclellen72962 жыл бұрын

    slow down

  • @TheGameGuy

    @TheGameGuy

    2 жыл бұрын

    Got it :D

  • @redymedy
    @redymedy2 жыл бұрын

    this tutorial sucks it just crashes!

  • @aigo-sama4460
    @aigo-sama44602 жыл бұрын

    waste of time

  • @IBeToxic
    @IBeToxic2 жыл бұрын

    how do i fix this error SpikeGenerator.GenerateSpike () (at Assets/Scripts/SpikeGenerator.cs:23) SpikeGenerator.Awake () (at Assets/Scripts/SpikeGenerator.cs:16)

  • @AxeyPM

    @AxeyPM

    2 жыл бұрын

    you need to add the SpikeScript to the prefab you made of the spike

  • @xus9380
    @xus9380 Жыл бұрын

    if you dont want decimal just use this "F0" scoreTxt.text = "SCORE : " + score.ToString("F0");