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. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    showing the passedNodes on the inspector did the trick , that solve my lap issue , thanks, on a side note i was wondering what would be the best approach to be able to continue if we can t make the next checkpoint during the race so i can give the player an extra time . make a fonction that check if the player lose and pause the game so we can keep track of the timer lap and give that extra time then resume that game. that make sense? :)
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    That's gotten me so confused :confused:

    Just joking, that makes perfect sense.

    Yeah, there would be quite a few ways to this. One way would be by pausing the game when the timer hits 1 second and have the player press a key to add their time. Preferably, you would add UI instead.

    Dropping this code in the CalculateRaceTimes() else statement in Statistics.cs should do the trick.

    Code (CSharp):
    1. //Must only apply for a checkpoint race and with the Player racer
    2.                 if(lapTimeCounter <= 1 && RaceManager.instance._raceType == RaceManager.RaceType.Checkpoints && gameObject.tag == "Player")
    3.                 {
    4.                         //pause
    5.                         Time.timeScale = 0.0f;
    6.                      
    7.                         //if we hit T key, add our time
    8.                         if(Input.GetKeyDown(KeyCode.T))
    9.                         {
    10.                                 lapTimeCounter += 10; //add 10 seconds
    11.                                 Time.timeScale = 1.0f //rest timeScale
    12.                         }
    13.                 }
     
  3. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    wow that was fast, i ll try that. you re the best dude of the day for me !
     
  4. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    53
  5. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
  6. Ian094

    Ian094

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

    RCC v3 was released a few days ago and I haven't managed to submit a new version with it's support yet.

    However, you can contact me if you want a RCC v3 support package.

    The next version will have support for v3 as well as lot of other cool features.

    Thanks.
     
    Mayureshete likes this.
  7. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    should i pm you my purchase id....?
     
  8. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yeah. Afterwards, I'll send you a link to the .unitypackage.
     
  9. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    sent you a pm..
     
  10. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    BTW talking about multiplayer, when start working on it, will you consider unity, photon or p2p ...?
     
  11. Ian094

    Ian094

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

    I've opted to go with UNET for networked multiplayer because of several reasons.

    I plan to have multiplayer (both networked & splitscreen) integrated after I submit the next version.

    The next version is still a WIP and as I mentioned earlier, it'll have some new cool features. I won't post any of these features here just yet ;)
     
    toto2003 and Mayureshete like this.
  12. mmozeto

    mmozeto

    Joined:
    May 17, 2016
    Posts:
    3
    Hi there!
    Is multiplayer via bluetooth a thing from the past? It seems interesting, but I don't know if someone still use it.

    Thanks!
     
  13. Ian094

    Ian094

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

    I guess it is. I've personally never used Bluetooth to play multiplayer games.

    The only multiplayer types that will be integrated will be Networked & Split-screen. I'm not so sure about Bluetooth.

    Thanks.
     
  14. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    i think its better to go with p2p network over bluetooth, you can play on hotspot lan or wifi direct...
     
  15. mmozeto

    mmozeto

    Joined:
    May 17, 2016
    Posts:
    3
    How hard is to do that?
     
  16. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Bump :) any news about upcoming new version of asset ?
     
  17. Ian094

    Ian094

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

    The next version is still a WIP and should hopefully be live on the asset store within the next 2 weeks. This version has been delayed due to some certain issues but it will definitely be a pretty awesome update.

    Some features to expect are animated driver (using IKs) - this feature will work with all humanoid models. Lots of other features & improvements are also coming in this update. I will post these features here as I get them done.

    Thanks! :)
     
    Mayureshete likes this.
  18. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
  19. Ian094

    Ian094

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

    I haven't tested against 5.3.5 yet but I will before submitting the next version.
     
  20. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hey there, I got this asset some time ago mostly out if interest, to see how it matured, as I had no direct use for if at the time

    One thing I take from the forum thread is that some people are asking for features that shouldn't be in the scope of your asset and you shouldn't have to spend time implementing them as you are developing a tool, you shouldn't feel like you are writing people's games for them. Examples like car selection and upgrade systems do seem a bit frivolous when there are more salient features for a racing kit

    Well, that said, I'd love to see you take a look at point to point/non looping races, this could open it up in such a great way, especially to lovers of games like burnout or outrun or a selection of nfs games. If you could place markers at edit time that had enough information then maybe it could be possible to create races a bit more dynamically? Like during playtime or even user designed.

    Finally AI behaviour that could be more directed towards aggressive chasing or evading would open a load more opportunities for users of your asset

    These are just ideas that I figured could create a lot of appeal to people looking for racing/driving unity assets as they cover a large amount of popular 'car game' game play out there

    Also, the water racing idea is a really good one, again I don't know if I'd use it myself but it is a great idea
     
  21. Ian094

    Ian094

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

    True, features such as track/car selection, upgrades, etc were mainly added because of the requests from users of the kit. After implementing these features, I thought why not continue to make them better and that's what I'm working towards. Having a ready menu system for your racing game is always a good thing, right? :)

    Point to point races have been on my mind and I hopefully want to have them up in the next version. I'm not entirely sure about the ability to create races during runtime at the moment but that's something i'll look in to.

    Yes! That's a great point. AI behavior has been something that I've been working on over the last couple of weeks. I've noticed that manually tweaking the behavior values can be a bit inconvenient & slow so I want to include preset difficulty levels such as "Easy", "Normal", "Hard", "Alien" etc. Again, I hope to have this up in the next version.

    Water racing will definitely be one of the cooler features the racing kit, I'm looking forward to releasing it.

    Thanks.
     
  22. xjuice

    xjuice

    Joined:
    Sep 19, 2015
    Posts:
    10
    Hello, thanks for your great work.
    your car physic, with the right setting, works very well with my off-road game.

    I have a little note about the reverse gear, it is slow. I try increasing the value of "SpeedLimit" in "Car_controller" script, things do not improve, the car has excessive inertia and employs several meters to stop and start again.
    I tried to change the script but I did not succeed.
    I think it is necessary to brake the car dramatically and then set off in forward gear or allow the forward thrust while the car is still moving in reverse.

    My game is off-road and I need to simulate a very marked brake torque
    I fixed a problem with excessive inertia forward by entering the "brakeTorque" value in the section "// Decelerate" in the "Car_controller" script. it works very well.

    I came up with another problem I could not solve, the skid particle does not appear when the wheel is locked by the brake and even during a standing start.

    I apologize for the bad English that google has helped me to produce.
    Thanks for your help.
     
  23. Ian094

    Ian094

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

    Thanks for your support.

    To increase the reverse speed limit, open Car_Controller.cs and on line 258 change the 25 value with a value of your choice :
    Code (CSharp):
    1. if (brakeInput > 0 && velocityDir.z <= 0.01f)
    2. {
    3.    reversing = true;
    4.    speedLimit = 25.0f; // change this value
    5. }
    I'll be sure to include this as a public var for easier access in future.

    To do this, you would have to tweak the Wheels.cs script. Open Wheels.cs and on line 225 add the following to the if() statement "|| _wc.rpm > 10 && _wc.brakeTorque > 1000" :
    Code (CSharp):
    1. if (_wc.GetGroundHit(out wheelHit) && Mathf.Abs(wheelHit.sidewaysSlip) >= surfaceTypes[i].sidewaySlipLimit || _wc.GetGroundHit(out wheelHit) && Mathf.Abs(wheelHit.sidewaysSlip) >= surfaceTypes[i].forwardSlipLimit || _wc.rpm > 10 && _wc.brakeTorque > 1000)
    2.  
    For non surface detection, you'll need to add edit line 170 as well by doing the same thing:
    Code (CSharp):
    1. if (_wc.GetGroundHit(out wheelHit) && Mathf.Abs(wheelHit.sidewaysSlip) >= sidewaySlipLimit || _wc.GetGroundHit(out wheelHit) && Mathf.Abs(wheelHit.sidewaysSlip) >= forwardSlipLimit || _wc.rpm > 10 && _wc.brakeTorque > 1000)
    This will ensure that when the brakes are locked, skid particles will appear.

    I hope this helps.

    haha no worries.

    Thanks.
     
    Last edited: Jun 4, 2016
  24. xjuice

    xjuice

    Joined:
    Sep 19, 2015
    Posts:
    10
    I did it but I can't stop the car, in revers mode brake don't work
     
  25. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Brake input only applies for when the car is accelerating. The car is controlled by 2 inputs - motor input & brake input. Motor input handles acceleration & brake input handles both braking & reversing. I understand that the default vehicle physics may be limiting but I'm working on really improving it over the next few months.
     
  26. xjuice

    xjuice

    Joined:
    Sep 19, 2015
    Posts:
    10
    I solved it by myself
    This increases the reactivity in reverse and restart
    I'm not a programmer, maybe there is a better way, but it works well.

    Code (CSharp):
    1.     //Boost
    2.         if(currentSpeed < speedLimit && motorInput > 0){
    3.             rigid.AddForce(transform.forward * boost);
    4.         }
    5.         //test
    6.         velocityDir = transform.InverseTransformDirection(rigid.velocity);
    7.  
    8.         if(motorInput > 0  && velocityDir.z <= 0.01f){
    9.             rigid.AddForce(transform.forward * boost*10);
    10.         }
    11.         if(currentSpeed < speedLimit && brakeInput > 0){
    12.             rigid.AddForce(transform.forward * -boost*2);
     
    JamesArndt and Ian094 like this.
  27. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Just purchased the kit this morning. Hoping this will work for karting-like physics, which I'm sure I can tweak to get it there. Also wondering, has anyone converted the UI stuff to NGUI or used NGUI with the kit at all?
     
  28. Ian094

    Ian094

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

    Thanks for your support.

    I've included a section in the documentation covering custom vehicle physics. Let me know if you need any additional help on that.

    Not me. I suppose a few people have though.
     
    JamesArndt likes this.
  29. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Thanks. No sweat, I'll be able to tweak it till it's where I like it. Congrats on making such a great product for Unity.
     
    Ian094 likes this.
  30. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Thanks! :)

    It's going to get much better with each update.
     
    JamesArndt likes this.
  31. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I've imported NGUI and Racing Game Starter Kit into an empty project and I get this error: "
    Assets/RacingGameStarterKit/Scripts/Race/Others/UIButton.cs(6,14): error CS0101: The namespace `global::' already contains a definition for `UIButton'"

    I believe it's because NGUI has a class named "UIButton.cs".
     
  32. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    @Intense_Gamer94, recently checked the asset out and it looks good so far. It seems straightforward, the manual is clear, and it's nice to see you've even got several tutorial videos.

    Also, big bonus points for Rewired and Edy's Vehicle Physics integration.

    I did have some suggestions:

    * Page numbers in the manual would be helpful. :)
    * Difficulty levels for the AI seems like an important feature.
    * Some sort of adjustable "rubber banding" is important for arcade style racing where you don't want the player to be able to get too far ahead, or more importantly, the AI to get too far ahead.


    And a question for anyone in the thread:

    * Any suggestions for available car models that include detailed interiors? I picked up a $5 one on the asset store that had a full interior, but it's probably too low poly / low res to use in a PC game. It's a Ferrari-style car: https://www.assetstore.unity3d.com/en/#!/content/31587 Something like that with about 3x the detail would be nice.
     
  33. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yes, sorry about that. I didn't notice how important namespaces were! I've included an RGSK namespace for all related scripts in the upcoming version. I think renaming the UIButton.cs script included in the racing game starter kit would be the best solution here - this would mean making some reference tweaks to PlayerControl.cs however.

    Thanks very much. I'm glad to hear that you like it so far.

    Yes they would. Thanks for pointing that out. Clicking on the section in the table of contents is a quick way to navigate through the 50+ pages.

    It definitely is and is a work in progress. I touched on this on post 357. AI will be greatly improved over the next versions.

    Funny you mention this because I was thinking of a feature just like this. Similar to the 'catch up' feature in some racing games - slow down the top speed and acceleration of the vehicles in the lead.

    I would suggest looking at GameReady3D.

    Thanks.
     
  34. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    60
    Sorry if I missed it somewhere, but I am interested in this asset for a twin stick controls type game. Would it be hard to implement the physics from this game to a different control scheme?

    Also, is there a handbrake? I'm interested in having a drifting dynamic as well.
     
  35. Ian094

    Ian094

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

    Yeah, any form of input would be possible so long as Unity supports it. The script that handles input is PlayerControl.cs so all input changes would have to be made there.

    Handbrake isn't included in the current vehicle physics. Adding handbrake input wouldn't be hard - I can help you on that. Feel free to contact me.

    The Drift Race Type is a feature that I've been working on and hope to have it integrated soon. The main aim of this race type will be to get a certain level of drift points within a number of laps - penalties included. This means that the overall vehicle physics will be greatly improved :)

    Thanks.
     
    Mayureshete likes this.
  36. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    will eagerly wait for these updates. cause i was thinking to get it done myself now I can work on my some other things thank you.. :)
     
    Ian094 likes this.
  37. molegato

    molegato

    Joined:
    Sep 20, 2012
    Posts:
    5
    Just wanted to suggest a couple of features.
    First one is forks in the waypoints, so there can be shortcuts and the AI chooses a path each time.
    Second one is an arcade-style vehicle physics type. I know it can be made and integrated with relative ease (I more-or-less managed to in a couple hours of work) but having a baseline one would be very much welcomed.

    Thanks for your hard work!
     
    JamesArndt likes this.
  38. Ian094

    Ian094

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

    Thanks for your support & suggestions!

    Shortcuts are a nice suggestion. I've thought about this and will work on it eventually.

    Vehicle physics are something I'm working on improving & diversify - arcade styled physics and realistic physics will be included aswell as support for other cool vehicle physics assets such as Randomation.
     
    Mayureshete and molegato like this.
  39. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    so next update will have improved vehicle physics and drift race mechanics...

    so any estimated timeline we will get next update...?

    just asking cause m getting curious about it.. :D
     
  40. Ian094

    Ian094

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

    Yes, the next update will have improved vehicle physics & drift mechanics :)

    I can't give an exact date of when this next update will be live mainly because there's quite a lot of improvements to make and new features to implement but I know it'll be worth the wait.

    Thanks.
     
  41. Treacle-Games

    Treacle-Games

    Joined:
    Aug 24, 2015
    Posts:
    23
    Hey
    I was just wondering if you have any update on how the next release is coming on. Sorry to put pressure on you but I can't wait to try out the new online and Network features
    Thanks
    Mark
     
  42. Ian094

    Ian094

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

    No worries.

    So far there's some nice features in such as an IK controlled driver that'll work with any humanoid character, Drift race type & mechanics, improved vehicle physics, support for starting grids, xbox controller support and LOTS of other improvements.

    There's still some features that I need to get done before submitting this version such as point to point race types, water based vehicles , ways to manage RaceUI on different race types and more.

    The next version should be up within the next couple of weeks. Please note that online & network features will most probably not be included in the next release. Multiplayer will be added once I get most of things mentioned above done.

    Thanks.
     
  43. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Can you repost what you have coming in your next RGSK release? I recall you posted more in the "new forums" before we thankfully reverted back to the old forums.
     
    Last edited: Jul 12, 2016
  44. Ian094

    Ian094

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

    Here's quick update on v1.1.0 and some of the things to expect :

    Drift Race Type - this race type works like that seen in games like Car X Drift Racing, Real Drift or Drift Max.

    AI Difficulty - There are now 3 AI difficulty levels aswell as a "Custom" level to make your own tweaks. The AI have been greatly improved and will be able to perform overtakes and will be much more competetive.

    New Replay System - The new replay system is much better than the last. It records both input & vehicle positions meaning that you'll get all the fancy stuff in replays now such as sounds, particles etc

    IK controlled Race Driver - This feature is pretty straightforward and will work with any humanoid model.

    Camera Manager - This mainly helps manage race cameras (StartingGrid, Racing & Replay) better. Cameras have also been improved.

    Xbox Controller Support - Simply plug in your controller and you're ready to go. Key & Button bindings have also been added to PlayerControl.cs for easier input management.

    Improved Menu Template - The menu template will offer more features such as purchasing colors, prompts, rotational camera, new look and more.

    Lots of other improvements & changes have been made.

    Things that are still a WIP are the Sprint race type and water based vehicles which I hope to get done soon.

    I'm pretty excited to finalize this version.

    Thank goodness we've got the old forums back. The "new forums" were, to be honest, terrible.
     
    Last edited: Jul 12, 2016
    NeoUnity, Mayureshete and JamesArndt like this.
  45. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Awesome to hear about all of the new features! I didn't notice how nice and tidy the forums were until you mentioned it, feels great to have the nice readable forum back.
     
  46. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    hey,
    also can we make ai car to chase player car.....?
    I m trying but its not happening.
     
  47. Ian094

    Ian094

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

    Chase AI haven't been implemented yet. This is a feature I've talked about before and plan to work on it sometime in future. Chase AI in RGSK will mainly be used to make race types like in Need For Speed : Hot Pursuit where the aim of the Chase AI will be to wreck your vehicle.

    To add Chase AI yourself, you would need to either tweak the OpponentControl.cs or create a new script with chase logic. This AI wouldn't need to have Statistics.cs or ProgressTracker.cs attached because it wont be part of the race. Give it chase logic, spawn it in somewhere, set the player as the target and you'll have AI chasing the player.

    Thanks.
     
  48. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I haven't tried this but RCC has an AI that might be good for a chase, im imagining you could set the player car as a waypoint for the chase AI to travel to. As RCC is implemented in this then vehicle physics could be consistent
     
  49. Ian094

    Ian094

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

    Yeah, I guess this would work well for RCC users. I haven't really dug into the RCC AI, all I know is that they use NavMesh to navigate.

    Randomation Vehicle Physics has chase AI that works great. It's quite a shame that it's not available on the Asset Store anymore. I will be adding support for it regardless since lots of people purchased it in its time and still use it.

    Thanks.
     
  50. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    yes, RCC has it, but on mobile its giving me very low fps, on plain scene, with tri count at max 10k and 4 AI...

    I have contacted him on this issue too..
    hope i find some help.....

    just want to try every available options