Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

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

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

  1. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Thanks, the replay system will have sounds soon. That will mean recording sound volumes & pitches too. I was thinking of recording vehicle inputs and then playing them back for the replay but I'm not so sure how that will work out. I'll give it a shot though.

    Free roam scene would be nice. It's actually pretty easy to add to the MenuManager. Simply add a new function that loads your free roam scene :
    Code (CSharp):
    1. public void LoadFreeRoam(){
    2. SceneManagr.LoadScene("FreeRoam");
    3. }
    Then link that function to a UI button.
     
  2. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,463
    Recording inputs is an interesting problem. What happens when someone is using an alternative input system (e.g. Rewired) in that case?
     
  3. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Good point. Then I suppose recording positions, rotations, sounds etc is the best approach to a replay system.

    Edit : Actually, it can work because I'll be recording the inputs passed into the vehicle controllers (i.e MotorInput, SteerInput & BrakeInput values). :)

    I'll give this a shot sometime soon.

    Thanks.
     
    Mayureshete likes this.
  4. wolfy2

    wolfy2

    Joined:
    Nov 2, 2015
    Posts:
    12
    Could You write a list of scripts whitch been tweked with 1.0.8?
    I made lots of changes to the asset and dont want to unintentionelly loose them :).
     
    Ian094 likes this.
  5. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Okay, I didn't keep track but these should be all of them

    - RaceManager
    - Race UI
    - Statistics
    - PlayerControl
    - OpponentControl

    Ideally, you should back up your project before updating.

    Thanks.
     
    wolfy2 likes this.
  6. chrisabranch

    chrisabranch

    Joined:
    Aug 15, 2014
    Posts:
    104
    I want to add a chase race type, what lines of code would i need to add for that?
    i see one change i need to do in :
    menumanager.cs public void addracetype, is there anywere els?
     
  7. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    You'll need to add the race type in RaceManager race type enum :
    Code (CSharp):
    1. public enum RaceType{Circuit, LapKnockout, TimeTrial, SpeedTrap, Checkpoints,Chase}
    That's pretty much it.
     
  8. chrisabranch

    chrisabranch

    Joined:
    Aug 15, 2014
    Posts:
    104
    thank you, great update
     
    Ian094 likes this.
  9. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,463
    That will be nice.

    Have you tried having both motorbikes and racing cars in the same race? It would be interesting to allow the user to pick from either bike or racing car from a list of vehicles.

    In the long term (if you add local multi-player option) it would be cool to be able to race a car vs a motorbike.
     
  10. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Yes, I've tried both cars & motorbikes in the same race and I think it's really cool.

    Both motorbike AI & car AI mix in really well :)
     
  11. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    When I add Image effects to player camera, the minimap dissapears.... can only see car dots on minimap no track visible..

    Edit sry working now, it was my fault...

    also a suggestion, 2 more mobile control options. Tilt control with auto throttle and touch control with auto throttle.
     
    Last edited: Feb 6, 2016
  12. Ian094

    Ian094

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

    Sure, I'll look into this and most probably add it to the next version.

    Thanks.
     
    Mayureshete likes this.
  13. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,463
    Thanks.

    Unity 5.3.1 (64-bit) Windows on Windows 8.1 Pro platform and when importing v1.0.8 the following warnings appear.

    ImportFBX Warnings:
    Can't import tangents and binormals, because mesh 'Steering' doesn't have it.
    Can't import tangents and binormals, because mesh 'Spoiler' doesn't have it.
    Can't import tangents and binormals, because mesh 'Windows' doesn't have it.
    Can't import tangents and binormals, because mesh 'TireRR' doesn't have it.
    Can't import tangents and binormals, because mesh 'TireRL' doesn't have it.
    Can't import tangents and binormals, because mesh 'Body' doesn't have it.
    Can't import tangents and binormals, because mesh 'TireFL' doesn't have it.
    Can't import tangents and binormals, because mesh 'TireFR' doesn't have it.

    Is this expected?
     
  14. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Yeah, those warnings are expected and can be ignored.

    They have something to do with the F1 car meshes.
     
  15. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    151
    Is there any way to disconnect the first node from the last node in the paths? I'm trying to create races without laps / time limits but its really messing up the AI / wrong way detection.
     
  16. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    No, apparently, that's not possible.

    You can achieve this by simply disabling the Finish Line trigger and removing any lap / time UI texts.

    I hope this helps.
     
  17. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    151
    Yeah, the issue is the path though. The line that connects the first and last node intersects with it, setting off the wrong way detection and causing the AI to drive in circles at the beginning, then they go on the path and once they get to the last node, finish line or not, they drive in circles again and follow that line back to the start. Maybe a new race type to consider for the next update?

    Anyway, the new update is really good, thanks.
     
  18. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Any information about next version of the asset and possible - upgrade system in the package?
     
  19. Ian094

    Ian094

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

    The next version is a work in progress and will include some more nice features. Some features may include :
    - Player rank system
    - Save & Load ghost car data
    - A new vehicle type ;)

    What else would you like to see apart from an upgrade system?

    Thanks.
     
    Mayureshete likes this.
  20. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    Dnt forget this for mobile controls.. Tilt control with auto throttle and touch control with auto throttle.

    Also may be Sprint race type is missing....
     
    Last edited: Feb 16, 2016
  21. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    53
    Hi, have you ever test this asset for an online mode? With something like Photon or the Unity Networking API? Thanks a lot for your answer!
     
  22. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Hi, multiplayer support is in the plans and will definitely be included in a future version. Currently, the kit only supports single-player but will soon support both networked & split-screen multiplayer.

    Thanks.
     
  23. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    13
    Hi guys.
    Anyone know, how to make tournaments in test menu?
     
    Last edited: Feb 28, 2016
  24. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    I have a question, Edy's Vehicle Physics or Realistic Car controller which one is better. im targeting for android platform...
     
  25. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    874
    Ello Intense! Thank you again for your really awesome pack.

    I'd like to be able to use separate triggers for the start and finish lines, rather than the current single finish line trigger. Separating the start and finish would mean I can make tracks that aren't in a loop.. good for hillclimb etc.

    Also, is there a simple way to reverse the track waypoints so that it would be easy to make a reverse version of a track?

    Keep on rockin'!
     
    JamesArndt likes this.
  26. Ian094

    Ian094

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

    It really depends on which one you prefer - try out the demos and go with whichever you like. The performance is great on both.

    Hey,

    To use separate triggers for start & finish, you'd need to make some minor tweaks to the statistics.cs component.
    In the OnTriggerEnter function , you'll basically need to call RaceManager's StartRace() function
    Code (CSharp):
    1. if(other.tag == "StartLine"){
    2.    RaceManager.instance.StartRace();
    3. }
    The FinishLine trigger code can remain the same since the NewLap() function will call the FinishRace() function - just ensure that it's a 1 lap race.

    I'm working on adding a Sprint race type to make this easier. I'm also working on an Elimination race type for v1.0.9 :)

    Reversing the track waypoints would mean re-creating the entire path. I think flipping the rotation will work but haven't tested it yet.

    I hope this helps.

    Thanks for your support.
     
    Mayureshete likes this.
  27. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    13
    Intense gamer94. Do you planning make tournaments in demo-menu?
     
  28. Ian094

    Ian094

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

    Yeah, Tournament mode as well as Rally mode are in the plans :)
     
    Mayureshete and androleocez like this.
  29. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    so can we get a list of features that you have planned for next update...?
     
  30. Ian094

    Ian094

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

    Some features to expect in v1.0.9 are :

    • Sprint & Elimination race type
    • Support for Rewired input
    • A new vehicle type - water based vehicles
    • and more!

    I'll keep everyone updated here.

    Thanks.
     
    Mayureshete likes this.
  31. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,463
    Those are great features. Can't wait for the next release.
     
    Ian094 likes this.
  32. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    874
    Intense_Gamer_49, thanks for the info on making a separate start/finish line. Works great! :)
     
    JamesArndt and Ian094 like this.
  33. egem2015

    egem2015

    Joined:
    Oct 27, 2015
    Posts:
    54
    Hi Ian

    I had a problem.

    can you help me?

    Please add a player vehicle!

    UnityEngine.Debug:LogError(Object)
    RaceManager:SpawnRacers() (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceManager.cs:120)
    RaceManager:InitializeRace() (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceManager.cs:113)
    RaceManager:Start() (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceManager.cs:89)

    i have created playercar in folder PlayerVehicles and they had tag "Player" .

    what may the problem be?

    thanks in advance.
     
  34. Ian094

    Ian094

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

    If you are loading a player car from the menu manager, make sure that the car's resource name matches the name of the car in the Resources folder. Also, make sure that you have an active data loader in your race scene.

    This should fix it :)

    Thanks.
     
  35. dennis1980

    dennis1980

    Joined:
    Jun 13, 2013
    Posts:
    16
    Hello, they can help. I use rcc, my car ai start after loading the scene before is coundouwn expired.
     
  36. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    216
    the demo include EVP support?
    or the pro source version include others physics engine support?
     
  37. Ian094

    Ian094

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

    Set "CanBeControllable" to false in your car's "RCCCarControllerV2" component in the inspector.

    Hey,

    I haven't uploaded an EVP, RCC or Unitycar demo but I plan to do soon. The kit does support these physics packages though.
     
  38. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    13
    Wow. I open map from Demo\Scenes\Standart\Race
    Press Play and have this meessage in console

    NullReferenceException: Object reference not set to an instance of an object
    RaceUI.DefaultUI () (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceUI.cs:160)
    RaceUI.UpdateUI () (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceUI.cs:128)
    RaceUI.Update () (at Assets/RacingGameStarterKit/Scripts/Race/System/RaceUI.cs:118)
     
  39. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Does your player car have the "Player" tag?
     
  40. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    13
    Yes.
    But, this bug happens with default map and cars.

    I create new project in Unity. Load Racing game starter kit from Unity Store. Open map from Demo\Scenes\Standart\Race and have this message.

    BikeRace and F1Race work correctly.
     
  41. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Thanks for letting me know, I'll look in to it.
     
  42. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Hey everyone,

    Elimination race type as well as a few other cool features have been added to v1.0.9

    Next focuses will be on water based vehicles and general improvements to the kit.
     
    Mayureshete likes this.
  43. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I don't know if i missed it but do you allow or do you plan to allow for dynamic waypoint generation? So tracks can be set up at runtime
     
  44. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Never thought of it but I'll keep this in mind.

    I've been thinking of simplifying the way point setup for v1.0.9 by adding features like click to place a waypoint and automatically aligning the waypoint to the race track.
     
  45. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ive been very much into procedural generation of late and the problem with that is it can be hard to get race-type things going on - if you could provide an API for setting waypoints and initial positions after the 'track' is generated that could open a bunch of possibilities.
     
  46. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    13
    Hi!
    I placed my custom vehicles into RaceManager in AI racers and in game they repeat my actions. Why? :)
     
  47. Ian094

    Ian094

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

    This is probably because your Ai racers have the PlayerControl.cs script attached.

    Please check and let me know.

    Thanks.
     
  48. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Hey everyone,

    v1.0.9 is going great and should hopefully be submitted for review sometime next week.

    There's plenty of cool features that have been added so far :)
     
    androleocez and Mayureshete like this.
  49. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    510
    hello, i was wondering if it s possible to use the standard unity car AI on this asset instead the existing one, as it s possible to use different asset car physics with it. i really like your asset but having my own AI would be a big plus for me. also display the first three names of the cars that are in front of the driver car instead of one name, would it be possible?

    thanks
     
  50. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,489
    Hello,

    Yeah, it's possible to use the Standard Ai. The main tweaks will be the references to "Car_Controller.cs" and "PlayerControl.cs" made from RaceManager.cs & OpponentControl.cs. In the documentation, there is a "Using your own vehicle physics " section, this section goes through these tweaks. Let me know if you need any help.

    The RacerName.cs component has a bool "Only Show Rank Ahead". Un-checking this bool will show all the racer's names that are ahead.
     
unityunity