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

► Racing Game Template ◄

Discussion in 'Assets and Asset Store' started by Stephen_O, Sep 9, 2015.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.06 submitted
    • Integrated Unity Rewarded Video Ads; configure currency reward amount and cooldown timer. Unity Ads are available for Android and IOS.
    • Improved RGT Settings Editor Window; selected variable properties are properly released when changing menu pages in the window.
    • General optimizations focused on performance improvements, primarily for mobile.
    • Sensor performance improvements, added Update Interval.
    • Mini Map Render Texture performance setting improvements, general adjustments to be more optimized.
    • Menu Scene, general adjustments to be more optimized.
    • Mobile Controller: Fixed Nitro Acceleration, when pressing UI nitro button this would reset acceleration input causing the player car to slow down until the UI accelerator was re-pressed after releasing nitro.
    • Mobile Controller: Fixed a bug that would sometimes prevent the UI Steering Buttons from functioning properly.
    • Added reflection probe to player vehicle prefabs, disabled by default.
     
    Alex_V likes this.
  2. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    New tutorial series coming soon; It will cover many customization options and the steps I took to make the race scene from this video using the template, a F1 style car model and a pack of race tracks from the asset store.
     
    Last edited: Nov 17, 2019
  3. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.06 is now available.
     
  4. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    The first of the new tutorials is now available.

    This video will cover creating a unique race track environment and adjusting the waypoints to match the track. I also cover renaming the race scene and adjusting the Garage Menu for the new race. You can follow along using your own environment and track or use the same pack i'm using, the track pack I'm using is linked below.

    Track Asset: https://www.assetstore.unity3d.com/en/#!/content/58993
     
    Last edited: Nov 17, 2019
  5. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Second tutorial now available.

    This video will cover modifying a player vehicle prefab to use a different car model, IK driver configuration is also covered. If you'd like to use the same model I'm using the link is below, however it's trivial to use the model of your choice.

    Vehicle Asset: https://www.assetstore.unity3d.com/en/#!/content/19613
     
    Last edited: Nov 17, 2019
  6. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Third tutorial now available.

    This video will cover enabling the Unity Multiplayer Service as well as adjusting the material references for proper syncing.
     
    Last edited: Nov 17, 2019
  7. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I installed the latest in a fresh project and I am getting lots of this:

    NullReferenceException: Object reference not set to an instance of an object
    UnityStandardAssets.Vehicles.Car.CarAudio.Update () (at Assets/Standard Assets/Vehicles/Car/Scripts/CarAudio.cs:137)

    The main camera also seems to be missing.
     
  8. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've been building the last few tutorial videos in this version and have not experienced any errors. I also imported from asset store into a fresh project and I'm able to run the scenes without error on 5.3.5 .

    Try to delete the project and make another new project, if you continue to experience errors can you message me the steps you take to encounter the error so I can recreate it on my end.
     
  9. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    It happens when I load 0Circuit Hills.scene, not if I go through the garage, but it is very tedious to develop this way, I just want to start the race straight away without the garage, can you let me know what I need to assign to be able to do this ?

    Edit - it seems to work now just need to run the garage once!.
     
  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    This is happening because a flag has not been set for the player prefabs to determine if you're in single or multiplayer mode of play. The type of scene a player selects from the garage sets this flag, multiplayer scenes would set the MULTIPLAYER flag, while single player scenes set the SINGLE PLAYER flag, some of the prefab scrips will only work in one mode or the other.

    You can default this flag to SINGLE PLAYER and avoid this error by editing the RG_NetPlayer.cs script on line 31 to read:
    Code (CSharp):
    1. gameMode = PlayerPrefs.GetString ("Game Mode", "SINGLE PLAYER");
    You can also select the type of scene you will be working in once from the garage, in this case it would be loading the single player circuit hills race scene from the garage once to set this flag, if you load a multiplayer scene the flag will change back to MULTIPLAYER.

    I can look into adding an editor window switch to do this without requiring the garage scene to switch between the two modes.
     
    radiantboy likes this.
  11. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.061 submitted

    • Added AI body material field to RGT editor window
    • Added AI body color field to RGT editor window
    • Adjusted calculate racer position logic to be more accurate
    • Adjusted join network match logic to fix a bug that would not spawn the proper vehicle in multiplayer games.
     
  12. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.061 is now available.
     
  13. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.062 submitted
    • Removed WaypointProgressTracker.cs moved logic to RG_AIHelper.cs
    • Removed CarAIControl.cs moved logic to RG_AIHelper.cs
    • Edited RG_SceneManager.cs removed/edited references to WaypointProgressTracker.cs and CarAIControl.cs
    • Optimized race track environment, removed unused textures / materials
    • Added loading UI object to all scenes, hides scene while scripts are loading data on scene startup
    • Improved end of race player AI logic, added AI Sensors to player prefabs
     
  14. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.062 is now available.
     
  15. FlyTroll

    FlyTroll

    Joined:
    Jul 20, 2014
    Posts:
    8
    Hello, where in code you spawn MiniMapCamera. ? I can't find this prefab in project( Thanks
     
  16. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hi.

    The minimap camera is attached to the player car prefabs, it's detached in the start method of the FollowTarget.cs script that is on the minimap camera when the car is spawned into a scene.
     
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    New Dev Log #20 New Track & Improved Car Controller

    In this update I added a new race track, improved the nitro effect by adding dynamic visual feedback, adjusted interior helmet camera positioning. I also created masks for the sideview mirrors, this will be finalized with proper render textures soon.
     
    Last edited: Jan 15, 2019
  18. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.063 is nearly complete, here's a list of most of the changes I've made so far. I'll be going back in before submission to pay a bit more attention to detail to improve upon some other areas as well.

    • Added Rigidbody constraints to car prefabs to prevent cars from rolling downhill after spawning before a race starts if ground is not level. These are disabled once the player is allowed to drive or a race starts in the respective scene manager.
    • Added dynamic chase-camera effects when using nitro
    • Added Mountain Lake race track
    • Added new terrain textures
    • Added new trees
    • Added Sideview Mirrors to player car prefabs
    • Added "show waypoint mesh" toggle to race scene manager, use this to control which races waypoints should be visible in.
    • Optimized various textures
    • Improved AI settings and related scripts, added some options for future use including overriding car controller brake/reverse/acceleration inputs (this is currently used with AI sensors to prevent "Domino effect types of collisions" but can be used for additional purposes) .
    • Improved vehicle physics settings, cars are less flimsy on collisions

    The project is still growing and being reorganized as updates are made; some assets may be moved to new folders, while some new assets are created to replace the initial version if they originally derived from standard assets. This is being done to standardize the project and make it more compatible with any other asset, including standard assets.
     
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Randomation is not supported by default, but can be implemented with a good amount of scripting knowledge by replacing components and some script editing, I did this in a day with an older version but I was not happy with the results so I did not do more with it as far as a support package is concerned. I'm not sure if I will add support for that asset as the author has discontinued it.

    I'm currently working on adding Edy's Vehicle Physics support for the next update 1.063, this will be the first supported 3rd party physics system (my goal is to make it a universal template allowing any car/vehicle controller to be used with only a few configuration steps, this will still take some iteration to reach). Edy's does have a car damage system as well. I've setup a player configured prefab and integrated it into the template for single player mode first (95% complete, working on final tests), then I'm moving on to AI testing and configuration; if all goes well this should be completed in about 1-3 days time then 1.063 will be submitted.

    The included default physics have been reconfigured too, for the 1.063 update. They now feel heavier and car collisions are greatly improved, as is AI car avoidance. I will have a demo ready soon.
     
    Last edited: Jul 19, 2016
    Ony likes this.
  20. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Do you plan in having a "mario kart" preset too?
     
  21. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I would like to add vehicle-type prefabs, but this will not be a focus until more framework is completed; I currently don't have a plan for these at the moment.
     
  22. jillval

    jillval

    Joined:
    Dec 7, 2013
    Posts:
    7
    thanks for detailed quick reply. Your customer support is A++. 1 more thing have you thought about adding a respawn, once the car is fully damage or goes off cliff for example? might be pretty useful. :) thx again, such a honer.
     
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    :)
    When using EVP, yeah, that's a good idea. I can look into a damage respawn option(s) but it'll probably be added after 1.063. Lots of non EVP updates in 1.063 that I want to get out there.
     
    jillval likes this.
  24. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    New Dev Log #21 Garage Scene Effects Breakdown

    In this video I go over and breakdown the effects I configured for the garage scene I created from the first dev log video.
     
    Last edited: Jan 15, 2019
  25. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.063 is nearly complete (for real this time), demos should be up soon and the package will likely be available within a week.
    • Added Rigidbody constraints to car prefabs to prevent cars from rolling downhill after spawning before a race starts if ground is not level. These are disabled once the player is allowed to drive or a race starts in the respective scene manager.
    • Added dynamic chase-camera effects when using nitro
    • Added Mountain Lake race track
    • Added new terrain textures
    • Added new trees
    • Added Sideview Mirrors to player car prefabs
    • Added "show waypoint mesh" toggle to race scene manager, use this to control which races waypoints should be visible in.
    • Optimized various textures
    • Improved AI settings and related scripts, added some options for future use including overriding car controller brake/reverse/acceleration inputs (this is currently used with AI sensors to prevent "Domino effect types of collisions" but can be used for additional purposes) .
    • Improved default vehicle physics settings, cars are less flimsy on collisions
    Added EVP integration to allow for an alternate physics option, additional EVP details (notes: EVP features require EVP to be in your project. Initial EVP integration does not included UNET functionality, this will be added in a following update):
    • Adjusted scripts to reference and use EVP components instead of default physics components, the AIHelper script needed to be completely rewritten to support EVP as the way the physics are used is very different between the two.
    • Added 14 EVP Player Car prefabs, these all have the same default settings and are meant to serve as place holders to be modified; similar to default player car prefabs.
    • Added 7 EVP Opponent Car prefabs, these all have the same default settings and are meant to serve as place holders to be modified; similar to default opponent car prefabs.
    • Added alternate garage scene referencing EVP prefabs, the EVP car model does not have the same material settings as the default RGT car model, because of this rim color (material) is not configured.
    • Added alternate open world scene using EVP city
    • Added new race using EVP city
    • Added EVP support package setup instructions.
     
    Ony and jillval like this.
  26. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    I hope we will see the EVP driven AI cars in the demo, thanks for the hardwork.
     
  27. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Ony and hakankaraduman like this.
  28. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    Could try EVP a little, perfect integration but Web gl is very slow to test, how about a windows build?
     
  29. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I'll work on putting one together.

    On an unrelated topic.. Unity 5.4 is available, UNET API script updates are already made and final testing is being done while v1.063 is pending review, once released RGT v1.064 will be submitted with the 5.4 API updates.
     
  30. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.063 is now available.

    1.064 will be submitted today with 5.4 networking API updates, among some other features added over the weekend including:
    • Added options to set default car body, brake, glass, rim and neon color material values in RGT Project Editor.
    • Added buttons for Build Settings, Services and Lighting to RGT Project Editor.
     
  31. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.064 submitted.
    • Updated project to Unity 5.4
    • Updated garage menu system to work with Unity 5.4 Networking API
    • Added Disconnect scene, this scene is used as a temporary landing scene after disconnecting from a UNet match.
    • Added options to set default car body, brake, glass, rim and neon color material values in RGT Project Editor.
    • Added buttons for Build Settings, Services and Lighting to RGT Project Editor.
    • Added interior car glass alpha value to helmet camera switch. This allows car glass materials that are double sided to have a dark tint when viewing the vehicle from outside, and a light tint when looking out the windows from the inside while the helmet cam is active.
     
  32. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    EVP video integration guide for RGT.
     
    Last edited: Nov 17, 2019
  33. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev log #22 Reducing prefab configuration time.

    In this update I reduce the time it takes to configure player car prefabs with new car models by automating the wheel settings configuration. This feature will be available in v1.065.
     
    Last edited: Nov 17, 2019
  34. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.064 is now available and 5.4 ready.
     
  35. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.065 now available.
    • Added auto-configure wheel button to car controller script, after assigning a new models wheels, press this button to auto align the wheel colliders to their new wheels and auto configure the network wheel sxript changes, you may want to tweak the transform position y and wheel hub radius for your wheels after for optimal configurations. Tutorial here: Quick Wheel Setup Guide
    • Fixed a bug that would sometimes appear when a race started and the timer string value could not be properly assigned.
     
  36. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi, Im thinking about buying your asset but I would like to know: the garage scene which is in dev log 21 is available also in asset? It is possible to change car material in the garage scene (no to change rgb colours but material )?
     
  37. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hello,

    The garage environment from the dev log videos is this: https://www.assetstore.unity3d.com/en/#!/content/13734 , but I have edited the materials and made the package ready for Unity 5, it took a fair amount of work at the time; the author published a Unity 5 version though to save the trouble. With my having to do extra work for Unity 5 experience aside, I like the asset and visuals from the scene and am happy with it, I would probably recommend the Unity 5 version although that is not the one I have.

    I don't have a car material swap system for the garage menu system yet, it's a very good idea and will probably have some priority when I think about adding a new feature to the garage. I'll work to add this in soon. Thanks for the question/request.
     
  38. James-Williams

    James-Williams

    Joined:
    Aug 30, 2016
    Posts:
    26
    I cannot setup waypoint on my own. Getting errors.Has anyone been able to setup a waypoint system from scratch versus using a prefab from the racing scenes?
     
  39. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    If you want to create a new race scene using the RG_SceneManager it's best to duplicate a race scene and remove the objects and change settings you don't need. This will allow you to get a new skeleton scene up without errors. There's a lot of data brought into this scene at startup through the manager, most comes from settings from the garage scene and the scriptable objects that store data, if some elements are not present in the scene it will error.

    I go over in detail how to setup the waypoints in the race scene setup tutorial video here:
     
    Last edited: Nov 17, 2019
  40. jpuntriano

    jpuntriano

    Joined:
    Jul 3, 2013
    Posts:
    4
    Hello, when this EVP Multiplayer version will be ready. By other hand, does it work for IOS ?
    regards

    Jorge
     
  41. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hi Jorge,

    Multiplayer for EVP should be included in the 1.066 update, this update I've been focusing on many project optimizations and organizational improvements of the framework. Once organization is finalized I will add the multiplayer components to the EVP prefabs. I don't expect this process to take too much longer, and it should be available on the store within the next week or 2.

    I've not tested this project on and Apple hardware but I've also not done anything that should exclude that platform, just about everything I've used in this project should be usable on all platforms; with the exception of UNET, this is not fully supported on all platforms yet. I've tested RGT builds on Android mobile devices and have not run into any problems.
     
    Ony likes this.
  42. bhamronin

    bhamronin

    Joined:
    Sep 25, 2016
    Posts:
    1
    This is such an awesome template,really like it.
    I'm facing a minor problem here.When the vehicle velocity drop to zero,i will have to go backward a bit in order to go forward.Otherwise it just stuck there.How could i fix this?
    pls help.
     
  43. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    This has to do with the handbrake being engaged. The Hand/Emergency brake input control is spacebar by default, if the hand brake is pressed while the car is not moving the hand brake is fully engaged until it is disengaged, this helps to prevent the car from moving if on an incline, tapping the reverse button disengages the handbrake.

    If you'd like to disable this functionality you can use the "Window/RGT Settings/Input" section to clear the input mapping for "Emergency Brake". Just delete the Positive Button value and spacebar will no longer trigger the emergency brake.
     

    Attached Files:

    Last edited: Oct 15, 2016
  44. jpuntriano

    jpuntriano

    Joined:
    Jul 3, 2013
    Posts:
    4
    EDY'S PACK SYNCH

    Hello

    Just purchased your pack. All ok by now. But need a detailed tutorial to use Edy's physics pack here. i already have it.

    Be waiting for your comments.

    J
     
  45. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hello,

    To setup EVP to work with the template you can start with a fresh project then import Racing Game Template, followed by Edy's Vehicle Physics. After both assets are imported you can drag the EVP Support package from Racing Game Template to your desktop then back into Unity to import the required scripts and prefabs to your project. There are also 2 scenes made specific for EVP included in the support package, the city race and open world city; add these to your build settings and you're all set.

    You can also follow the EVP integration video to see how the process works.


    I've recently updated the EVP support package to better support the mobile controls, this version is currently pending review. You can email me to receive the updated support package that includes mobile support.

    UNET support for EVP is being finalized and will be submitted soon.
     
    Last edited: Nov 17, 2019
  46. AkaNoArashi

    AkaNoArashi

    Joined:
    Sep 30, 2016
    Posts:
    2
    Does this template also include time attack?
     
  47. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    No, it doesn't. I'll add it to the list of features to be added in future updates.
     
  48. AkaNoArashi

    AkaNoArashi

    Joined:
    Sep 30, 2016
    Posts:
    2
    Thank you, that would be awesome!
     
  49. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    1.066 is almost complete, here's a test demo of the RGT/EVP UNET progress.
     
    Last edited: Nov 17, 2019
  50. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    it look good when one of the cars stay still and other one drives around, can you also show how it works when two of them moves at high speeds side by side please?