Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to make Infinite Level on my game?

Discussion in 'Scripting' started by ColePete, Mar 12, 2021.

  1. ColePete

    ColePete

    Joined:
    Mar 12, 2021
    Posts:
    3
    I want to make it to where obstacles will randomly appear and the level continues forever. (Also, I don't know how to upload the project to show you, so if you want to see it tell me how to upload it.)
     
  2. FlashMuller

    FlashMuller

    Joined:
    Sep 25, 2013
    Posts:
    450
    There's gazillions tutorials on it. You will find them searching for "Endless Runner"
     
    Kurt-Dekker likes this.
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,186
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Making the level continue forever is actually the easy part. You'll find ramping up the difficulty forever to be what is hard. Good luck
     
  5. ColePete

    ColePete

    Joined:
    Mar 12, 2021
    Posts:
    3
    thanks, I will let you know if it works. BUT... will the tutorial show me how to randomly create obstacles? Like subway surfers??
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    I suggest you hire somebody to view the tutorial for you and let you know.

    If you encounter scripting errors, please do hurry back and post here, which is what this forum is about.

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    If you want to make the simplest demo of an endless game, make this game:

    - put a 2D character onscreen, let him move anywhere onscreen

    - zero out a timer, start counting it up every frame for your score

    - spawn rocks above him and let them fall, clearing them when they fall off the bottom screen

    - make the player die if a rock falls on him.

    - increase the rock gravity steadily over time.

    - spawn those rocks at ever-faster rates until you get hit.

    VOILA! Instant demo of an endless game. Your score is the timer.