HOW TO MAKE A SIMPLE GAME IN UNITY - ENDLESS RUNNER - #2

preview_player
Показать описание
In the second episode of the Endless Runner tutorial series using Unity and C# we will make nasty, vicious, dangerous obstacles the player will have to dodge ! We'll also get them spawning in game and increase dicculty bit by bit to keep things tense and exciting !

---------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

For the most part, I already know how to do most of what you show me in these videos, but I still love watching them. You get better and better each video, and you are great at explaining yourself. Keep at it! You are doing awesome!

Rambolink
Автор

this is helping me make my first game. I might tweak the code so that you move left and right while obstacles come from above. these tutorials have been so helpful

profmonkey
Автор

New to the channel. Very good video! The best thing about it is that it's fast paced and to-the-point. I've been wasting too much time on 30 minute videos with "uuuh..." every 10 seconds.

Khrinx
Автор

You are the best man. I love how you get so much across in so little time.

cacomonkey
Автор

Looking forward to the parallax background
Edit:You should cover the new 2D Animation(found in Package manager);)

DawnosaurDev
Автор

Great Tutorials! Straight to the point no fillers, no waste of time telling us about the weather or about a random itch. Subscribed!

war
Автор

5:40 The statement should be (startTimeBtwSpawn - decreaseTime) >= minTime in order to makes sure the startTimeBtwSpawn variable always greater than or equal to the minTime.

manhlinhnguyen
Автор

Thanks for this tutorial series. I'm currently using this as a basis for my first game project. Cheers!

travisalstrand
Автор

This kind of game has so much potential and I like the way you teach, on what every line of code does.

raphaelbenasa
Автор

Couple corrections on Player Script:
void Start()
{
//Player Starting Health
Health = 10;
}
Need to set starting health or you get error on trying to play game

private void Update()
{
//Player Health
if (Health <= 0)
{
//Reload Scene
Health = 10;

}
Need to reset the health back to default value on "Reset"

mholmes
Автор

FYI to load a specific scene on death, make sure to add your scene in the build settings

CHAXIC
Автор

Might be a good idea to also add the line:

if(transform.position.x <= xPos)
{
Destroy(gameObject);
}

to the obstacle because otherwise the game might get laggy due to the amount of objects in the game o:

TearThatRedFlagDown
Автор

Hi, if any of you want the obstacles to get deleted a little after being created for performance (would get deleted when goes off-screen), you can do it quite easily. Just create something like this above the update function:

public IEnumerator DestroyAfterTime()
{
yield return new WaitForSeconds(speed);
Destroy(gameObject);
}

private void Start()
{

}

That will destroy the obstacle after a while, hopefully after it goes off the screen. If the obstacle gets destroyed before going off the screen, add '* 2' or '* 3' just after 'speed' in the WaitForSeconds() function. An example:

public IEnumerator DestroyAfterTime()
{
//The updated line of code is below
yield return new WaitForSeconds(speed * 2);
Destroy(gameObject);
}

accioollie
Автор

Thank you for your awesome videos. I had so much fun watching and applying your videos in my game! Its a shame that you videos dont get the attention they deserve.

Xy-gxou
Автор

Thank you for uploading #2 in a short time. I've just finished #1.

BrainsEatZombies
Автор

Thanks for some incredible vids dude, you deserve so many more subs! Can you potentially look into how to do an inventory system / storage system (chests) at all please? There are some good tutorials online, but your teaching style suits me really well.

Keep up the good work
Andy

andyjh_
Автор

Great video! can't wait for part 3!

jordanrobinson
Автор

episode three will be super fascinating!

bunggo
Автор

These videos have helped me so much in my game coding class, thank you!

Rae_melody
Автор

wow i acc love you. I wanna learn how to be a prgrammer but im a noob and i dont know how to do anything but your videos always help me find what im looking for and they're always good and i learn a lot from it

mr.casual