Results 1 to 15 of 15
  1. #1
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235

    Endless runner v1.2

    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
    Last edited by Cotaks; 18-Nov-16 at 13:57.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



  2. #2
    How about the down direction.



  3. #3
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    Originally Posted by Lostscience View Post
    How about the down direction.
    you mean with drops and jumps?

    #edit
    Posted a new blend with drops and jumps
    Last edited by Cotaks; 16-Nov-16 at 13:26.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



  4. #4
    Originally Posted by cotax View Post
    You can run forever in Y direction or till the game engine decides that you ran to far (dunno if that could happen).
    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.
    System "IVAN" (rev 1.3b) - Win7 64bit - Blender 2.74:
    CPU- Intel i3-3220 3.30 Ghz | GPU- EVGA GTX 970 | RAM- GSkill Ares 16GB 1600 Mhz | MB- ASUS P8Z77-V LK
    Where my Code Lives - https://github.com/DaedalusMDW



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



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



  7. #7
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    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)).
    Last edited by Cotaks; 16-Nov-16 at 14:15.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



  8. #8
    I would rather move the player.



  9. #9
    Originally Posted by cotax View Post
    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.



    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.


    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)).
    But would i be able to go forwards and it would work?



  10. #10
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    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).
    Last edited by Cotaks; 16-Nov-16 at 14:24.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



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



  12. #12
    Originally Posted by cotax View Post
    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)).
    It was 2 planes vs 1 player when suggested. Some studios implement this in their games. Perhaps not always the worse choice?



  13. #13
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    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.
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



  14. #14
    Originally Posted by cotax View Post
    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).
    It is not as easy as that.The console gives me an error.



  15. #15
    Member Cotaks's Avatar
    Join Date
    May 2012
    Location
    The Netherlands
    Posts
    1,235
    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
    '- It's not working' then check your console like: this
    Did you know that you can make a complete game with the .blends that i share?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •