Endless runner v1.2


(Cotaks) #1

Hello,

Someone needed an endless runner setup.
So i made a simple setup that has a max. of 3 floor planes on screen at any given time.

V1.2 changes:

  • max_distance changed into spawn_distance
  • added_before changed into a list and has its own distance check called remove_distance
  • added 2 more ground planes and parented objects to it, it now uses random.choice to select one
  • added a tiny bit of comments at the things you can change
  • player jump height changed and set to tap mode (no flying anymore, but unlimited jumps)
  • due to the changes of the distance check, the ground plane will not be removed if you jump at the end
  • instead of max. 2 ground planes you now have a max. of 3 ground planes on screen
  • the ground plane uses a property(ground) now, so we can grab them all when the game starts

Use W to move and space bar to jump: (new version 1.2)
endless_runner_v1.2.blend (499 KB)


Cotaks resources
(Lostscience) #2

How about the down direction.


(Cotaks) #3

you mean with drops and jumps?

#edit
Posted a new blend with drops and jumps


(Daedalus_MDW) #4

i personally havent found limits (pushing the limits at 32km), but accuracy becomes an issue at about 10km(from origin). 16km landscapes are my go-to.


(Lostscience) #5

I want it to be able to generate the planes down so i would be able to dig.


(<== Lost? Click Me) #6

You could always move the world rather than the player to hide bit precision limits (shaking / inaccuracy).


(Cotaks) #7

I want it to be able to generate the planes down so i would be able to dig.

That is not an endless runner.

but…
take the first blend you downloaded without the drops/jumps, then just change the worldPosition.y into .z and change the groun_plane_size into an offset number instead of the actual y size of the plane. i think that should work.

i personally havent found limits (pushing the limits at 32km), but accuracy becomes an issue at about 10km(from origin). 16km landscapes are my go-to.

32 or 16 or 10 km is actually pretty far to run, at that distance its either, rotate the character and turn y into negative y and run back (so you can run forwards and back) or simply time for a new level.

You could always move the world rather than the player to hide bit precision limits (shaking / inaccuracy).

true, but its better to do like my answer a quote higher (i rather move the player then the world (1 object vs lets say 1000)).


(Lostscience) #8

I would rather move the player.


(Lostscience) #9

But would i be able to go forwards and it would work?


(Cotaks) #10

But would i be able to go forwards and it would work?

No, then you can only go down.

i’m sorry to say but i am not going to convert this into a runner with digging, but again a but… you can copy the script so you have it 2 times, adjust 1 to place them downwards and the other for forwards and include a dig option. I guess this script is not perfect for that option due to it removes planes behind you and its only using 2 planes at any time (unless you use the script twice with 2 different spawners (empties) then you use 4 planes).


(Lostscience) #11

I think it would because i do not want what i do not see to exist.


(<== Lost? Click Me) #12

It was 2 planes vs 1 player when suggested. Some studios implement this in their games. Perhaps not always the worse choice?


(Cotaks) #13

I think it would because i do not want what i do not see to exist.

indeed, and you dont want to render stuff that you are not going to use anymore(i know its out of cam range so it wont render but it still uses resources).

It was 2 planes vs 1 player when suggested. Some studios implement this in their games. Perhaps not always the worse choice?

true, and its not always a bad choice, but if you add things (not build into the ground tile) you get allot of objects. because 2 planes with nothing else in the scene is kinda boring haha.

you could make 100 different styles of tiles and use random.choice() to select a random tile to get variation, but i rather load the objects (for example: trees, additional stuff you need to jump over or stuff that moves around) separate.


(Lostscience) #14

It is not as easy as that.The console gives me an error.


(Cotaks) #15

It is not as easy as that.The console gives me an error.

yup, i thought so, due to its not made to go down

Added a new version 1.2