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

Infinite Runner Starter Pack

Discussion in 'Assets and Asset Store' started by opsive, May 23, 2013.

  1. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    hmm.. No, if you hit the play button in Unity and then hit start button the character should start moving. Does the GUI screen disappear? I just tested the asset store version and the character does move for me (I imported into a brand new project)

    Edit: Also, check to make sure the Player Controller component has forward speeds defined within the character1 prefab (prefabs/characters)
    $player.PNG
     
    Last edited: Aug 14, 2013
  2. NADRAC

    NADRAC

    Joined:
    Aug 12, 2013
    Posts:
    7
    Everything looks good it's just that the player doesn't move at all. It will keep moving forward and the only thing that is stopping the guy is the wall hahaha. I already tried reopening and re-importing but nothing.
     
  3. NADRAC

    NADRAC

    Joined:
    Aug 12, 2013
    Posts:
    7
    Downloaded it again and now it is working, thank you very much.
     
  4. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Great to hear - you scared me for a second :)
     
  5. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109

    Hi Opsive,
    Thanks for the valuable reply. I got something useful on creating the chaser, like translating the enemy on z when the player hits on an obstacle collider, stays on screen for some time interval and translate back to its actual position. When it hits the second collider during this interval will end the run. HELP

    Yes I dont need any height variations. The rigidbody will detect the player is approaching using Vector3.distance and start moving towards him with add force event. HELP

    One new question, I want a straight track with 3 slots with no turns like subway surfer. I believe it can be done using the kit.

    If your next update has both this features, it would be awesome ;) WAITING
     
    Last edited: Aug 14, 2013
  6. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Just to make sure I understand. It sounds like you got the enemy chasing you working correctly? And it sounds like you have the right approach with the moving rigidbody.

    To have a straight track with no turns all you have to do is remove the platforms that are turning platforms from the Infinite Object Manager.
     
  7. cubaschi

    cubaschi

    Joined:
    Oct 23, 2012
    Posts:
    51
    First off, congrats on a very impressive package. Those videos really help to get an impression on what your engine can do.
    Now for my questions.
    We need moving platforms (like the trains in subway surfers) for a project. I guess it would be easy to implement movement of RB platforms, but the speeds and probabilities should be connected and this will be a deeper incision into your code/logic.
    If you are planning on integrating this feature (like you said), what would be a timeline for the next release?

    *bump moving platforms :)

    Cheers,
    Simon
     
  8. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Thanks for your purchase Simon, and I am happy to hear that the videos have been useful.

    Moving obstacles have gotten popular all of a sudden. They are definitely going to be the first thing that I implement in the next update. I wasn't planning on working on that update for another couple of weeks but because moving obstacles have gotten a lot of requests lately I'll try to work on it sooner. I should be able to at least get the code done and have a package with moving cubes.

    Adding moving obstacles would be really easy if it weren't for the height variations and turns. In fact, if you don't care about heights/turns you could just take any obstacle and add a constant force to it. This wouldn't require any coding at all and it would still work with the rest of the logic in the starter pack
     
  9. NADRAC

    NADRAC

    Joined:
    Aug 12, 2013
    Posts:
    7
    Hi Opsive !

    I finally was able to place my own character in the scene, now for some reason sometimes when jumping on the stairs my player sinks to the track half way. I mean I am running on the track , then after a few seconds my player goes down half of his body. It happens randomly but most of the time when I jump from the stairs and coming down.(Any Idea ?)

    Another question: Is there a way to switch around controls easily? I mean I would like to use the arrow buttons to change lines and not to use corners and the mouse.

    Thank you !!
     
    Last edited: Aug 15, 2013
  10. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    For your first question: It sounds like the capsule collider isn't being set properly. When you click on your character check to make sure the bounding box is correct.

    Second question: Currently it is hard coded but you bring up a good point. I should be using the Input Manager. I've attached the new project settings that use the Input Manager. You can then use that to specify whatever values you want. http://docs.unity3d.com/Documentation/Components/class-InputManager.html

    To have the starter pack respond to this change you'll need to update InputController.cs. First, add the following to the top of the file (I placed it on line 25):
    Code (csharp):
    1.  
    2.     public bool moveMouseToChangeSlots = true;
    3.  
    And then the replace
    Code (csharp):
    1.  
    2.  
    3.         if (Input.GetKeyUp(KeyCode.Q)) {
    4.             playerController.changeSlots(false);
    5.         } else if (Input.GetKeyUp(KeyCode.E)) {
    6. ...
    7.  
    With the following:

    Code (csharp):
    1.  
    2.         if (Input.GetButtonUp("LeftSlot")) {
    3.             playerController.changeSlots(false);
    4.         } else if (Input.GetButtonUp("RightSlot")) {
    5.             playerController.changeSlots(true);
    6.         } else if (Input.GetButtonUp("Jump")) {
    7.             playerController.jump();
    8.         } else if (Input.GetButtonUp("Slide")) {
    9.             playerController.slide();
    10.         } else if (Input.GetButtonUp("LeftTurn")) {
    11.             playerController.turn(false, true);
    12.         } else if (Input.GetButtonUp("RightTurn")) {
    13.             playerController.turn(true, true);
    14.         } else if (Input.GetButtonUp("Attack")) {
    15.             playerController.attack();
    16.         }
    17.  
    18.         // Change slots if the player moves their mouse more than mouseXDeltaValue within a specified amount of time
    19.         if (moveMouseToChangeSlots) {
    20.             if (Input.mousePosition.x != mouseStartPosition) {
    21.                 // same code as before
    22.             }
    23.         }
    24.  
    This is all within the Update method. You'll then need to replace InputManager.asset with the file at https://www.dropbox.com/s/2r7mfr9tns43ks6/InputManager.asset. This change will also be in the next update.
     
  11. CoopToons

    CoopToons

    Joined:
    Jul 13, 2013
    Posts:
    7
    Hey Opsive, I have a question about a way to implement something with the current system. If you play games like subway surfers or running with friends, you will notice that the obstacles and coins change. When you go faster the coins arc when you jump is generally longer so it matches the arc of your faster/longer jump.

    I had the idea to use your obstacle/coin - platform restriction and the newer sections options to do this.

    I would have two types of the same scenery and platforms. I would have a fast version and a slow version. I would make it so you start on the slow version and after going through all of the slow platforms, you would have enough speed and would change to the faster ones.

    Example:
    Slow Section 1 transitions to Slow Section 2
    Slow Section 2 transitions to Slow Section 3
    Slow Section 3 transitions to Fast Section 1
    Fast Section 1 transitions to Fast Section 2
    Fast Section 2 transitions to Fast Section 3
    Fast Section 3 transitions to Fast Section 1


    With that, once you get to the fast sections, you would only stay in fast sections.

    What I would like to know is if this would work. I'm not sure, as I have not tested it out and am not positive on how exactly the system works.



    EDIT: If you are still taking suggestions, I would add changing obstacles/coins/etc. based on your speed to the suggestions list.


    Thanks,
    Cooptoons
     
  12. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    I've been following the instructions in the Infinite Runner Starter Pack - Using Your Own Assets video and at 13:58 it says that I must assign my character prefab to the staticData script inputs ( Characters) which is attached to the game object, yet when those inputs of StaticData that appear in the inspector in your video, don't appear for me for some reason. I removed and reset the script several times, still nothing appears expect Powers Ups and DoubleCoin. What could be the problem?
     
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    What you said should definitely work. However, currently there is no way to transition back to a section other than the first one. I will PM you the new files that are needed to add this.

    Thanks for that suggestion, I'll see what it would take to add that.

    That piece of code was added in version 1.2. By any chance did you start with a version before that? Check to make sure StaticData.cs and StaticDataInsepctor.cs are completely up to date.
     
  14. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    I have 1.2. I used the Game (game object) from the main menu scene, and it is working. Thank you for your quick response! :)

    I also keep getting this error:
    NullReferenceException: Object reference not set to an instance of an object
    InfiniteObjectManager.init () (at Assets/Infinite Runner/Scripts/InfiniteGenerator/InfiniteObjectManager.cs:87)
    InfiniteObjectGenerator.Start () (at Assets/Infinite Runner/Scripts/InfiniteGenerator/InfiniteObjectGenerator.cs:63)
     
    Last edited: Aug 18, 2013
  15. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    In the list of objects within the Infinite Object Manager, does every object (platform,scene,obstacle,etc) have a component whose parent class is InfiniteObject assigned to it? For example, does every platform have the PlatformObject component, scene have the SceneObject component, etc? If you can't see anything wrong there I would add the objects back to the Infinite Object Manager one at a time to see what object is causing the problem.
     
  16. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    The coins component wasn't assigned in the infiniteObjectManager inspector, thank you for your help:)
     
  17. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    The coins and obstacles won't spawn for me. Even if I used the prefabs in the prefab folder, instead of the ones that I made. I've followed the tutorial video several times and got it all right, expect this part.
     
    Last edited: Aug 19, 2013
  18. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    The coins and obstacles will only spawn if a platform has indicated that collidable objects can spawn on top of them. When you used all of the prefabs in the prefabs folder, did you use the platform prefabs as well?

    Things to check:
    1. The platform has collidable positions greater than 0 and at least one of these are checked: collidable left spawn, collidable center spawn, collidable right spawn.
    2. The obstacle/coin has an occur appearance probability setup and it's no occur probability isn't 1
    3. The obstacle/coin isn't avoiding any platforms

    That's all that I can think of off the top of my head. If none of this works and you want to PM/email me your project I should be able to tell pretty quickly what the cause is.
     
  19. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    The platform did have a position value less than 0, the obstacles did spawn when I adjusted the value. The coins don't spawn at all and the obstacles stop re-spawning after a while.
    Also the after the jump ends, the character doesn't respond to other things like jumping again, duck and attacking.
     
  20. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    For the obstacles that stop spawning, make sure in the occur appearance probability you don't have the probabilities ending at a specific distance.

    For the oins, how many collidable positions did you set for the platform? If you only set it to one then the coins will never have a chance to spawn. Also double check the appearance probabilities on the coins.

    The jumping issue sounds like you don't have the correct layers setup. Take a look at the readme and ensure you have the same layers. That was the one thing that I forgot to get into in the video.
     
  21. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    I only had one collidable position, so I adjusted that and now the coins spawn, thank you!
    Now i checked the appearance probability for both the coins and obstacles and i took a screen cap of it
    coins:
    $Screen Shot 2013-08-19 at 3.40.31 PM.png

    Osbtacle
    $Screen Shot 2013-08-19 at 3.44.28 PM.png
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    So with those appearance probabilities the coins and obstacles stop spawning at a certain distance? They look like they should work. Also, does the jumping work now?
     
  23. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    Yes, with those appearance probabilities. And the in first video you ever made, you noted the layer thing so I had that covered already and rechecked them and still the jumping doesn't work. This is a screencap of how the player looks like till the end of the game ( after I click jump) it keeps the same look, it only responds to slot changes( something wrong with the animation mayeb? or when it lands after jumping, the colliders get messed up ..?)

    $Screen Shot 2013-08-19 at 4.02.03 PM.png
     
  24. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Do you mind sending me that project? I'd like to take a closer look at why the coins/obstacles stop spawning. support@opsive.com. The jumping issue definitely looks like it is related to layers. That is exactly what it does when the layers aren't setup. Have you set the characters layer to player and the platforms layer to platform?
     
  25. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    I'll send you the project as soon as I finish uploading it to google drive, it's rather big. And to answer your question, yes I have set the player's layer to player and his tag to player and the platform to platform layer.
    Btw you've really been helpful, thank you :)
     
  26. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Happy to help :) I'll just respond directly to your email with what was missing and edit this post later for anybody else who happens to be running into the same problem.

    Edit: I took a look at Hala's project and all that was required was a package update to the latest version, 1.2.2.
     
    Last edited: Aug 19, 2013
  27. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Quick Update:

    I've finished adding the moving obstacles object. The script is derived from ObstacleObject and in the starter pack it will appear as a cannon ball rolling towards you. Here's a screenshot of it in action:

    $moving.PNG

    This screenshot isn't too exciting since you can't tell that it's moving but trust me it is :) Here's what the component looks like so far:

    $script.PNG

    You'll be able to adjust the speed (forward and horizontal), when the obstacle starts moving relative to the squared distance of the player (0 to start moving right after it spawns), a toggle to say if the obstacle should move towards the player, and a toggle to indicate if the object should always look at the player. If anybody wants this version PM or email me your invoice number and I'll send it out tomorrow.

    So far this release contains the following features:
    • Moving Obstacles
    • Added support for the Unity Input Manager
    • Distance Values can loop back to a specific value

    I'd like to get a few more features in before I submit. Any suggestions? I will look at adding support for object spawns based off of the speed of the character instead of the distance. I'd also like to update the GUI.

    Edit: I've received enough suggestions for this version and will be working on releasing those in the next update.
     
    Last edited: Aug 22, 2013
  28. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    Hi Opsive thanks for updating the moving objects feature. It would be a great feature. BTW I have bought the starter kit. I need to add more characters but the kit only allows to add two. How can I increase the character prefab array?

    One more thing is, same powerups is occuring repeatedly. Wat we want is if coin magnet occurs first, the next powerup should be other than this. But here the same powerup repeats.
    I want more coins to be occur. When I hit coin magnet there is no coin appears on screen to collect which results in no use of a powerup. Pls help me to fix these.
     
  29. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Hi Dharma_raj,

    Currently the number of characters is determined by an enumeration. I will fix this to make it more dynamic tonight and send you the latest version.

    For the power ups, they all occur randomly based off of the appearance probabilities and rules. It sounds like you want the power up type to be a sequence of power ups, almost similar to how the forward speed works?

    To increase the amount of coins that appear all you need to do is decrease the probably that the coin won't appear. If you haven't seen this video yet I would recommend taking a look - http://youtu.be/2p_5eLrKgvc

    Edit: I just thought of this: you could attach an appearance rule to the coins to increase the probability when a coin power up has spawned. That way there will always be coins nearby

    Edit2: dynamic character count added and PM sent with the link
    $characters.PNG
     
    Last edited: Aug 24, 2013
  30. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    Hi Opsive, Thanks for the dynamic character count, really appreciate it. Let me work around with the powerup thing with ur thoughts.


    Edit: The run animation speed doesnt get increase while the movement increases.
    AlsoI want Alpha in diffuse curve shader Pls help
     
    Last edited: Aug 26, 2013
  31. sdgogamer

    sdgogamer

    Joined:
    Jul 27, 2013
    Posts:
    7
    Hello Opsive,

    Thanks for creating such an amazing starter pack.
    I've purchased it and have been playing with it for a couple of days. I've read through all of your documentation and all of the posts here in the forum but can't seem to resolve a number of issues. I am simply trying to run your included demo with minimal modifications. I am using the Unity Remote app as a controller to test the swiping. I have pasted the error logs below. The results of which cause the game to either pause or kick me back to the unity interface.

    Also, after exporting to Android, the collision often fails when going up a ramp and the player character falls through the world.

    I'd love to start making my mods to your awesome starter pack. Just trying to move forward with a smoothly running test before I jump in.
    Any help would be greatly appreciated.
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Hi sdgogamer,

    First off, thanks for your purchase. It looks like there are two separate problems here. I think they are both easy to fix.

    The "Leaderboard not found" error is caused by Unity's Social API not finding a leaderboard... Which makes sense because you are on Android and the Social API only supports Game Center. To fix it all you have to do is wrap Social.ReportScore at line 67 of SocialManager.cs within #if UNITY_IPHONE || UNITY_STANDALONE_OSX and #endif. I'm not at my computer right now so I can't copy and paste the code exactly how it should be but if you can't get the error message to go away then I can post the code tonight. Regardless I'll make sure it is included in the next update.

    For the second error, try running on the native device and see if you still get that error. In this case the physics collision detection isn't keeping up with the moving platforms so the character ends up going through the floor. I haven't seen this happen recently so I really think that it is caused by the extra overhead of Unity Remote.
     
    Last edited: Aug 27, 2013
  33. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    I was wondering if there is a possibility for the shader to be like you're coming down a hill (downward curve) instead of a right curve?
     
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Sure, you want to modify the y axis instead of the x. I'll add that option tonight and send it to you.
     
  35. Hala

    Hala

    Joined:
    May 13, 2013
    Posts:
    31
    Thank you, I just did it :D
     
  36. sdgogamer

    sdgogamer

    Joined:
    Jul 27, 2013
    Posts:
    7
    1:56 PM

    Thank you for the quick response, Opsive. The Leaderboard fix worked perfectly. The physics issues remain even in the fully exported version. However, it might be that my tablet is underpowered. What are your suggested requirements for running this on mobile devices?

    Also, I've noted some minor, but consistent audio issues.

    1. The audio stutters when running up or down ramps and the slows down when making a turn.
    2. The audio dips in volume in the left ear when strafing right, and dips in volume in the right ear when strafing left. It's not really detectable when playing through speakers, but, it's disorienting when playing through headphones.

    Other than that, congratulations on earning yet another loyal customer (me) for your Infinite Run Starter pack!
     
    Last edited: Aug 27, 2013
  37. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    I just looked at the starter pack code and I found a more appropriate fix for the leaderboard issue. Change the recordScore and recordAchievement methods to to the following:

    Code (csharp):
    1.  
    2.     public void recordScore(int score)
    3.     {
    4.         if (isUserAuthenticated()) {
    5.             Social.ReportScore(score, string.Format("{0}.score", bundleIdentifier), success => {
    6.                 Debug.Log(string.Format("score {0} reported {1}", score, (success ? "successfully" : "unsuccessfully")));
    7.             });
    8.         }
    9.     }
    10.  
    11.     public void recordAchievement(SocialAchievementID achievement, float progress)
    12.     {
    13.         if (isUserAuthenticated()) {
    14.             Social.ReportProgress(achievementIDtoString(achievement), progress, success => {
    15.                 Debug.Log(string.Format("Achievement {0} recorded {1}", achievement, (success ? "successfully" : "unsuccessfully")));
    16.             });
    17.         }
    18.     }
    19.  
    For the stairs problem:
    I'm curious - what device are you running on? See if any of the following helps:
    1. The stairs down / up platforms have a child game object called "Collider" which has a rigidbody attached to them. That rigidbody has its collision detection set to discrete - change that to continuous and if that works you should try continuous dynamic since that is a little bit more efficient. Make sure you make this change in the prefab so the changes are remembered.
    2. Decrease the fixed timestep from 0.02 to a smaller number. This will cause the CPU to compute the collisions more often but it may work for your case.
    3. If both of those things fail, I'll modify the player controller to send out a raycast to be absolutely certain the player isn't going to go through a collider. If possible I'd like to not have to send out another raycast for performance reasons but this is guarenteed to work.

    For the audio issue:
    Good ears :) I have to be honest by saying that I mute Unity when working on the starter pack just because I've heard that audio way too much. Sure enough though - I tried it with headphones and I could also hear those audio issues. In the audio directory there are 6 different audio files - if you uncheck the "3D sound" option the problem should go away.

    I appreciate it :)
     
  38. sdgogamer

    sdgogamer

    Joined:
    Jul 27, 2013
    Posts:
    7
    Thank you very much for your hard work and the fixes below.

    This code plugged in perfectly and I have not seen a recurrence of the Leaderboard error.


    I'm using a VERY cheap, off brand, 7" Android tablet from a company called Axess, Model # TA2508-7BK.

    Specs are:
    AXESS TA2508-7BK 7" tablet with Android 4.1 Jelly Bean OS
    1.2 GHz Allwinner Cortex A8
    4Gb storage with microSD card slot for up to 32Gb
    512Mb RAM, 16:9 capacitative touch screen

    I bought it simply as a Unity swipe controller and to verify that games push to the devices properly. I wouldn't expect that the Starter Pack should run on something as anemic as this. Subway Surfers claims to run on devices with 512RAM, however, according to reviews, Subway Surfers has very disappointing performance on all budget Android devices with 512 RAM. (I can verify that on my pitiful device as well) So, it might be a factor if one intends to market games produced with the starter kit to the low end of the spectrum, but, not a concern otherwise. I'll leave it to you and wiser folks to decide.



    See above. No need to spend your valuable time chasing this windmill unless there is a need to include "Compatible with 512RAM" on the sales sheet.

    The audio fixes worked perfectly.
    I hope this helps everyone using the starter pack. I have found another issue that was disguised as an android problem. I will create a separate post for clarity.
     
    Last edited: Aug 28, 2013
  39. sdgogamer

    sdgogamer

    Joined:
    Jul 27, 2013
    Posts:
    7
    Hi Opsive,

    I finally tracked this down.

    Android Error:
    NullReferenceException: Object reference not set to an instance of an object
    PlayerController.aboveTurn () (at Assets/Infinite Runner/Scripts/Player/PlayerController.cs:174)
    InputController.Update () (at Assets/Infinite Runner/Scripts/Game/InputController.cs:80)​

    PC Error:

    NullReferenceException: Object reference not set to an instance of an object
    PlayerController.aboveTurn () (at Assets/Infinite Runner/Scripts/Player/PlayerController.cs:174)
    PlayerController.turn (Boolean rightTurn, Boolean fromInputManager) (at Assets/Infinite Runner/Scripts/Player/PlayerController.cs:194)
    InputController.Update () (at Assets/Infinite Runner/Scripts/Game/InputController.cs:108 )

    Errors like the ones above appear when you swipe left or right on any type of ramp. Or, if you hit the left/right arrow keys on a ramp in the PC build. This error occurs in PC as well as Android builds. It occurs with or without the the "Restrict Turns" option checked.

    With the exception of this error, I'm able to play the Infinite Runner Starter Pack demo for an infinite amount of time without so much as a hiccup of unexpected behavior. GREAT JOB!! I'm ready to jump in and start my mods now that I know what has been causing the random pauses. I hope this helps in the debugging effort.
     
    Last edited: Aug 28, 2013
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    I think that I've fixed that in a version that I haven't submitted to the asset store yet. I tried to reproduce it and wasn't able to. I'll send you a PM with a link to the latest version.

    For the problem where the character goes through the stairs, I'll add it as an option where you can use raycasts for your collisions instead of relying on the physics engine. I am currently working on adding projectiles and a curved turn but I'll add it eventually (it probably won't be this version, there is a lot in there already that I'd like to submit).
     
  41. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    I thought that this was pretty cool:

    The Infinite Runner Starter Pack made an appearance in the Unite keynote! You can see it at the bottom of this screenshot:

    $InfiniteRunnerStarterPackUnite.PNG

    The 30 second video that they used is at http://www.youtube.com/watch?v=rSXj2FTTFA4
     
    Last edited: Aug 29, 2013
  42. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    WOW!! Thats great!! Congrats Opsive.

    I want this in the kit, The run animation speed doesnt get increase while the movement increases.
    Also I want Alpha in diffuse curve shader Pls help
     
  43. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    To enable transparency in the diffuse curve shader all you need to do is change:

    Code (csharp):
    1.  
    2. Tags { "RenderType"="Opaque" }
    3.  
    to

    Code (csharp):
    1.  
    2. Tags { "RenderType" = "Transparent" "Queue" = "Transparent" }
    3.  
    Changing the animation speed to go along with the player speed will be an easy fix and I'll make sure it is included in the next update.
     
  44. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    Hi Opsive, Thanks I tried changing the render type to transparent, but it doesnt work. I want to add something like transparent diffuse shader. My environment has many png textures.

    Waiting for the animation speed update.
     
  45. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Sorry about that, I forgot the blend function. Replace that same line with the following two lines:

    Code (csharp):
    1.  
    2.         Tags { "RenderType" = "Transparent" "Queue" = "Transparent" }
    3.         Blend SrcAlpha OneMinusSrcAlpha
    4.  
     
  46. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    Hi opsive, The shader now works perfectly. Thanks!!
     
  47. Dharma_raj

    Dharma_raj

    Joined:
    Jun 21, 2013
    Posts:
    109
    Hi Opsive. Can we do some smoothness to the camera. Like all running games, at the beginning the camera will be in front of the character and after some time it smoothly goes behind the character. Right now the camera becomes a child object as soon as the game starts so that when I tried to apply smooth follow script it looks odd. How can I fix that. HELP

    One more fix: my environment is straight like subway surfers with no turns in it. The problem is when it runs on iPad the performance is bad. Whenever a new section is created the movement got stuck and run
     
    Last edited: Sep 3, 2013
  48. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    That sounds like a good enhancement. Right now I am working on finishing up the current release so I don't think that this will make it into the next version. However, I'll add it to the list and try to get it in the following one. If you want to prevent the camera from becoming a child, you can comment out the lines that have setPlayerAsParent within the GameManager. This will at least give you a temporarily solution to add your own follow script before I add it.

    By any chance, do you obstacles have lots of animations? Somebody else just ran into this issue yesterday and the fix was to just pool the renderers instead of the whole game object. This will fix will be in the next version that I am hoping to be able to submit within the next week or two.
    You can also try to decrease the horizon distance (found on the InfiniteObjectGenerator). This will decrease the amount of distance that the objects spawn in front of the player.
     
  49. sdgogamer

    sdgogamer

    Joined:
    Jul 27, 2013
    Posts:
    7
    Hello again Opsive,

    How do we make the lanes wider? (Or, perhaps I should say the space between lanes) I have imported wider platform objects. I also see references in the code that seem to indicate that the engine scans the sizes of the platform pieces. I've also tried to use the platform size override. None of the above actions seems to change the width of the lanes. Is it possible for me to adjust the width of the lanes?


    I've made monumental progress using your Starter Pack.
    Thanks for your hard work and continued support.
     
    Last edited: Sep 3, 2013
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Take a look at the slot distance attached to the Infinite Object Generator. By default it is set to 2 but if you increase that number it should make the lanes wider

    That's great to hear!