Infinite floor

0 favourites
  • 7 posts
From the Asset Store
A procedurally generated infinite runner in 3D for Construct 3!
  • Hello there!

    I am pretty new with construct 2 and wanted to start an auto-runner.

    I started with the basic template and moved on with random generated blocks as obstacles but now my problem is that I just don't know how to make an infinite floor,I tried with every idea that got trough my head but just can't get it started...

    So,for a recap:I want to make the floor to be endless.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could have a tiled floor, and span it longer than your screen. Now, suppose the floor is always moving to the left with bullet behavior or whatever, you can:

    + if floorObject.x < floorObject.width

    • set floorObject.x = floorObject.x+floorObject.width

    This will make the floor jumps back by its width amount giving an impression of infinite floor.

  • Thanks for the tip,gonna use that later on but for now I just gave the system the event that will do something like this: System,every 1 second:spawn object floor.

    Now one of my problems is that I want to make a jump strength and by that I mean that if you press the button longer you will jump longer,tried the "vector y" method but the problem is that it will have infinite jumping,how do I stop that?

  • Ahh... variable jumping.

    do this:

    + if jump key is released,

    • + if player is NOT falling
    • - set player's platformer's vector y to player's platformer's vector y / yourThreshold

    yourThreshold shall be the variable you should try play around until you feel right.

    If the player doesn't let go of the jump key, he will achieve max jumping value imstead.

  • I am sorry but I didn't quite understand you,could you give me an example with more details?

    I tried tutorial from MozayKnows (Can't post links unfortunately) but if I press the jump key fast I am getting just some infinite jumping...

  • Which part do you not understand?

  • This is achieved easily by doing [on button released]/[player is jumping]>[player set vector Y to 0]

    While you hold your jump button you go up, and letting go of the key stops you dead in your vertical tracks and gravity takes over.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)