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

    Ian094

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

    I'm doing well, thanks.

    At the moment, there are no video tutorials on integrating RCC with v1.1.0.

    Here's a step by step guide on how to do so:

    1. Import the RCC.unitypackage located in the Other/Integrations/RCC folder.

    2. Set the CanBeControllable to false in the RCC component of all the vehicles.

    3.a) Drag a player vehicle into the scene and navigate to Window/RGSK/External Vehicle Physics and then select Add Required Player Components.

    b) Drag an AI vehicle into the scene and navigate to Window/RGSK/External Vehicle Physics and then select Add Required AI Components.

    Note: If you are using Unity 2018.3, it would be better to do all the above in Prefab mode.

    I'll be sure to release detailed videos on all the supported integrations with the v2.0 release.
     
  2. Ian094

    Ian094

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

    With the next beta release it will be possible to easily upgrade to the initial 2.0 release because all the systems will be similar (if not the same).

    There are a lot of features in 2.0 that will allow you to develop various types of games. At this point, most of the planned features for the initial release have been implemented and work well. Polish and revision is what is mainly needed.

    As I mentioned above, I want to have a new beta released by the end of the month and I reeeally hope that I achieve this goal.

    Thanks.
     
    facundogalella likes this.
  3. Ian094

    Ian094

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

    The AI behave this way by default - they will always try to follow the racing line when there are no surrounding obstacles. This is because RGSK was built with car racing in mind. I've been trying to generalize the system more so that RGSK would essentially work well with any type of racing game - foot racing, horse racing, etc. Rather than only follow one main route and racing line, each AI can have their own route to follow. I think this would work very well for a horse racing game.

    The behavior where they all aim for the racing line immediately after the race starts has been fixed and will be available in the next beta release.
     
  4. Ian094

    Ian094

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

    I completely agree that my support and presence on the forums has been terrible over the past few weeks. I will be online more often regardless of what I have going on.

    I should definitely setup email notifications so that I am notified whenever there is a new post.

    Thanks.
     
    derkoi likes this.
  5. Ian094

    Ian094

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

    I just wanted to let you know that I changed my username.

    I'm not an impostor :)
     
    ahmet28, JamesArndt and derkoi like this.
  6. vladmxr

    vladmxr

    Joined:
    Mar 23, 2018
    Posts:
    6
    Hi guys! I am glad to anounce to you i have launched my first Android game with Rgsk v1.1.0! Try it out and tell me what do you think! If you like it, please help me with an like on the facebook page and a share! This will mean a lot for me, i am on the start right now and no one know about it. Thank you! https://www.facebook.com/ClawSoft/posts/614632328993910?__tn__=C-R
     
    Ian094 likes this.
  7. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    Am I missing something? In horse racing they bunch up just like cars, don't they? It is only with humans where there are lanes you have to stay in.
     
  8. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I've always thought that in horse racing they stick to one lane similar to Olympic sprint events... I could be wrong though.

    Either way, I think the ability to assign a separate route for each AI or the ability to set up multiple racing lines per route would be really good.
     
  9. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    I completely agree with that. As for the AI part ( that is something I'll implement by my own once I get 2.0 ), I am Thinking of giving each and every Ai agent human traits and personalities. Let's see an exemple

    ->The AI agent is of type "chill guy" and his current position is maybe 5th
    -> after some time, He gets passed by and now he is 7th..
    -> due to his chill nature, He "MIGHT" feel the need to focus more thus give more horsepower to his car or if he is not feeling competitive at all ( during that play mode "that particular moment") he will just continue to drive and be a little bit competitive

    In short, their feelings will change during play mode depending on specific events thus affecting the way they will decide to drive

    I'm doing that to avoid using techniques like rubberbanding and give the player a true racing experience. Is the fact that you can assign a different route (multiple racing lines per route) for each AI mean that they won't form lines and follow each other like train blocks and keep their distance from each other?

    Thank you.
     
  10. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
     
    Ian094 likes this.
  11. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    That's a really cool concept for AI.

    Rubberbanding is a "cheap" way of achieving what you just mentioned. Rubberbanding is quite hard to implement because it rarely ever goes unnoticed and ruins the racing experience. I think it was worst in NFS Most Wanted (2005), where the AI will sometimes literally stop before the finish line and let you win!

    Rubberbanding can also be good if implemented in a way that isn't so obvious to the player. It can make for good racing battles when the field is tightly packed together throughout the race.

    The current 2.0 beta version has a rubberbanding feature that grabs the Rigidbody components of all competitors and slows down the ones in the lead based on how far the field is spread apart. This is not the best implementation and I will look for ways to improve it.

    If the AI have their own route to follow, it will avoid the "train block" behavior but the issue here is that if a car is not following the optimal racing line, it will be slow, so this wouldn't be a very good approach to track-based racing AI. Improving the way the AI drive on the track would be the best solution here i.e how they avoid other vehicles and how they manage travelling at an offset from the racing line.
     
    Emile97 and toto2003 like this.
  12. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    I'm making an offroad rally (point a to b) game and have lots of "upgrades" for my offload vehicle. Various doors, tops, hoods, wheels, tires, suspension lift, and use NWH Vehicle Physics controller. I have no problem coding c# but wanted to ask how hard it would be to allow user to "upgrade" parts with your RGSK v1 or v2? Thanks!
     
  13. Ian094

    Ian094

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

    Point to point races are supported in RGSK 2.0 so is no limitation to that aspect of your off road rally game.

    However, vehicle upgrades will not be supported (for the initial 2.0 release), so this will be something you would have to implement yourself. The race system and vehicle physics system are completely independent of each other so it really wouldn't be complicated to implement.

    I plan to add full support for NWH and other vehicle physics for the 2.0 release.

    Please note that v1.1.0 does not have or support the things I have mentioned above. Support for v1.1.0 will be dropped shortly after v2.0 is released.

    Thanks.
     
  14. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    try out the smart tuning system or the lite version of it ;)

    https://assetstore.unity.com/packages/tools/integration/smart-tuning-system-110759
     
    Ian094 likes this.
  15. AOEIII150

    AOEIII150

    Joined:
    Jun 22, 2014
    Posts:
    9
    Hi Ian!

    What about the main menu? It will return as an external assets with the next v2.0 beta or we have to create our own?

    Because i completely upgraded my project to RGSK v2.0 Beta but I need a simple menu :)
     
  16. Ian094

    Ian094

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

    The main menu will not return within the initial 2.0 release but as a external asset shortly afterwards.

    See these posts:
    https://forum.unity.com/threads/v2-...eate-racing-games.337366/page-30#post-3490992
    https://forum.unity.com/threads/v2-...eate-racing-games.337366/page-30#post-3492388

    Thanks.
     
    AOEIII150 likes this.
  17. Ian094

    Ian094

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

    Quick development update:

    I've re-worked the AI sensor system. The old method where triggers were used to detect threats was flimsy and wasn't a really good method for AI vehicles.

    I've resulted in using raycasts called at a user-defined rate (default is 1 time per second). The performance is good and the AI are able to navigate much better than before. The raycast sensors are defined in an array so you will be able to set how many you want which is a good way to better manage performance.

    I've also reworked parts of the workflow regarding vehicle and scene configuration. I believe it is much easier to work with and understand now.

    Many other systems have been significantly improved. I wont go though them right now because I don't want this post to be too long :)

    I'm looking forward to knowing what you think of all the improvements when you get hands on the next beta release!

    Thanks.
     
    Mayureshete and AOEIII150 like this.
  18. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks for the response Ian.

    I'm considering your package at the top of my list. But I'm also considering the Racing Game Template.

    ...curious if anyone has tried both this asset and the RGT and maybe they could post a comparison, or PM me if it's not appropriate.

    Thanks!
     
    Ian094 likes this.
  19. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I believe all the racing game assets on the Asset Store that I know of are great:

    IRDS
    RGT
    Highroad Engine
    Minicar Race Creator
    Street Racing Engine

    They all have their strengths and weaknesses so it's up to the developer to decide which suits their project's purpose most. A lot of effort definitely goes in to the development of these assets so I respect the developer(s) behind the asset.

    RGSK 2.0 is being built with the mindset that the developer may want to create any type of racing (or driving) game, so I try to incorporate features that make this possible and decouple systems where necessary.

    Thanks for your interest RGSK!
     
    AbhishekRaj likes this.
  20. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    I can also recommend Game Framework. I use it for the Title Page, race selection menu, store to buy vehicle and driver upgrades, system to keep track of wins and awards (you have to win one race to unlock the next) plus Unity Ads integration and probably some things I am forgetting. There is a free version to try. It takes some getting used to and you will have to code (I can share my code for anyone who is interested)
     
  21. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    Also, I do not own any of the other racing frameworks but I chose this one based on what Ian said - that I could use my own vehicle physics. That was critical to me.
     
    Ian094 likes this.
  22. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks jabberwocky that is great info.
     
  23. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    I have compared RGT and RGST and found that the AI was more realistic and fun in RGST than in RGT. I made 2 prototypes of the same game (one using RGT and one with RGST) and did let my daughter test them both. She did select the racing game starter kit from Ian as her favorite. I was using the beta of 2.0 though.
     
    AOEIII150 and Ian094 like this.
  24. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks everyone. I just purchased this asset and will be testing the beta v2.0 to start
     
    JamesArndt and Ian094 like this.
  25. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Just installed the Beta and saw the message about updating the project settings first. I went to Window -> RGSK -> Update Project Settings, however nothing happens (I get no feedback, and there's nothing in the console window).

    I had made a copy of the project settings folder prior to running this update, and compared with after running the update, and nothing in the folder looks changed. I am running Unity 2018 with iOS platform.

    Am I missing something?

    Thanks, can't wait to get started.

    Edit: I also tried to re-import the project settings.rar (didn't make a difference)
    Edit 2: Also tried re-importing the asset into new project. (no help)
     
    Last edited: Feb 21, 2019
  26. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I've seen mention of bugs or improvements that could be made to RGSK V1. As it's still the core package and the V2 is not released yet, are there going to be bug-fixes for V1 up until V2 is launched?
     
  27. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    After selecting "Update Project Settings", the program associated with opening archive files should launch (in my case, that program is WinRAR).

    Extract all the contents to your ProjectSettings folder and accept the replace all prompt.

    For the next beta, I will have to think of a way to make this process less of a hassle. I have gotten quite a number of users struggling here.

    When 2.0 is live on the asset store, this will no longer be a problem as it will do this automatically at import.
     
    AOEIII150 likes this.
  28. Ian094

    Ian094

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

    There will be no further improvements or bug-fixes made to V1. Also, support for this version will be dropped shortly after V2 goes live.
     
    JamesArndt likes this.
  29. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks Ian. I tried this outside Unity (using unRAR type tool) and this is what returns:

    NRAR 3.60 beta 6 freeware Copyright (c) 1993-2006 Alexander Roshal

    /Users/<mac harddrive>/RGSK_test/Assets/Racing Game Starter Kit/Beta/Editor/ProjectSettings.rar is not RAR archive

    No files to extract

    I'll try looking for another tool to un-RAR
     
  30. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hmm, seems like an OS issue.

    I will send you the files within the .rar shortly.
     
  31. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Yes please, thanks. I just downloaded the latest version of UnRAR and had the same message "no files to extract"
     
  32. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    So V1 is still supported right now for fixes? So if I'm having that distance tracking issue, is that considered "support" for you to fix it or?
     
  33. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yes, at the moment I am still actively supporting V1 so if there are any issues that you are facing with V1, I will work to help resolve.
     
    JamesArndt likes this.
  34. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Has anyone tried using NWH Vehicle Physics with RGSK v2? I really want to try and prototype my race game with my choice of vehicle and NWH's physics. I was hoping to just "follow" what is being done for any of the other custom setups in order to get mine working, but the beta docs don't have this info yet.
     
  35. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    I'm trying to get my first scene setup. I've got things hooked-up as far as I can tell. When the race starts, I press the throttle button (on screen mobile controls) and the car (from the demo) doesn't move. I see the IK driver rotates the steering wheel when I click the steering buttons, however the throttle button ceases to move the vehicle.

    Video tuts are for v1, and I'm using the beta. If anyone has an idea what I should look at, please let me know?

    I believe I have mobile controls setup correctly with the touch and axis scripts. I have countdown/finish timeline sequence hooked up. I have a terrain not a race-track, but I figured this should still work, with track editor steps followed correctly (i think - didn't seem to hard), along with a start and finish triggers/events.

    The pre race panels shows first, I click start. Pre race panel hides and I get the countdown sequence. The demo plays just fine on my iPhone, so I feel I just need a little assistance to get my test scene working. :)

    Thanks!

    P.S. It's so addicting to play that dang demo!!

    EDIT: Do I need AI cars setup? I've skipped the AI for now, set to 0 AI cars. Could this be my problem? I don't think it is, but I thought I'd mention it.

    EDIT 2: The digital tachometer does respond to the throttle, so at least we know that works. Gonna try using the demo track in my scene, maybe the terrain is the problem...
     
    Last edited: Feb 22, 2019
  36. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Okay SOLVED my problem...

    It was the Timeline sequences, I didn't have the RaceManager.StartRace hooked-up. Ooops.
     
  37. Ian094

    Ian094

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

    I have never used NWH vehicle physics before but I have tried the online demo and I think it is awesome.

    I'm aiming to add support for the majority of vehicle physics assets with the 2.0 release and NWH is on list. This is to give developers a variety of vehicle physics to choose from out of the box which I believe is very important.

    Implementing your own vehicle physics is quite easy - all that's really involved is creating a script that implements an interface.
     
  38. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Glad you figured it out!

    The current beta version is not well documented so feel free to ask me any questions you may have.

    Thanks.
     
  39. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thank you Ian! NWH has the best off-road physics to suit my needs.

    An interface to what? Do you mean the input axis (think I've seen a few posts mention this) I'm certain I'll be able to figure it out.

    ...thanks again for your support.
     
  40. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    The AI script for the vehicle would implement IAIInput. Here's an example:
    Code (CSharp):
    1. public class Example: MonoBehaviour, IAIInput
    2. {
    3.     private VehicleScript vehicle;
    4.  
    5.     private void Start()
    6.     {
    7.         vehicle = GetComponent<VehicleScript >();
    8.     }
    9.  
    10.     public void SetInputValues(float throttle, float steer, float brake, float handbrake, int boost)
    11.     {
    12.         if (vehicle != null)
    13.         {
    14.             vehicle.throttleInput = throttle;
    15.             vehicle.steerInput = steer;
    16.             vehicle.brakeInput = brake;
    17.             vehicle.handbrakeInput = handbrake;
    18.         }
    19.     }
    20. }
    The player script would be the same as default but reference your vehicle physics instead.
     
  41. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233

    Will do Ian. thank you for this.
     
  42. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Using beta and can't manage to trigger the finish line. Instructions are pretty straight-forward and I've taken a look at how the Demo scene has it setup, with respect to the first node of the track and the starting-grid node positioning.

    Anyway, it's entirely possible that I've messed it up, but any tips would be great.
     
  43. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    Make sure the last node is in front of the finish line.
     
  44. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks jaberwoky, that didn't help. Or maybe I didn't understand correctly. "In front" means before or after? I checked out the demo and used what I saw there, which is after the finish line; so hopefully I have it correct.

    I didn't have a track profile, so that was just added. Along with adjusting the last node in front of the finish line I'm not sure what the problem is, but I will create a test track with non-custom physics and see if I can get that working.

    Thanks.

    Edit: Something isn't making sense on my track nodes. If I have the last node in front of the finish, the track first/last nodes overlap each, basically cause the track to cross in front and then back, but I don't see that on the demo track. Not sure how this node ordering is supposed to happen.

    Edit 2: Crap I just realized because I'm left-handed I've been looking at everything backwards, or in the wrong direction. Ooops. I think I know how to fix this...

    Yep, still not working. Tried circuit track, point-to-point. dummy/primitive car with RGSK physics, nothing works to trigger that finish line. Maybe it's something to do with event triggers or ignore raycasts. I'll keep looking...

    Edit 3: I made a copy of the demo scene, created a small oval using one of the meshes in the track generator. Created the track layout (no track profile), start grid, finish line (no sector), 1 lap, 2 ai, but the finish line doesn't trigger the finish.

    not sure about what to do at this point.
     
    Last edited: Feb 26, 2019
  45. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    This is a bug with the current beta version.

    The problem is related to how distance along the track is calculated in the RaceCompetitor.cs script.

    A quick fix for this would be to replace lines 127 - 134 with the following:

    Code (CSharp):
    1. if (distanceOnTrack - lastDistance > Mathf.Abs(track.trackLength * 0.8f)
    2. || lastDistance - distanceOnTrack > Mathf.Abs(track.trackLength * 0.8f))
    3. {
    4.     lastDistance = distanceOnTrack;
    5. }
    I will be releasing another beta version with fixes to this and other issues. I am currently working to sort out some issues with the race system and some performance issues I have come across with the new AI. Once I get these sorted, I will be ready to release a new beta which I plan to run for no longer than 3 weeks (I hope that in this time frame we can get any bugs fixed and make improvements where necessary) then I will submit 2.0 to the asset store.

    Thanks.
     
  46. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks for the help Ian, I will make this change and see how it goes.

    I read a previous post where you talked about a spline based track layout process. Are you still thinking about this for the release? I noticed on the node layout of track, when it comes to paint-to-point type races that the track is still connected to the start, always making a loop. Not sure if this is how it's supposed to be or if I'm doing anything wrong, but thought I'd check.

    Anyways, thanks again.
     
  47. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    There is a "loop" checkbox that allows you to select whether you want the track to loop or not. This is not done automatically when the Race Manager is set to the "Point-to-Point" race type. Each race type has it's own predefined settings. For point-to-point, one of these settings is to force 1 lap.
     
  48. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Oh perfect, thanks!
     
  49. forzaerdal

    forzaerdal

    Joined:
    Dec 10, 2015
    Posts:
    5
    hi ian,

    How can i load the playercar prefab from resources folder?
    V.1.0 has a Dataloader but in V.2 has Race Competitor.. How can I make Race Manager to get my car prefab from Menuscript?
     
  50. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    64
    Excellent! we'll able to update easily our projects from this future beta to 2.0 asset store version?
     
    Ian094 likes this.