Search Unity

[v2.0 soon] Racing Game Starter Kit - Easily create racing games!

Discussion in 'Assets and Asset Store' started by Ian094, Jun 30, 2015.

  1. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    hey how to enable mobile ui controls on android platform i cant find the option
    whenever i select the touch controls in settings and select the track in the game view no mobile UI appear how to enable it on android i am building a game for android platform plz help i have emailed he invoice copy
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    To enable mobile UI, you first need to drag the MobileUI prefab from the Prefabs/UI folder to your canvas.

    Afterwards, set your car's PlayerControl.cs component to either "Automatic" or "Mobile" Input Type.

    Here's a short video on how to setup mobile controls :



    Let me know if you need any more help.

    Thanks.
     
  3. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Randomation support definitely appreciated. Is the point to point race type still planned for the next release? Quite looking forward to it

    Another feature which would be nice is rolling starts. I'm assuming that's not in yet. I suppose additionally, which goes along with point to point race types, chase and rolling starts, is ai observation of lanes over racing lines
     
    Last edited: Jul 15, 2016
    JamesArndt likes this.
  4. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yeah, the point to point race type is still planned for v1.1.0 , it's actually one of my main focuses at the moment.

    Rolling starts would be a nice addition to point to point races. I'll definitely be looking in to that. Thanks for the suggestion.
     
  5. ferrari_due

    ferrari_due

    Joined:
    Dec 16, 2013
    Posts:
    9
    Hi,

    I'm kind of desperate and hope you can reply ASAP; my team have been developing an Android racing game for the past 2 months using your plugin, along with the RCC plugin.

    We are done with the game, it looks awesome but has poor frame rate issues - caused mainly by the raycasts system for the AI.

    We have tried everything to sort this out, the game is highly polished and optimized in every way imaginable.
    Now we are extremely beaten and are about to shelve the game, it simply is too much for an average android phone (tested on Samsung S3 Neo and S5) to handle (14-16 FPS with 3 AI).

    Please let me know if there is something that we can do to fix the raycasts.

    Here is what we have done so far to optimize the game.
    - Low poly models.
    - All textures atlased.
    - Static Batched.
    - Textures Compressed and set to mobile.
    - Tried deleting some of the raycasts, though vehicle was not stable. Then deleted RCC plugin and used your plugins default physics but still the same result.
    - Then out of sheer frustration- simply created some waypoints along the track (using the easy waypoints plugin) and ran the AI, but still low FPS due to the waypoints constantly running an "update" function.

    thanks
     
    Last edited: Jul 16, 2016
  6. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    Thanks for your support.

    This is really strange because I haven't experienced any performance issues with the AI at all (Testing on HTC One(M8)). I roughly get 50 - 60 FPS with 5 AI on the default demo scene.

    Have you checked the Profiler to make sure that it's actually the AI raycasts causing the framerate issues? If so, Try calling the Sensor() function in OpponentControl.cs from FixedUpdate rather than Update. Another thing that could be causing fps issues is the Wheels.cs script if set to "MultipleMaterial" suface detection. I would advise not using this option for mobiles.

    Just a side note, check your UI. Have you got any outline or shadow UI Effects on them. I've noticed this causes frame rate issues.

    I'll be taking a look at the AI script to see what I can do about improving the performance.

    Please check your Profiler and let me know. I hope any of these things mentioned helps.

    Thanks again.
     
    NeoUnity likes this.
  7. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi, I have question: if you add IK controller to v1.1.0 so steering wheel script (which is available in current version) will be no more available? I really like current option, and I worry about IK mobile performance.
     
  8. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    Everything will still be the same. The IK controlled driver will basically use targets on the steering wheel transform where the hands will be placed then IK will handle the rest :)

    I don't think IK will have any impact on mobile performance.
     
  9. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    hey are you going to implement an in app purchase system in near future?
     
  10. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    hey i have a major query that what to do if the player has only 10000$ and we wanted to show the car to be of greater number like 50000$ how do you detect the remaining cash like you have 40000$ less to buy this car
     
  11. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hey,

    Possibly. I think IAP is a feature that can be self integrated using Unity IAP services or various plugins on the asset store.

    To get the value needed to purchase the car, you could subtract the value of the car by the player's currency :
    Code (CSharp):
    1. int cashNeeded = 50000 - 10000;
    2.  
    3. Debug.Log("You need  $" + cashNeeded.ToString("N0") + " more to purchase this car");
     
  12. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    Also why there is a change in lighting when we enter a race and then exit to main menu
     
  13. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    kk i figured it out its because of the lightmap is set to auto
     
  14. ferrari_due

    ferrari_due

    Joined:
    Dec 16, 2013
    Posts:
    9
    Thanks for getting back, in profiler I can see the wheels object is the largest consumer followed by raycasts.
    I also see that the wheels.cs is set to multiple materials. let me sort this out and get back to you.

    Yes, all the shadow UI effects have been removed.
     
  15. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Sorry if i'm getting annoying with my suggestions, but here's another. For the point to point race type, as there is no loop to consider, would it be possible to set the way points at runtime? If the track were to be randomly generated?
     
  16. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I suppose this would work. I'm not quite sure how I would go about setting the waypoints at runtime - I'll have to think that through. But if you have a technique that places the waypoints on a randomly generated track at runtime then all good, you'll only have to assign the waypoint parent to the RaceManager's "pathContainer" var and it should work as normal.
     
  17. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ah yep the waypoints would be provided with the track generation in my mind. If that worked as-is then that would be great. Finally (for now) is there the capacity for custom gravity and doing loop the loops and barrel turns in the track geometry?

    Perhaps if the steering was relative to the orientation of the way points, and gravity an acceleration force towards the track surface normal if not? I don't know if I'm asking too much there
     
  18. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Currently not. I did try doing a loop (the one found in Standard Assets) and with enough speed I managed to get around the loop with ease.
    This is a great way of thinking about it! I think something like this would work perfectly for loops. I'll definitely be looking in to this.
     
  19. Thre3ouls

    Thre3ouls

    Joined:
    Apr 13, 2016
    Posts:
    22
    No problem in loops except for opponents sensor. You must set the loop track collider in the the "ignore raycast" layer otherwise opponent will start breaking at the beginning of the loop and falldown!!!

    I'm working on a racing combat game can you tell me when you are planning to release the multiplayer update?

    Thank You
     
  20. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    haha good point there.

    Multiplayer will be one of my primary focuses after v1.1.0 is submitted. I plan to have v1.1.0 submitted within the next 1½ weeks.

    Thanks.
     
  21. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    hey there ! i wanted to know that how we can activate the motion blur default unity script when we pressed the nitro button and add a little bit of high speed effet
     
  22. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    like amplify motion blur
    how to integrate with your script like
    when i press the nitro button down the amplify motion script should be activated else if the button is released deactivate the amplify motion script attached the screenshots below
    also amplify package has only single script that's attached to the player camera object in the racing game starter kit
    Plz help !
     

    Attached Files:

  23. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    The Car_Controller has a bool called 'usingNitro'. This bool is set to true whenever nitro is being used and set to false when nitro isn't being used.

    You can use this bool to activate / deactivate the amplify motion effects.

    Here's an example :
    Code (CSharp):
    1.     private Car_Controller playerCar;
    2.  
    3.     void Start()
    4.     {
    5.         //Find the player car
    6.         if (GameObject.FindGameObjectWithTag("Player"))
    7.         {
    8.             playerCar = GameObject.FindGameObjectWithTag("Player").GetComponent<Car_Controller>();
    9.         }
    10.     }
    11.  
    12.     void Update()
    13.     {
    14.         if (!playerCar) return;
    15.  
    16.         if (playerCar.usingNitro)
    17.         {
    18.             //activate amplify motion blur here
    19.         }
    20.         else
    21.         {
    22.             //de-activate amplify motion blur here
    23.         }
    24.     }
    25.  
     
    Mayureshete likes this.
  24. Ashutosh456

    Ashutosh456

    Joined:
    May 1, 2015
    Posts:
    8
    worked like charm thank you
    so basically what i did was taken this script and then attached this script to our players car prefabs to every car
    and voila! and also the script code i added was

    AmplifyMotionEffect.Instance.enabled=true;
    AmplifyMotionEffect.Instance.enabled=false;
     
  25. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Awesome. Glad it worked out.

    In future I'll be adding support for more assets such as Amplified Motion, Unistorm, etc.

    Thanks.
     
  26. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    I'm just kind of curious, did you get everything sorted out? I'm using RCCv3 and RGSK with roughly 13 vehicles in an unoptimized scene, each car casting the RGSK rays plus another 4 for ground checks and I'm getting good frame rates. Try disabling RCC's particle emitters.

    @Intense_Gamer94 I vaguely remember in an earlier version of RGSK, there was an option to invert/reverse the order of the waypoints in a path, would it be possible to include that in the next version?
     
  27. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    The WaypointCircuit script still allows you to do this so I don't think that option was ever removed. Talking about waypoints, I've been thinking about a "reverse waypoints" feature that'll make it easier to make reverse tracks.

    With all the new features coming in v1.1.0 there will be some changes made to the waypoints and other aspects of RGSK.
     
  28. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    can you provide screenshots or video of ur game...? played on android phone....
     
  29. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    Here's an editor screenshot, 11 cars, each one has RGSK/RCCv3 scripts and components, plus my ray script(rays aren't showing though) and a handful of other scripts, fps dropped to 20 - 26 or so due to the particles and having 22+ console errors. And the scene isn't optimized either.

    EDIT: I don't have a build for it yet so I haven't tried it on a phone.
     

    Attached Files:

  30. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    ok, with 4 opponents and a player car on a plain scene it gives me 60fps on unity editor no shadows, but on phone the fps drops to 4 to 5 fps.....
     
  31. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Wow, that's really bad.

    Is your scene optimized? Please check the profiler to see what could be causing you low fps. I would also recommend testing on multiple phones - I'm guessing it's a phone related issue.
     
  32. hncuong

    hncuong

    Joined:
    Feb 28, 2016
    Posts:
    5
    Hi

    Can I create a top down 2d car racing game with this kit ?
     
    Last edited: Jul 29, 2016
  33. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    No, the Racing Game Starter Kit only supports 3D racing games. It would be possible to create a top down 3D racing game though.
     
    hncuong likes this.
  34. hncuong

    hncuong

    Joined:
    Feb 28, 2016
    Posts:
    5
  35. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    ok on unity 5.4 and Il2cpp i get 40+ fps on same Android phone on a plain scene 4 ai cars and a player car... il test and revert back with bit of a complex scene....

    Edit, on a fairly complex scene with 8 ai, a player car no shadows i get 25-30 fps...

    I think I am happy with results, donno why the performance was not good on unity 5.3
     
    Last edited: Aug 1, 2016
  36. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    Soo any update on the next version.....? ;)

    m excited about the improved physics and drift race type...
     
  37. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hey,

    The next version is going well. I know v1.1.0 has been delayed but there's a few more things that still need to be done before submitting it.

    I'm looking forward to releasing it very soon.

    Here's the current change-log for v1.1.0 :

     
  38. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi

    *Removed vehicle performance upgrades?!

    Why??
     
  39. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    This is mainly because of certain complications that it caused. Vehicle color and rims options are available. However, for v1.1.0, performance upgrades will be removed. There is a possibility of a new upgrade system in a future version that will have much better functionality than the current one.

    Thanks.
     
    Mayureshete likes this.
  40. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Oh Nooooooooooooooo! :( dont know what the rims options will be available, but performance upgrades is enough good. Please dont remove that script!
     
    Last edited: Aug 9, 2016
  41. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks for including the namespaces. Looking forward to the release.
     
    Ian094 likes this.
  42. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    I read you were planning on adding water physics. Looking forward to testing that.

    Any plans on adding snow physics?
    A simple grey scale height map overlay to indicate the snow depth may work.
    Black is terrain level (no snow or ice), white is max snow depth. Just a thought.
    A springy system to control vehicle bounce based on vehicle weight and snow depth maybe?
    There's not enough snow themed games out there!

    Great racing kit, looking forward to future updates.
     
  43. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    Thanks for your suggestion. Snow physics sounds like a really nice addition to the racing kit, this is probably something i'll be adding sometime in the future. The grey scale height map overlay sounds like it would work out nicely - I'll keep that in mind.

    Lots of other vehicle types will be introduced to the Racing Kit over time so keep your eyes peeled for future updates ;)

    Thanks.
     
  44. electronic-brain

    electronic-brain

    Joined:
    Aug 16, 2015
    Posts:
    1
    Hey.Can u free this asset for indie Dev or Discount!It will be helpful!TIA
     
  45. FlyTroll

    FlyTroll

    Joined:
    Jul 20, 2014
    Posts:
    8
    Hi, how fix this. This happens when i try import Realistic Car Controller
    "Assets/RacingGameStarterKit/Scripts/Vehicle/Input/OpponentControl.cs(10,13): error CS0246: The type or namespace name `RCCCarControllerV2' could not be found. Are you missing a using directive or an assembly reference?"
    Where i can find RCCCarControllerV2 ?
     
  46. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    Would the kit by any chance work with unity 4 or its made in 5 from the ground up?
    Thanks.
     
  47. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    The current version doesn't support RCC v3.

    The next release will have full support for RCC v3.

    Please send me your invoice no. and I'll send you a link to a temporary RCC v3 support package.
     
  48. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    Apparently, the Kit wont work in Unity 4 - mainly because of the vehicle physics.
     
  49. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    That is also a large amount of work to support Unity 4 because you will also have to verify/retest all of the third party integrations (EVP, RCC, Unitycar2.2, Rewired, etc.). Also you will have to do workarounds for all of those Unity 4.x bugs that will not be fixed. Do all of those third party assets still support Unity 4.x? I know Rewired supports Unity 4.x but that is probably an exception to the rule.

    It certainly does seems not seem to be worth the effort especially in light of this.

    http://forum.unity3d.com/threads/unity-version-usage-might-be-useful-for-package-devs.250891/
     
    Ian094 likes this.
  50. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    Thank you!