Endless Runner: Procedural Track Generation (Unity Tutorial)

  Рет қаралды 56,759

Matt MirrorFish

Matt MirrorFish

Күн бұрын

In this video you will learn how to generate a procedurally generated random endless race track constructed from square prefab segments which connect to one another and don't overlap. The example game is a small endless runner game made with Unity.
You can download the full project code on Github here: bit.ly/endlessracer

Пікірлер: 81
@racmanov
@racmanov 2 жыл бұрын
Damn, great idea with tile based grid. I was thinking whole day and was overcomplicating as usual and your solution is so simple.
@mikediaz7628
@mikediaz7628 3 жыл бұрын
Followed both channels, both have an insane amount of information. Thank you!!
@Prakaz
@Prakaz 3 жыл бұрын
Really enjoy watching your videos - very informative! Also you have one of the most soothing voice I've heard on KZbin 🙂
@newbquesttv
@newbquesttv 3 жыл бұрын
Thank you! 😊
@yassinesadik
@yassinesadik 4 жыл бұрын
just realized that you're matt from unity's training live streams. cool stuff you're doing, im following from now on , thanks and keep going.
@newbquesttv
@newbquesttv 4 жыл бұрын
Thanks Yassine. Yeah it’s me!
@pockets08
@pockets08 3 жыл бұрын
Good to know, following.
@suj13
@suj13 3 жыл бұрын
@@newbquesttv JUst one question. how do you input the project into unity?
@newbquesttv
@newbquesttv 3 жыл бұрын
@@suj13 You can download the zip from Github and then open it via the Unity Hub's "Add Project" functionality.
@tirkdiamond
@tirkdiamond 3 жыл бұрын
Nice video! Improvement idea for a future video: you should play the game at the end (12:00) so you can show how the pieces generate automatically when you go closer instead of just pressing T. In any case, this is part of a series; it's not a self-contained video, so there shouldn't be a problem with playing sth you haven't showed how to do it yet. :D
@yarickcherevko7022
@yarickcherevko7022 3 жыл бұрын
Matt, you are awesome! This is so elegant and effective. Thank you for walking us through. SUBSCRIBED!
@newbquesttv
@newbquesttv 3 жыл бұрын
Thanks very much Yarick! Really happy to hear you enjoyed it
@iangraham6730
@iangraham6730 4 жыл бұрын
Nice! I just recently began procedural generation, and I am kicking myself that I had not started it sooner!
@newbquesttv
@newbquesttv 4 жыл бұрын
Enjoy! It’s tons of fun.
@brauliojorgealmeida
@brauliojorgealmeida 3 жыл бұрын
Holy shit! This is pure gold! Thank you
@newbquesttv
@newbquesttv 3 жыл бұрын
Right on! Glad to hear it helped.
@Farrukh3D
@Farrukh3D 4 жыл бұрын
Great tutorial and interesting project. Thanks for sharing :)
@newbquesttv
@newbquesttv 4 жыл бұрын
Thanks Farrukh! You’ve been doing some great stuff too!
@artinstroukeprod
@artinstroukeprod 3 жыл бұрын
Great explanation and simple system! Thank you for lesson!
@newbquesttv
@newbquesttv 3 жыл бұрын
You're very welcome!
@rohaninabout
@rohaninabout 2 жыл бұрын
Thanks for such a great tutorial Matt, we're using your design in a game a buddy and I are working on. Quick question if you don't mind - you mentioned using Cinemachine between your level chunks. Just wondering what your design was for this? We have a vcam/track/dolly for each chunk, but it dampens when transitioning between the chunks. We want the cam and player on rails (like Star Fox), but it's pretty confusing! Anyway just thought I'd ask! Thanks in advance if you see this 😁
@Blinkers2007GameDev
@Blinkers2007GameDev 2 жыл бұрын
have u published your game yet?
@valuefront9959
@valuefront9959 3 жыл бұрын
yess! love your tutorials
@newbquesttv
@newbquesttv 3 жыл бұрын
Thank you!
@hichamtsouri4703
@hichamtsouri4703 2 жыл бұрын
WOOOW ..grt explanation.. flawless project
@newbquesttv
@newbquesttv 2 жыл бұрын
Glad you liked it!
@dcry1003
@dcry1003 2 жыл бұрын
noob question does the level generator also works for terrain generation? or do i need to convert terrain to mesh for the level generator to generate a level
@JoeV2257
@JoeV2257 3 жыл бұрын
Cool content you got my sub mate!
@newbquesttv
@newbquesttv 3 жыл бұрын
Appreciate that Joe!
@gameniqinc5640
@gameniqinc5640 4 жыл бұрын
Hi Matt, Your tutorials are great. How did you achieve the effect of(I think missiles going out) at 1:02? Can you make a tutorial on how to create light emitting objects in Unity?
@rocketshader2699
@rocketshader2699 Жыл бұрын
How do you handle after your Z value reaches over 10K. I don't wanna go forward after 10k so I reset every chunk and players position to initial position but that makes car go jump and makes a weird sound glitch. Great video btw
@StigDesign
@StigDesign 4 жыл бұрын
when am in shape i need to re watch this several times and try it, might be funn to add simular thing to my car game as som extra re-playability. :D this reminds me of the track editor in V-Rally2 :D
@newbquesttv
@newbquesttv 4 жыл бұрын
Cool thanks!
@StigDesign
@StigDesign 4 жыл бұрын
@@newbquesttv :D allready watched it 1 time :) but so tired, so i need to re-watch it laiter when i have sleept so that i can remember and learn from it :D
@moklarry8766
@moklarry8766 8 ай бұрын
Hello matt in my game the level spawn in a stack and not behind each other do you know why?
@moklarry8766
@moklarry8766 8 ай бұрын
Bei mir spawnen unendlich viele Level auf 1 stelle obwohl sie ja eigentlich hintereinander spannen sollten weißt du warum?
@KJ7JHN
@KJ7JHN 3 жыл бұрын
Please make a video on adding track pieces/tiles to perlin noise generated tiles. Or possibly adding a bezeir curve to perlin noise generated tiles, then build track meshes based on the bezeir curve. Another direction, procedurally generated trees from perlin noise map. Thanks.
@alpha3836
@alpha3836 2 жыл бұрын
How do I make it so that a certain prefab spawns only after another certain prefab spawns?
@Patricebrouh
@Patricebrouh Жыл бұрын
Hi Matt! Please can you explain me why you choose ScriptableObject for piece of Bloc. Is it more efficient ?
@newbquesttv
@newbquesttv Жыл бұрын
Nope, just preference
@Patricebrouh
@Patricebrouh Жыл бұрын
@@newbquesttv Thanks
@hanyabdoun
@hanyabdoun 3 жыл бұрын
i just love you man
@newbquesttv
@newbquesttv 3 жыл бұрын
@OmeedNOuhadi
@OmeedNOuhadi 2 жыл бұрын
Awesome!
@firewatch123
@firewatch123 11 ай бұрын
but how to do it like in the game race the sun? so that it also generates sideways
@charleswaltson7110
@charleswaltson7110 3 жыл бұрын
Thank you very very much.
@user-kb1jg2qy7c
@user-kb1jg2qy7c 3 ай бұрын
Awesome videos, but why public fields? Private + serializefield is much cleaner. Also we can serialize property using field:serializefield. It makes life a lot easier
2 жыл бұрын
I would like to see some gameplay next
@dcsflightdeck
@dcsflightdeck Жыл бұрын
Is there a way to make this spawn chunks in a straight line only for like a subway surfers game
@fillowskyy
@fillowskyy Жыл бұрын
kzbin.info/www/bejne/fnrWdqSBhdR9jq8 Look at that video.
@johnkabiu4418
@johnkabiu4418 3 жыл бұрын
Good stuff... sub'd
@markgianturco5677
@markgianturco5677 3 жыл бұрын
Has anyone found a way to make this work vertically as well?
@freedom667
@freedom667 3 жыл бұрын
can we instantiate only squares? So, without tracks?
@newbquesttv
@newbquesttv 3 жыл бұрын
yes you can instantiate any prefab using this approach
@freedom667
@freedom667 3 жыл бұрын
@@newbquesttv well, how can I put the finish line?
@freedom667
@freedom667 3 жыл бұрын
@@newbquesttv Don't you know it? How can I finish line object to the last
@thelordz33
@thelordz33 3 жыл бұрын
Wow, i've only been game developing for 3 days and I'm already learning about switches when YanDev has been coding for years and still doesn't know what they are
@pratyushpanshikar4774
@pratyushpanshikar4774 4 жыл бұрын
This is very good! When can we expect Parts 2 and 3?
@newbquesttv
@newbquesttv 4 жыл бұрын
Thank you! Part 2 just came out. Part 3 next weekend.
@Aluminum_Lizard-um7mz
@Aluminum_Lizard-um7mz 3 жыл бұрын
github link you absolute weapon. cheers mate
@newbquesttv
@newbquesttv 3 жыл бұрын
"Absolute weapon" is a new one to me, I chuckled. Cheers dude, glad I could help.
@kwsmani1677
@kwsmani1677 4 жыл бұрын
Can u do a coin generation algorithm for this kind of game pls ???
@newbquesttv
@newbquesttv 4 жыл бұрын
What do you mean by a coin generation algorithm? Like place collectible objects?
@kwsmani1677
@kwsmani1677 4 жыл бұрын
@@newbquesttv yes
@negimas123
@negimas123 3 жыл бұрын
did you know ur project is used as a reqruitment test at unity
@newbquesttv
@newbquesttv 3 жыл бұрын
I know they did something similar years ago when I got hired there, surprised they are still? Did you do it or someone you know?
@mosaabmatar4117
@mosaabmatar4117 2 жыл бұрын
The Name of the assets ?
@RenukaYadav-dn8pm
@RenukaYadav-dn8pm 3 жыл бұрын
Hlo brother can you tell me the track name PLZZ I want to download yhat
@newbquesttv
@newbquesttv 3 жыл бұрын
The music you mean? Sorry it's a piece of music that I made myself, it's not publicly available.
@RenukaYadav-dn8pm
@RenukaYadav-dn8pm 3 жыл бұрын
@@newbquesttv I asked for track name to download it from asset store
@icaroamorim3123
@icaroamorim3123 3 жыл бұрын
In the first 30 seconds he already show how peaple who understand things do.
@bogasier
@bogasier 4 жыл бұрын
Why dislike?
@joepleavin3554
@joepleavin3554 3 жыл бұрын
Berlin
@tomazravljen8984
@tomazravljen8984 3 жыл бұрын
clickbait - I don't think this counts as procedural generation, it's just random level generation :D
@newbquesttv
@newbquesttv 3 жыл бұрын
ok
@benchappell8213
@benchappell8213 3 жыл бұрын
@@newbquesttv lmao
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 442 М.
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 82 МЛН
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
Procedural Generation: Endless Runner Unity Tutorial (Updated 2023)
9:28
Rigor Mortis Tortoise
Рет қаралды 16 М.
Procedural Generation in Unity
10:22
TNTC
Рет қаралды 56 М.
Infinite Runner in Unity - PLATFORM GENERATOR
18:20
GameDevHQ
Рет қаралды 36 М.
Simple Game Design and How It Makes Gaming Accessible
16:26
RealityEscape
Рет қаралды 109 М.
Recreating Mario Kart's Drifting | Mix and Jam
5:00
Mix and Jam
Рет қаралды 130 М.
C# Events & Delegates
17:21
Tarodev
Рет қаралды 82 М.
How To Build Roads Procedurally In Unity with the Splines Package
17:51
Procedural Generation in Unity (Tutorial)
10:29
Nebula Coding
Рет қаралды 74 М.
How to Make a 3D Endless Runner in Unity FULL TUTORIAL
3:14:21
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 300 М.
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 442 М.