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,

    The menu system in V1 is not compatible with V2.

    To load RaceCompetitor from resources, you would have to declare the type:
    Code (CSharp):
    1. playerVehicle = Resources.Load<RaceCompetitor>("PlayerVehicleName");
    Let me know if this helps.
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yes, the next beta release will be very similar to the final version so upgrading to the asset store version should be very easy.
     
    facundogalella likes this.
  3. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    That is the fix for the infamous distance bug??

    Edit: I tried it and now my AI are super fast and my race results are showing backwards.
     
    Last edited: Mar 1, 2019
  4. AnonymousUnity

    AnonymousUnity

    Joined:
    Apr 27, 2017
    Posts:
    4
    I have a suggestion , can you add traffic cars to the scene and police maybe ? And the color of the car in the menu scene ? Some car doesnt have any color just had one and its official so why many color appear at main menu to change car color ?instead its been hiding ? .
     
  5. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    The idea of RGSK is that it is a framework to build your own game. Not that it is a complete game out of the box. You are free to add your own menu and traffic cars (as others have if you check the old messages). I would recommend that you ask how to do it yourself rather than asking the developer to do it for you.
     
    Last edited: Mar 5, 2019
    Emile97, Ian094 and Mayureshete like this.
  6. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    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.

    Which month? ;)
     
  7. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    What is the minimum Unity version supported for the next beta?
     
  8. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Using RGSK v2.0, what would be the best way to instantiate the player previously selected in another scene? I saw a post from 2016 regarding how to handle this, but unfortunately the code snippet provided (for Race Manager) is different that the Race Manager code in v2. I created a script with the following:

    Code (CSharp):
    1.  
    2.         var raceCompetitor = GetComponent<RaceCompetitor>();
    3.         if (raceCompetitor == null || RaceManager.instance == null) return;
    4.         RaceManager.instance.playerVehicle = raceCompetitor;
    5.  
    It works to connect the player to the race manager, however I don't see the player name on the Race Canvas, and I don't think the race functions correctly. I'm curious what would be the most modular approach to hooking up a custom Player for use with RGSK.

    Users of my app will be able to "upgrade" parts on the player vehicle, so once configured I need this vehicle to race.

    Thanks.
     
  9. Ian094

    Ian094

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

    I was referring to February :(

    I've come across some issues that I have been pulling my hair out trying to resolve. I will release a new beta version as soon as I sort these issues out.

    Thanks.
     
  10. Ian094

    Ian094

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

    The minimum supported version will be 2018.3.7.

    I recently updated to this version from 2018.3.0.
     
  11. Ian094

    Ian094

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

    A good way would be to store the vehicle in a Resources folder and create a script that loads the vehicle into the RaceManager. Note that it is important that you load the player in the Awake function. Preferably, configure your loader script to get executed first in the Script Execution Order.

    Something like should work:
    Code (CSharp):
    1. vehicle = Resources.Load<RaceCompetitor>("PlayerVehicleName");
    2. RaceManager.Instance.playerVehicle = vehicle;
     
  12. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks Ian, that works but I get two instances of the player. The race manager spawns the player, should I comment this out?
     
  13. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Two instances? That's weird...

    Are you spawning the player from somewhere else? If so, then yes you can comment out the code.
     
  14. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks Ian, the player prefab is spawned by the game flow/ui asset. Since RGSK spawns the player/competitor, which the game framework has already instantiated, I end up with two player instances in my scene. If I comment out the RGSK "spawn competitor" for the player, then the race panel doesn't display player info, and the player isn't in the starting position, etc..

    Did I need to customize all of this with a script?

    Thanks!
     
  15. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    The RaceManager has a "SpawnCompetitor" function. I would recommend using this function in the asset you are using to spawn the player. Or better yet, pass the player vehicle to the RaceManager. I'm not exactly sure how GameFlow works so I am a bit unsure here.
     
  16. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    151
    Question. Will 2.0 be mobile ready?
     
  17. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    I used an empty game object as my Race Competitor that had all of the RGSK scripts it needed. Then I added the instantiate script from Game Framework to instantiate the object that I had chosen in Game Framework.

    I then wrote some code to find the steering wheel etc.
     
    Ian094 likes this.
  18. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thanks, that's a good idea; probably better than my implementation...

    I added a script to the game frame scene scope to connect the player to RGSK by passing selected prefab. Instantiation is handled by RGSK not game frame. The awake function of script has this:

    Code (CSharp):
    1.     void Awake()
    2.     {
    3.         if (GameManager.Instance == null) return;
    4.  
    5.         var character = GameManager.Instance.Characters.Selected;
    6.         if (character == null) return;
    7.  
    8.         var characterPrefab = character.GetPrefabInGame();
    9.         if (characterPrefab == null) return;
    10.  
    11.         var raceCompetitor = characterPrefab.GetComponent<RaceCompetitor>();
    12.         if (raceCompetitor == null || RaceManager.instance == null) return;
    13.         RaceManager.instance.playerVehicle = raceCompetitor;
    14.     }
     
    Ian094 likes this.
  19. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yes.
     
  20. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi,
    Does RGSK 2.0 beta work with RCC 3.2?
    Anybody tried this? Please tutorial.
     
  21. Ian094

    Ian094

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

    Yes, there is an RCC 3.2 integration available.

    PM me if you would like to try it.
     
    Max1982 likes this.
  22. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi,
    So tried use RCC 3.2 with rgsk 2.0 and 1.1.0. And everywhere is the same problem : After Race scene is loaded, RCC car is also controlable, but it shouldnt be. It should be contrable when countdown. „3,2,1 go” - is finished.
    I uncheck in car prefab RCC „non controlable” in RCC car controller script but the issue still exists. Whats going on with this?
     
  23. Ian094

    Ian094

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

    Please check that you have set the Main Controller Type to "Custom" in RCCSettings.

    Also, included in the integration is a ReadMe.txt file that goes through all the steps to setup Player and AI vehicle.

    Thanks.
     
    Max1982 likes this.
  24. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Ok, I check this out, Thank you very much
     
  25. Dani444dk

    Dani444dk

    Joined:
    Mar 29, 2019
    Posts:
    1
    Hi everyone!
    Ian094
    When will be downloadable racing game starter kit 2.0?
     
  26. Ian094

    Ian094

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

    RGSK 2.0 is still a work in progress. I have been struggling a bit with development lately. I will be sure to let everyone know when the update is ready.

    Thanks.
     
  27. Cocorilow

    Cocorilow

    Joined:
    Jan 11, 2018
    Posts:
    3
    Hi, I'm happy with the purchase, is there documentation to run it on Android?
     
    JamesArndt likes this.
  28. Ian094

    Ian094

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

    RGSK runs on mobile out of the box.

    The main thing to set up is the touch screen controls.

    If you are using v1.1.0, this is documented on page 23 in the manual (ReadMe.pdf).
     
  29. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I have not imported RGSK into Unity 2018.3 yet, but does it work with the new prefab system?
     
  30. Cleuton-Albuquerque

    Cleuton-Albuquerque

    Joined:
    May 29, 2017
    Posts:
    28
    Hello, how are you? When will a new beta release. hug
     
  31. rahat090255

    rahat090255

    Joined:
    Aug 15, 2018
    Posts:
    18
    will not any update come ?
     
  32. Ian094

    Ian094

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

    Yeah, I'm using Unity 2018.3 and it works.

    The new prefab system is a feature I had been looking forward to for a long time so I updated as soon as 2018.3 came out.
     
    JamesArndt likes this.
  33. Ian094

    Ian094

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

    I'm fine, thanks.

    I'm working on it.

    I've been going through a pretty tough phase in the development of 2.0 and I've had to take some time to rethink things - I will try to elaborate on this soon.

    I understand that the update is long overdue, but please bear with me.

    Thanks.
     
  34. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Yeah I'm enjoying it too and want to move to working in 2018.3 as my primary editor, thus my question! Thank you for the reply.
     
  35. diealp

    diealp

    Joined:
    May 24, 2016
    Posts:
    6
    Hi all,

    I have just set up a test race with AI cars, everything works correctly except the AI cars don't change gear... I mean they always stay in gear with index 2 and sometimes set the index to 0.
    Transmission type is set to automatic and the same settings works fine for a player vehicle.
    I checked the currentGear value by exposing it in the inspector and this is the current settings (during the game):



    p.s. sorry for my english :) I hope it was clear...
     
  36. Ian094

    Ian094

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

    I think what is happening here is that the transmission shifts up and then immediately shifts back down. If this is the case, then the Shift Down RPM range is the problem.

    After shifting up, I assume the RPMs drop below this range causing the transmission to down shift.

    Try to reduce the Shift Down RPM range to maybe 1500 - 2500 and see if this helps.

    Let me know if this fixes the issue.
     
  37. diealp

    diealp

    Joined:
    May 24, 2016
    Posts:
    6
    I just tried to reduce shift down rpn to 1500-2500 and then to 1000-2000 but the problem persists.
    This is the current config for a low spec vehicle :)
    ah, the default gt86 ai vehicle works well...

     
  38. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Ah, I think I spot the problem.

    The Shift Up RPM (5500) is bigger than the Max Engine RPM (5000).

    This means that the transmission will never shift up because the engine cannot rev that high.

    Reduce Shift Up RPM to a value that is lower than Max Engine RPM and see if that fixes the issue.
     
  39. diealp

    diealp

    Joined:
    May 24, 2016
    Posts:
    6
    Thank you, that was the problem... I feel so stupid :D
     
    Ian094 likes this.
  40. diealp

    diealp

    Joined:
    May 24, 2016
    Posts:
    6
    Ok, gear shifting problem solved... now, I see the AI cars do not have good turns from the second lap on, they tend to tighten the steering too much and slam against the obstacles looking for a subsequent waypoint.
    I tried in a new track of mine with one of my AI car, in the demo track with default AI cars and even mixing everything... I always have the same problem.
    I noticed that the "update project settings" entry did not create any settings for me, in fact I had to modify the input entries by myself and I had to create layers and tags by hand... maybe I miss some settings that was not created automatically.
     
    Last edited: Apr 10, 2019
  41. Ian094

    Ian094

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

    The AI issue is related to a certain bug in the beta version. This is a known issue and will be resolved in the next release.

    Updating project settings can be done by going to "Window/Racing Game Starter Kit/Update Project Settings". Then extract the contents of the .rar file to your ProjectSettings folder (located at the root of of your project).
     
  42. diealp

    diealp

    Joined:
    May 24, 2016
    Posts:
    6
    Nice, I had not copied the files to the ProjectSettings folder, Now I have all the Inputs, the layers, the tags and I think something more because the "second lap bug" disappear.
    Thank you so much :)
     
  43. CFCF2

    CFCF2

    Joined:
    Feb 16, 2019
    Posts:
    15
    Will there ever be Item pickups added?
     
  44. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Yeah, there will be at some point.
     
    Neviah likes this.
  45. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    Any update on this? Also any significant progress so far bro? April end is near the corner.... Can you already give us an ETA?

    Thank you
     
  46. Ian094

    Ian094

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

    Unfortunately, there hasn't been a significant amount progress lately.

    I mentioned in an earlier post that I had to rethink things. To elaborate on this, I've been having a pretty difficult time figuring out the direction I was taking the development of the 2.0 update. Over the last couple of months I have been rushing things through in an attempt to save time for everyone waiting on this update, leading to poor workflows, hard to maintain/extend code and overall reduced quality of the asset. I've had to go back to the drawing board to rethink the direction I want to take the development of this update and so I have been refactoring a lot of the code and taking time off to think things through as opposed to quickly implementing a feature just to get it out of the TODO list.

    I'm aiming to release a good update and I hate to say it, but v2.0 in it's current state just isn't there yet - it needs more work.
    I will give an ETA when I am confident enough to do so and stick to it. Expect to see development updates when a notable amount of progress has been made.

    Thanks.
     
  47. harryzzzzz

    harryzzzzz

    Joined:
    Aug 4, 2016
    Posts:
    4
    Hey,
    Is there a way we can add shortcuts to this kit? right now it uses a path system and we want to add shortcuts in the environment how to do it?
    Thanks in advance Great Asset :)
     
  48. harryzzzzz

    harryzzzzz

    Joined:
    Aug 4, 2016
    Posts:
    4
    Hey,
    I want to add Shortcuts in my racing track environment and right now is there a way to do it in this kit please help me.
    Thanks in advance :) Great Asset
     
  49. Ian094

    Ian094

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

    The path system in v1.1.0 checks the number of passed nodes to see if a lap has been complete or not, so taking shortcuts is not possible.

    This can be changed to check for spline distance instead which would allow for shortcuts. Feel free to PM me if you need help on this.

    Thanks.
     
  50. Tzach10

    Tzach10

    Joined:
    May 3, 2018
    Posts:
    3
    Hello, I'm trying to reduce the vehicle speed after the race is finished but so far no success.
    Any ideas of how to do that using the existing parameters?