Search Unity

► 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
    I'll make a completely new demo video soon, the best example is still the original multiplayer demo video near the end:
    The only difference from the above video is the physics used for player cars, some minor improvements have been made over time but nothing major.

    I plan to work more on the area in question and multiplayer optimizations in general, there are currently some jitters when players are next to each other and moving fast; this can likely be corrected by syncing and smoothing the players in a different way. My current method uses 100% UNET components, perhaps I will try to extend the NetworkTransform component currently being used to sync the Rigidbody or write a different sync solution that can handle the scenario a bit better.
     
    Last edited: Nov 17, 2019
    hakankaraduman likes this.
  2. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.066 submitted
    • Added UNET support to EVP Player Car Prefabs
    • Added unlimited race rewards option to RGT Settings Window/Races
    • Added use mobile input option to RGT Settings Window/Input
    • Removed Mobile Input toggle from Unity toolbar
    • Default mobile steering is now UI touch buttons
    • Moved scripts and from standard assets folder to TurnTheGameOn/RacingGameTemplate/Scripts folder to provide better integration with the template. New script files have been created to avoid conflict with other assets that may use this library or standard assets in general; many of these scripts have also been customized for various purposes. These scripts have also been moved to a new namespace.
    • Removed unused lightmap data, mission control cubemap and other un-needed textures
    • Adjusted RG_SyncData to use channel 1, changed SendInterval to 0.2, and optimized the script logic to reduce bandwidth.
    • Fixed a bug in RG_CarController that caused AI vehicles to jerk back and fourth when detecting a car in front.
     
    Last edited: Oct 4, 2016
  3. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Looking forward to that
     
  4. Reebzy

    Reebzy

    Joined:
    Oct 10, 2016
    Posts:
    1
    This would be huge! Photon support?
     
  5. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    This means that EVP can be used with multiplayer also? If so, update the asset description... because I was looking for it... :)
     
    Stephen_O likes this.
  6. DCrosby

    DCrosby

    Joined:
    Jan 13, 2013
    Posts:
    86
    If I had a model (RC), speed boat track on a lake, could I put the track underwater, and have the water buoyancy / thrust keep it above the water, yet have the AI try and race around the buoys to get around the track ? Is that something that's possible with your asset ?

    -DC
     
  7. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    There are still some other areas I want to continue to improve upon first; I don't currently have a plan for photon support, perhaps once I feel the template is complete I may work on that.
     
  8. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Yes, RGT multiplayer features now support the EVP Prefabs! This was only really mentioned in my YouTube videos... sorry about that.

    You're right about the asset description, I need to work on that a bit... there's a lot of things that are not listed in there that should be, I'll update it soon.. :)
     
    Ony likes this.
  9. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    This is not fully supported by default, you will need to make some adjustments to suit your needs. Most of the tools you would need are here but you will need to do some custom scripting and design a water track from the road track template to be used instead of the road track.

    The template is designed for the car controller that's included, but it can essentially be used with any type of vehicle controller with a bit of work. You'll need to edit/replace all of the script references from my controller that wont be used on your RC controller, as well as debug out any errors you encounter on the way. This varies in difficulty based on your Unity/C# experience.

    The waypoints from the race tracks use colliders, so you can scale these as needed to match your buoy areas. Your water would be your track with the bouys acting as waypoints.
     
  10. jdial1981

    jdial1981

    Joined:
    Aug 9, 2016
    Posts:
    10
    So, first let me say thanks for a really cool asset kit. That being said I am having an issue I hope you can help with. I purchased the RGT earlier today and spent a little time getting familiar with the setup. I then made a simple build for android with everything still at the default setting. When I ran the game on my device it was very laggy with a low frame rate, very near unplayable. As a reference I downloaded and played the Android demo that you have on google play and it ran flawless. This had lead me to believe it is caused by one of the following possibilities. First Possibility is that since this current version of the project is newer there may be some new features that are causing some of the slowdown. or Second Possibility is that my build settings may be different than what you used. Are there any specific build settings that you would recommend that would help performance.

    For reference:
    The test device is a Galaxy s7 edge.
    Frame Rate ran at 10-12 fps.
     
    Last edited: Oct 13, 2016
  11. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    Good!
    I just bought your asset. Do you plan to release more game modes? (like time attack, race against ghost lap (mine or from others.. this means to be able to share ghost lap), and so on?
     
    Stephen_O likes this.
  12. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    I unpacked the asset.
    Ok, there area some scenes with samples...

    where should I start from ? ;)

    if I would like to start from scratch, which are the steps to follow?
    (I checked various videos, but none of them is about how to start...)
     
    Last edited: Oct 13, 2016
  13. jdial1981

    jdial1981

    Joined:
    Aug 9, 2016
    Posts:
    10
    Load the "Garage" scene first. This seems to set the player prefs needed to play.
     
    Stephen_O likes this.
  14. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Thanks for the feedback and purchase!

    I'm going to look into Android optimizations for this next update, there have been many changes since the last demo was built and something likely may be causing more stress for mobile platforms.

    I have a feeling AI sensors might be the primary culprit, you can try to adjust them for each AI vehicle, perhaps disable some sensors or reduce the sensor length to improve performance. The sensors help make the AI more intelligent and responsive but are also very expensive on mobile.

    I'll have more info on this subject soon.
     

    Attached Files:

    Last edited: Oct 13, 2016
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I do plan on more game modes very soon. I want to focus on mobile optimizations for the next update 1.067, which should not take too long; after that I plan on adding new features. New game modes are at the top of the list, once I'm ready to start I'll look into different modes. Time Attack will likely be the first, most of my planning is already done for this mode.
     
  16. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    If you want to use a video guide you can use this playlist: https://www.youtube.com/playlist?list=PLy0oHZ9DiHn81rri8OBJ0CNd4HFrVjq-L

    You can use videos 3-7, this will help you to see how cars, scenes and many other related settings are configured.

    The Garage scene is the first scene that should be loaded, use it to select a race and generate the initial player data required for a gameplay scene.

    After that is done you can really start anywhere you like. I like to start with customizing the garage scene by replacing car models in the scene and setting up the player prefabs with new models. Then move on to adding new tracks.
     
  17. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    ok, good.

    as future plan, not too future :p , may you add "reverse track" ? In this case, the waypoint should be travelled in a reverse order, and have only to define start position for each way (normal, reverse) and a group of game objects (normal, reverse) where we may add objects related to the driving way(ex: Starting semaphores, finish line, and others...).
    the driving direction enable/disable the group objects related, as well as the waypoint direction mode.
     
    Stephen_O likes this.
  18. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've added this one to the RGT request list. Thanks for requesting and I'll work toward adding.
    :)
     
  19. jdial1981

    jdial1981

    Joined:
    Aug 9, 2016
    Posts:
    10
    I will give that a try. I will also try profiling the build in "Free Roam" mode, as there are no other AI drivers in the scene, and will let you know my findings. My main concern is that if this galaxy s7, being one of the most powerful devices available, is having trouble with frame rate then most other devices do not even have a chance of running it. This being usable on a mobile platform is a go or no go situation for my project. If there is anything I can do to assist with the optimization or testing please let me know. Thanks again.
     
  20. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Another big performance hit on mobile is from the rear and side view mirrors on the player car prefabs. You can parent those objects to an empty game object and disable them. I'm going to add some settings to the RGT Editor window to toggle these on or off as well as control the render texture values moving forward. You can also reduce their render texture size settings, they are in "TurnTheGameOn/RacingGameTemplate/RenderTextures".
     

    Attached Files:

  21. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    Another thing... :)

    the minimap, how may I change the orientation mode? I would like to have a rotating map (fixed car forward orientation), instead of rotate the car pushpin.
     
  22. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    There is a UI mini map object in each of the the scenes and a camera attached to the player cars to render the texture for it (this is detached after the player spawns), the camera has a script attached to follow the players position. You can have the UI mini map image rotate as the player's car rotates by adjusting the z axis of the mini map UI element as the car rotates with a custom script. I'll add this to the request list and try to push it out with 1.067.
     

    Attached Files:

    Magic73 likes this.
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    You can also disable the fog in Window/Lighting, I found this helps to improve mobile performance.
     
  24. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I submitted a update to the android demo on google play, it's more optimized and built from the current version of the template with a few changes to help improve mobile performance. Here's a list of the changes made for mobile:
    • Terrains have been converted to mesh
    • Tress are disabled
    • Rear and side view mirrors are disabled (toggles added to editor window)
    • Fog is disabled
     
  25. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    Do you have a public todo list, or a public roadmap? ;)
     
  26. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I don't have a public facing list but I'm happy to share my current list whenever it's requested. I'm working toward improving the website to host more robust documentation and any other info that may be relevant for the template. My list generally comes from feedback/requests and my own ideas that I'm working toward.

    The next features that will be added are Time Attack, Reverse Track, Mini Map rotates with car option, and Smooth IK Driver shifting.

    I'm also always working to improve the code base and RGT Settings window to make it more flexible and support scaling for future development. Part of my goal here is to move the entire code library into a namespace and create static helper scripts to keep things organized and easy for users to change.

    1.067 is almost ready to submit, here are the changes made so far. This update started with a focus on mobile optimizations for the demo content.
    • Added DebugData ScriptableObject, this will be used to control various debug settings.
    • Added FPS Counter toggle ot DebugData
    • Added DebugData category to RGT Settings window
    • Added mesh version of race track terrains to be used as a mobile optimization example
    • Added Rear Vew Mirror render texture toggle to RGT Settings window
    • Added Side Vew Mirrors render texture toggle to RGT Settings window
    • Improved RGT Editor Window responsiveness
    • Added static class RGT_PlayerPrefs to handle all PlayerPrefs calls from a single location, start here if you would like to save/retrieve data using another method.
    • EVP Support: Fixed AI vehicle wheels from steering too quickly when it was not necessary.
     
  27. ggirgin

    ggirgin

    Joined:
    Feb 20, 2016
    Posts:
    5
    Hi,
    Is there any feature on Multiplayer Mode: check points (like in your Single Player Mode) , race position , rewards ?
    And for different cars , different price of updates ?
     
    Last edited: Oct 25, 2016
  28. Stephen_O

    Stephen_O

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

    Currently multiplayer mode is only capable of syncing player cars for open world experience; car prefabs and their settings are all that's included. You would have to build custom multiplayer game play on top of that. I plan to improve upon this framework in the future but can not provide a date yet.

    All upgrade prices are set the same for all vehicles, I'll add this to the feature request list to ensure they can be different if desired.
     
  29. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    I got this template the day before yesterday and can't figure out how to edit the game. I have imported the garage scene and it is working fine but I can't figure out how to edit anything. Also is there any way to use the keyboard instead of the UI controls?

    Thanks.
     
  30. Stephen_O

    Stephen_O

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

    You can use the quick start video tutorials found here to see an example on how to get started with editing vehicles, races and other project data: http://www.turnthegameon.com/quick-start-video-tutorials

    The project editor window can be opened using the Unity Toolbar, select Windows/RGT Settings.

    To switch between mobile/pc input controls use the input sub-menu from the RGT Settings Window, I've attached a screenshot.
     

    Attached Files:

  31. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    I have another question.

    How do you change the menu text? I will look at the tutorials and see if it helps. Also every time I set a level to locked it unlocks when I start the game. How can I fix this?

    Thanks.
     
    Last edited: Nov 12, 2016
  32. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Most of the UI text can be edited directly from the text component on objects in the hierarchy of the related UI elements. I attached an example to show where the Game's Name can be edited from.
     

    Attached Files:

  33. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    Sorry about all the questions. Just trying to figure out how to use the template.

    For some reason every time I set a level to locked it unlocks when I start the game. I tried deleting the PlayerPrefs and locking all the levels but when I start the game it still unlocks all of them. Also setting the reward amount on the tracks seems to be glitchy. How can I fix this?

    Thanks.
     
    Last edited: Nov 13, 2016
  34. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Sorry about this one, it was a bug in a recent update where I defaulted the race locks to unlocked. To fix this you will have to edit a value in the RGT_PlayerPrefs script. This will be fixed for v1.069 .

    line 17 has:
    Code (CSharp):
    1. return PlayerPrefs.GetString ("Race Lock" + raceName, "UNLOCKED");
    it should be changed to:
    Code (CSharp):
    1. return PlayerPrefs.GetString ("Race Lock" + raceName, "LOCKED");
    If anyone needs me to, you can email me and I will forward an updated script.
     
  35. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    I found another glitch. When you set it to randomise the music in the RGT settings it plays it in list order for some reason.

    Also are there any cheap 3d models of cars and tracks that would suit the included car and track of the template?

    One last thing, is there any way to edit the top speed and acceleration of each AI. Also how can I edit the speed, acceleration and handling of the cars in the garage?

    Again thanks for answering all of my questions! I will be leaving a 5 star review.
     
    Last edited: Nov 14, 2016
  36. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I can't seem to reproduce music tracks not playing randomly. I just tested by adding short clips (sound effects) to the music track list, set music selection to random and let it go for a while while in the 3 scene types garage, race and open world. All 3 scenes played these clips in a random order.

    I think the best car models to use on a budget are the T-Bull cars, they are about $5 each and include interior with separated steering wheel, he has a large selection to choose from. https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:1114
     
  37. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    Thanks. Is there any way to get it to look like it does in the picturs (With the tress and proper water and terrain)? Also is it possible to edit the top speed and acceleration of each AI. Also how can I edit the speed, acceleration and handling of the cars in the garage? Also I will send a video of it not randomizing.
     
  38. derole123

    derole123

    Joined:
    Nov 12, 2016
    Posts:
    7
    I can't send the video. Is there any way to fix the issue where the audio won't randomise?

    Thanks.
     
  39. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    The original terrain from circuit hills is located in the "TurnTheGameOn/RacingGameTemplate/FBX and Mesh/RaceTracks/Track 0 Circuit Hills" folder. Although this has been modified a bit over time. If you like you can replace the trees in the terrain with higher quality as an additional option. The prefab for the track is located in the "TurnTheGameOn/RacingGameTemplate/Prefabs/Tracks" folder.

    You can replace this prefab with the track in the scene, then edit in any new terrain details, like new trees, grass, etc.

    For higher quality water, you can import standard assets water and use that. I'm working toward recreating demo scenes to be optimized for mobile and or HQ visuals for PCs.

    I looked into this for about 15 minutes, everything was working fine on my end from tests. I'll spend a bit more time with it tonight and also look at the code to see if anything might be causing what you're experiencing.
     
  40. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    I am thinking about buying this pack, but I am not sure if I will be able to integratemy hovercraft controller for your car controller. Sounds like a lot of work to get it to work. What are mychances? Do you have other customers who have successfully replaced the controller?
     
  41. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Currently I have 1 support package for alternate vehicle physics that uses Edy's Vehicle Physics https://www.assetstore.unity3d.com/en/#!/content/403 . If you're not using EVP but want to use another package, this implementation might be useful to you by seeing how various references were hooked up to replace built in references. In theory you should be able to swap the code reference changes from the EVP scripts with your hovercraft scripts, although I've never used the hovercraft controller so this is just a guess. Here's the EVP import guide to provide some insight into what I'm talking about:
     
    Last edited: Nov 17, 2019
  42. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Is that compatible with Realiistic Car Controller?
     
  43. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Currently this does not support Realistic Car Controller.

    I recently added support for Edy's Vehicle Physics, I'm still working to ensure that the updates process for any supported vehicle physics packages is not something that holds the project up when implementing new updates to the asset. When I feel this is optimally setup I will try to add more supported vehicle physics options.
     
  44. James-Williams

    James-Williams

    Joined:
    Aug 30, 2016
    Posts:
    26
    Is this closed tracks only or is there a way to set this up for a sprint race.
     
  45. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Sorry for the late response I'm working on a rather large update, new race settings will be part of this. Currently sprint races are not possible without making some edits to the template, I'm planning one of the new race modes to be sprint.
     
  46. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi @TurnTheGameOn
    just bought your asset. Few questions :
    1) Is there any way to run a race with only AI Car ?
    2) Can I keep all the feature using Edy's car integration ? I need in particular the inside car view with the IK.

    Thanks a lot
    Cheers,
     
  47. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hello @antoripa and thanks for your purchase.

    • 1. To have a single player race (or time trial) just set the amount of racers for that race to 1 using project settings window. Select "Window/RGT Settings" from the Unity toolbar then open the Races settings. I attached a screenshot of the menu to adjust.
    • 1.a If you want to do it from code you can call the following, (0 is the race number, 1 is the number of racers):
    Code (CSharp):
    1. RGT_PlayerPrefs.SetRaceLaps (0, 1);
    • 2. I think the only unsupported IK Driver feature for EVP is shifting, if you run into an issue where you can't do what you want let me know and I'll try to work on something for you.
     

    Attached Files:

    antoripa likes this.
  48. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi,
    thanks for the prompt replay. I have not yet checked it out, but reading first part I do not understand how AI Car will run alone. It looks more a single car driven by player.
    For Edy's is fine. I will do few test tomorrow. Thanks
     
  49. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    If you want to launch a race using only 1 AI vehicle you should set the number of racers to one and enable the RG_AI_Helper script on the player car once the race starts. You will need to do some custom scripting to have that triggered on when the race starts as it's intended to be the player car. I can look into creating an option for this if needed.
     

    Attached Files:

  50. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Sending a PM. Thanks.