Search Unity

[RELEASED] 2D+3D Infinite Runner Engine - new v1.6 : Downhill!

Discussion in 'Assets and Asset Store' started by reuno, Dec 31, 2015.

  1. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    im makin a driving game where different scenery spawners will activate based on distance traveled.

    I assume Scenario class is best used for this functionality.

    But since scenario has a timer that means the transitions may not happen exactly at the moment a certain distance is reached right?

    In that case, maybe doing an Update() check every frame with 1 if statement that checks for a distance x and adds to it once a distance is reached would be better.
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @luniac > Usually in movement, distance is related to time, so yes, the timer will likely work.
    But feel free to implement a different solution if you prefer.
     
    luniac likes this.
  3. mooumari

    mooumari

    Joined:
    May 9, 2018
    Posts:
    12
    hello there,
    I have a question about Infinite Runner Engine

    Can I build a game with Infinite Runner Engine just like Color snake by ketchapp or Alto's Odyssey?
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @mooumari > Short answer : yes. There's no example that'd be very close to Color Snake in the asset, but at the same time that game is so simple you should have no trouble replicating something similar, and the spawner classes can be put to good use to spawn these patterns. The "hard" part would be the snake itself but that can be solved with a trail or particles in 2 minutes :)
    As for Alto's Odyssey, the Downhill demo scene is sort of inspired by it. It doesn't come with Alto's advanced mechanics of course, but can act as a nice basis.
     
  5. mooumari

    mooumari

    Joined:
    May 9, 2018
    Posts:
    12
    ok, thank you so much.
     
  6. danitera3

    danitera3

    Joined:
    Jun 13, 2018
    Posts:
    2
    Hi, I bought this wonderful asset to build my first infinite running game. I was trying to add Swipe action to playable characther, but I do not know how to write code. Where can I find documentation or example scripts about it. Thanks.
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @danitera3 > There's no built-in example of swipe right now, it's on the todo list though. In the meantime I'm sure you could find examples of how to do swipes in Unity on the forum somewhere, or on Google.
     
    danitera3 likes this.
  8. umair_playx

    umair_playx

    Joined:
    May 9, 2019
    Posts:
    2
    Hello Runo,

    First of all great asset to speed up things. Recently purchased the latest version of it. Great example scenes. I am trying to make a Subway Surfers like game using Lane Runner. The swipe controls only move to left and right. I apply jumper script on prefab but no result. I edited lane runner script and used the same logic as in jumper script. Still no luck. How to implement swipe up (jumping) and down (sliding/rolling).
    Also, does it supports in apps integration and power ups creation other than speed boost.

    Thank you.
     
    Last edited: May 9, 2019
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @umair_playx > I can't guess what in your code doesn't work :)
    You can see examples of jump implementations in most characters in the demos. It'd have to be more or less the same depending on your specs. As for rolling, that's not something that is built-in, so it's up to you really.
    There's no support for in apps. For power ups, that is built-in, you'll have the speed boost as an example. Others would be created exactly the same.
    If you have more questions like these, please use the support form, thanks!
     
  10. danitera3

    danitera3

    Joined:
    Jun 13, 2018
    Posts:
    2
    Hi Reuno,
    Been trying to configure swipe zone in my game.
    In Jumper script I added SwipeEvent listener
    Code (CSharp):
    1. public virtual void OnMMEvent(MMSwipeEvent swipe)
    2.         {
    3.             switch (swipe.SwipeDirection)
    4.             {
    5.                 case MMPossibleSwipeDirections.Down:
    6.                     InputManager.Instance.DownButtonDown();
    7.                     JumpDown();
    8.                     break;
    9.             }
    10.         }
    11.  
    12.         protected virtual void OnEnable()
    13.         {
    14.             this.MMEventStartListening<MMSwipeEvent>();
    15.         }
    16.  
    17.         protected virtual void OnDisable()
    18.         {
    19.             this.MMEventStopListening<MMSwipeEvent>();
    20.         }
    It is correct?
    And next steps? Code about zone pressed?
    Thank you in advance
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @danitera3 > As you'll see if you look at the class, pressing a swipe zone triggers the input manager's main action.
     
  12. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    I would like to get this package. I have a question?
    Like in this video does the scene and the colors of the items change?

     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @udede > That just looks like color grading to me. Probably the cheapest and easiest way to do this.
     
  14. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    so do you have this feature?
    thanks
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @udede > It's native in Unity, you just need the post processing package for that.
     
  16. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    so this package does not have this feature.
    thanks
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @udede > As I said, it's a feature that is built into Unity.
    So I guess in a way, yes, it's also sort of in the Infinite Runner Engine?
    To clarify, it's absolutely possible and very easy to get that same result using the Infinite Runner Engine (as you would in any other Unity project, really).
     
  18. umair_playx

    umair_playx

    Joined:
    May 9, 2019
    Posts:
    2
    Thanks Reuno, yes I successfully implemented all the features that I wanted to implement. I just had to follow the examples and improvise my own implementation and it worked without any trouble. Thanks for your answer.
     
    reuno likes this.
  19. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72

    the game I developed with this package.not finished yet!
    Thanks

     
    headlessstudio, josker and reuno like this.
  20. Testeria

    Testeria

    Joined:
    Aug 15, 2013
    Posts:
    18
    Hello,
    I need a spawner that would spawn some objects (enemies) based on both time AND distance from the beginning of the level, not from the previous element.

    How would You recommend to implement this in infinite runner engine?
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @Testeria > That looks like a job for the ScenarioManager class.
     
    Testeria likes this.
  22. Testeria

    Testeria

    Joined:
    Aug 15, 2013
    Posts:
    18
    So I just need to define custom events in ScenarioManager and then create the spawner that would consume the events?

    Is there a way to load scenario from a text file or do I have to write my own? Sorry if this is obvious but at work I write different kind of things and Unity feels so cumbersome in many ways :)
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @Testeria > You can modify it to read from a text file or anything, yes.
     
    Testeria likes this.
  24. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    158
    @reuno Hi, I'm working on a vertical game, I found that the PlayableCharacter is being parented to the platform it jumped in, I checked the vertical demo and the same happens, but I can't find the code that does that to the Character.

    Is there a special reason to do that? Where in the Engine that is happening? Thanks!
     
  25. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    158
    I think I found the place.... VerticalCharacter.cs CollisionEnter()

    But why? Any special reason?
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
  27. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    158
    Can you explain a little more?
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @esteban16108 > That's what provided the best game feel and reliability at the best cost in terms of resources, I'm not sure what else to say about it, parenting is super simple :) Feel free to do things differently if you prefer, this (just like all the other controllers included in the engine) is just an example of how to use the spawners in your game, you can create your own, that's what the engine is for.
     
  29. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    158
    Oh, please don't get me wrong, yes I extended PlayableCharacter, LevelManager etc... but was surprised on this behaviour, I overrided it no problem.

    When you answered "Performance" I wanted to know how that helps with performance since I'm changing that behavior and could impact performance? Just that, pure curiosity.

    Thanks.
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @esteban16108 > It's gonna be more expensive to try and stick to the platform any differently. Parenting is the cheapest way to do so.
     
  31. Beggarking

    Beggarking

    Joined:
    May 13, 2015
    Posts:
    2
    Hey - I'm having lots of fun playing with this package - great asset. I'm testing out poolable objects in patterns like you have in the Sky Theory demo, where there are multiple platforms and pickable objects that should reactivate on respawn (using that script) - it seems however that sometimes the pickable objects don't fully respawn (example: some have the mmwiggle script attached and when they respawn the script doesn't seemed to be firing) - are you aware of any limits here in unity that could cause that behavior (pattern is too large, to many objects to respawn) that could cause that behavior?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @Beggarking > They do "fully respawn", it's just that scripts will only do what you tell them to do. You can't just take any script and expect it to behave differently on respawn if you don't tell it to do so. MMWiggle does what it's been designed for, it's not supposed to work out of the box with spawners (it's not even part of the InfiniteRunnerEngine namespace). You can easily extend that class to add initialization on respawn if you want to though.
     
  33. Beggarking

    Beggarking

    Joined:
    May 13, 2015
    Posts:
    2
    @reuno > Ah, ok, thanks. I was using the coins in Sky Theory as a template, which have scripts from the tools namespace, and just assumed other scripts there would also work when respawned. Thanks!
     
    reuno likes this.
  34. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    Just want to confirm, the Jumper/PlayableCharacter does not have a system to handle collision with on-coming walls? In my tests the character will move right through a wall while it was grounded. If I happen to time a jump just right so it jumps against a wall then the character will get stuck in it (not fall down or complete a force upward).

    I did set these Wall objects to use the Wall layer.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @Leslie-Young > Yes, it collides with walls. If you think you've found a bug, please use the support form to report it, and provide exact repro steps, thanks.
     
  36. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    Found the problem. The Box Collider's Center must b 0x0x0. I had it at 0x1x0 since the size is 1x2x1. In this case the art is a child of this object so I can simply move that to "fix it" and use a center of 0x0x0.

    The character still gets stuck to a wall though when you jump too late.

    [Edit] I suppose it is more the double jump that can not activate, which is probably fine. If I jump too late but still just in time then character (the test cube at least) manage to roll over at top edge.

    I guess I'm thinking more about wall jump ability really. But that is game design specific and something we will have to decide on and implement after some play testing.
     
    Last edited: Dec 18, 2019
    reuno likes this.
  37. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Can this runner engine handle multiple environment ( theme) which changes with playtime?
    Example during a run for first 2 mins objects from city environment then for next 2 mins Jungle environment objects then after 2 mins objects from some other environment pool.

    Thanks.
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @dev_2051 > Yes, there's nothing preventing you to do that.
     
  39. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Great, now i am heading for the youtube tutorials to familiarize myself with the engine.
     
  40. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    It would be useful if Out of Bounds property (on Poolable Object) could be based on child object Colliders or Renderers too.
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @Leslie-Young > Don't hesitate to submit feature requests via the contact form.
     
  42. bukisan222

    bukisan222

    Joined:
    Jan 29, 2016
    Posts:
    15
    Hi reuno, great great engine.
    I'm following now the video tutorials, created a scene from scratch, created my own sprite and platformer,
    added the basic scripts (like Jumper.cs)
    Went in visual, rebuild the project, and get lots and lots of missing using directly or assembly reference
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @bukisan222 > Please use the support form, and provide a bit more details and context. Without knowing what Unity version you're on, for example, it's quite hard to tell. This looks like a known issue in 2019.3.12f1 though.
     
  44. bukisan222

    bukisan222

    Joined:
    Jan 29, 2016
    Posts:
    15
    Hi reuno. I've installed an older version of unity and seems it works fine.
    Thank you very much !
     
    reuno likes this.
  45. bukisan222

    bukisan222

    Joined:
    Jan 29, 2016
    Posts:
    15
    So, I'm using Unity 2019.2.0f1.

    I've downloaded the demo from appstore and I've seen a difference from the demo application and the scene I've built with Unity for my Android device. demoapp.jpg mydemo.jpg


    If i select full screen on my Player Settings the image will be streched (setting gear icon won't be seen), so I disabled the full screen mode.
    How can I build my game so that the (Full Screen Display) dialogue on the right side appear ?
    I'm using the Unity Android SDK packages from Unity Hub.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @bukisan222 > I don't think this has anything to do with the engine, and I'm not sure I understand what the issue is. That startscreen is built simply using Unity's native UI components, there's nothing specific to the engine here.
     
  47. bukisan222

    bukisan222

    Joined:
    Jan 29, 2016
    Posts:
    15
    Ok, I managed to tweak somehow the settings, built my own menu and it works ok now.
    Great great engine, managed to implement my idea perfectly
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
  49. bukisan222

    bukisan222

    Joined:
    Jan 29, 2016
    Posts:
    15
    Hi @reuno , I'm now digging in to the code to see if this is just a rigidbody configuration, or a misscalculation regarding the doublejump. I've found this test usecase for double jump using the mouse click and also the phone touchscreen:

    Normal double jump as expected:
    Jump while pressing and then jump again while pressing => Two double jumps with maximum height => Test OK.
    Second test:
    First jump a short jump (just a click or a touch) and immediately after that the second jump is a hold/long press jump =>
    The jumper/character skyrockets on Y-Coordinate up.
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,927
    @bukisan222 > I don't reproduce that issue, but if you think this is a bug, and can provide exact repro steps from a fresh install, please do so using the support form, thanks.