Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[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,527
    Hi,

    To create mobile controls:

    1. Open the scene setup window (Window / Racing Game Starter Kit / Scene Setup)
    2. Under "UI Components", select "Mobile Controls" and press the configure button.

    This will create a template that you can work with.

    The steer type i.e touch, tilt or wheel can be changed in the MobileControlsManager component attached to the panel.

    Let me know if this helps.
     
    Greg-Bassett and AbhishekRaj like this.
  2. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Hello guys, I am stuck in a weird situation. I had created nodes around my race track and the race is going almost perfect but there is one problem.

    The AI cars are sometimes going out of the track at some of the corners. I just wanted to know that can I adjust the nodes via the Move Tool? Will it disturb other nodes? I suspect that the nodes may need some adjustment around the corners.



    Thanks in advance:)
     
  3. blakeysal

    blakeysal

    Joined:
    Nov 5, 2012
    Posts:
    23
    what u want to do mate is on your track layout say node - 0 change your target speed the lower your target speed the AI will go slow but say u r on a corner and your nodes r 0 to 10 then set the same target speed and look if your left and right track width r set in side of the track hope this help
     
    Ian094 likes this.
  4. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    I can't find the thread for the v1 RGSK? I am figuring the original thread simply had it's title changed to the beta version. As of right now the v1 RGSK is the only version for sale on the Asset Store. v2 is in private beta at the moment and not ready for final release. Since I'm still using v1 and I'm figuring you are still supporting it until it's removed from the Asset Store and replaced with the v2 version I'm having some issues with the latest 2018.1 using the HD Render Pipeline. When I import in RGSK it turns every scene completely black. The lighting is simply gone and even going into a clean new empty scene everything is still black. I'm trying to figure out why this is happening and I think it might be some of the editor project settings being overwritten and a conflict with the new rendering settings. Do you know the barebones project settings I might need to import that RGSK will still work?
     
  5. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    Working on the Beta 2. Some feedback for people who are using their own or unsupported physica packages. It would be nice if the scripts were divided up more. For instance, in order for my driver to turn the steering wheel, I have to have the entire vehicle controller script which I am not using anything else of. I get a ton of error messages while running the game for all of the stuff that I am not using at all. The nitro controller, for example, is a separate script.

    In general, I am not fond of the vehicle controller. Half the time I cannot update values and I have had a realy hard time trying to adapt the code for my use without breaking everything. Granted, I am not a guru, but it looks as if the development of this script (vehicle set-up window) is designed to try to make it easier for people like me and it actually makes it harder. (I was trying to add two more "steering wheel" like elements so that the flaps on the hovercraft would turn in relation to the steering)

    Other issues I have is that the respawn is too low and I fall through the terrain. I do not know how to change the values to prevent this.

    My game is for hovercraft in order to make it realistic, I am trying to simulate the physics of real hovercraft as well as possible. This means no brakes and also that the steering is very sensitive and there is a lot of drift. As a player, I can compensate for this just by no going too crazy on the steering and not jerking it left and right. My AI, however, looks like a bunch of drunken college kids in bumper cars - on ice. I tried tweaking the steer sensitivity and this seems to have no impact.

    Any tips would greatly be appreciated.
     
  6. jpilon

    jpilon

    Joined:
    Dec 14, 2013
    Posts:
    8
    how do I get access to the beta? I just bought this asset and try the check transaction function but nothing happens (page just refreshes).

    Also just quickly playing around with the version on the asset store, is there a simple way to make the steering more "arcade"? I've increased the boost / speed significantly to get a more drive fast feel however the car is pretty much unsteerable at faster speeds, I've played around with a bunch of the settings but I'm not really seeing the desired effect. Any tips would be great.
     
  7. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
  8. Ian094

    Ian094

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

    Please try and adjust the target projection values in the Track Layout component.

    These values determine how near or far the AI's target can be. Try reducing the max distance value and see if that helps.

    Reducing the target speed around certain nodes can help too.

    Setting up AI for a track is a process that can take quite some time to get right.
     
    Last edited: Jun 9, 2018
  9. Ian094

    Ian094

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

    Yes, this is the same thread, I just changed the title.

    Support for v1.x will cease shortly after v2.0 is released.

    When importing from the asset store, the project settings should automatically get updated so I'm guessing its a shader incompatibility issue, similar to the issues you were having with v2.0 beta. Have you tried updating the materials?
     
  10. Ian094

    Ian094

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

    The driver script requires a reference to the VehicleController to grab the steer input value for the head look. I forgot to check whether the VehicleController is null in code, hence all the errors. Sorry about that and thanks for bringing it to my attention. I think the best way to handle this would be to get rid of all VehicleController references and use the InputManager's steer value instead.

    The vehicle physics in v2.0 is specifically designed for cars. For this reason, I would recommend creating your own custom hover vehicle physics and integrate them. The integration process is fairly simple as seen from the RCC integration I did a while back. Don't hesitate to contact me if you need any help.

    About the respawn issue, I will add configurable height offset value to help prevent this.

    If you have any suggestions on what could make working with RGSK better, please let me know because this is the sort of information I want to gather from the beta version.

    Thanks for your feedback!
     
    jaberwocky likes this.
  11. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    Can someone please give an estimation on the official release date?
     
    JamesArndt likes this.
  12. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    622
    I guess it will be ready when it’s ready... as I said before it will be well worth the wait!
     
    Ian094 and JamesArndt like this.
  13. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    I'm also interested to know a release date, or at a minimum a window for release, i.e. Fall of 2018, etc.
     
  14. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    My physics works well with the player. I didn't need to do much of anything. Then I just need to plug my values into the AIInput. Also easy once I figured out where I needed to go. Getting the setting right is another thing altogether.

    I figured out that changing the values in the AI Controller script does basically nothing and that I have to change the values in the AIDifficultyData. Can you make the variables in the AI Controller private to avoid this confusion?

    I tweaked the speed way down and upped to steering and the throttle sensitivity, but I still get a lot of weaving left and right and the AI is really easy to beat. Still working to see if I can get the settings right without messing with the code.

    Here is a look:


    You can see that the AI straightens out in the end and seem to have stopped weaving. I just wish it would do that all the time.

    I have to say that I am really impressed with the level of detail in this Beta. I let out an "oooh" when I smashed into the wall and got sparks. I ddin't even notice that in the code at first. Really a lot of thought and work has gone into it.
     
    Ian094 and JamesArndt like this.
  15. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    Ouch that framerate is horrific.
     
    derkoi and Greg-Bassett like this.
  16. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,527
    At the moment I can't state an official release date. The beta version is great but still needs work. The main areas I am working to improve are:

    - Track Editor (Track Layout component)
    - UI & Camera Systems
    - AI
    - Workflow
    - Optimization
    - Integrations

    After making these improvements, RGSK 2.0 will be released. There most probably will not be another beta version.
     
    Greg-Bassett and JamesArndt like this.
  17. Ian094

    Ian094

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

    Nice hover physics!

    To avoid the AIDifficultyData overriding the values in the AIController component, set the AIDifficulty to "None" in the Race Manager.

    The weaving is most probably caused by the AI target being too close to the vehicle. Select the TrackLayout component under "Track Editor" and scroll down to the "Follow Target Projection" settings and increase both min and max distances.
     
    jaberwocky likes this.
  18. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    B
    Buy me a new computer? :)
     
    Atzig, JamesArndt and Emile97 like this.
  19. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    You should be able to get a much better framerate if you turn off the post processing. That stuff is very heavy on systems that aren't very powerful.
     
    Emile97, Ian094 and jaberwocky like this.
  20. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    That was exactly the problem, thanks! Now everything works really well. Now the little buggers can beat me easily ;)
     
    Greg-Bassett and Ian094 like this.
  21. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102

    Now with AI opponents. Still haven't taken the advice on the post processing, but I hope it is still watchable.

    Was much happier once I got rid of the vehicle controller inspector. Now I was able to make some of the changes I wanted. Still need to comment out a lot of stuff I don't need.

    Next step is to figure out surfaces. I want to create surfaces that are slower or faster so that the player can strategize on where on the track the want to go to maximize their speed. I would like to create water, ice, and mud/ rough. Then I would also like to change the particles emitted by the hovercraft based on what it is going over (maybe even create a wake for water?) I think that is all doable once I figure out how the existing code works.

    Probably should stop soon and wait for the official release, right?
     
    JamesArndt likes this.
  22. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    Yeah it's literally a checkbox you can turn off while demoing or testing. Looks like your game might be running around 18fps at the moment with dips even lower at spots. This most likely means that your GPU bound and users that have lower powered computers won't be able to play your game properly. If you want to demo something that runs at a nice framerate and give a good impression of the product simply turn off the post processing while showing WIP videos of gameplay. To see how a given system is functioning we don't need to see AO or Motion Blur or any of that.

    Not to mention folks see this that don't know whats killing the frame rate and it could give the impression it's the racing kit system itself that has poor performance.
     
  23. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    So for anyone reading this post who is thinking of buying this package, please know that the frame rate is definitely due to my crappy hardware. I will be posting a gofundme to get me a real game development laptop later ;)

    But seriously, here I have turned off the post processing.
    It didn't help that much.
     
    JamesArndt and Emile97 like this.
  24. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    I love this. the Ai's are very competitive .. but tell me something are you going faster than them? (i mean is the max speed of all the cars the same ?)
     
  25. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    Thanks! I am trying to balance it out a bit so that they are competitive but not TOO competitive. In this video, I have the player and the AI set to the same speed, but then I allow them to catch up because I want to observe how they act. If I set the speed of the player slightly lower than it is more fun and competitive. I have yet to find out the max speed that the AI can go. Right now, I am justing looking at getting enough working for a proof of concept and waiting for the full release.
     
  26. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    ah oki oki i see. I'm so hyped for the release of the kit and your game . I'll have some fun too :) Thanks for answering
     
  27. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    I know the next thing you can test that should really see if this is a rendering issue. Turn off the real time shadows and test it out. Let us know how the framerate is going at that point..you should see an improvement. If that doesn't solve it and you haven't added any massive amount of geometry to the scene then this is a performance issue with the RGSK kit itself on mid to lower range computers. What are the specs of your development box?
     
  28. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    OK, will try that after work. Thanks.

    I think it might also have to do with the fact that I added my own physics, but still have a lot of the underlying physics for RGSK that is probably doing a bunch of unnecessary calculations in the background. For instance, hovercraft don't have gears (or wheels, obviously) but I am still using the vehicle controller script. Not sure if that would be enough to impact the framerate. I just need to comment out all the stuff I don't need, but I was kinda hoping for the offical release before I dig too deeply.
     
  29. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    151
    I don't think RGSK's / your own physics are the issue, you tend to lose a lot of frames per second in the editor compared to a build. And chances are your quality settings are probably much higher than your computer can handle smoothly.
     
    Ian094 and AbhishekRaj like this.
  30. mitis

    mitis

    Joined:
    May 21, 2013
    Posts:
    26
    Hi and when will the new beta version???
     
  31. mitis

    mitis

    Joined:
    May 21, 2013
    Posts:
    26
    RGSK HTC VIVE

     
    Ian094 and JamesArndt like this.
  32. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    What happened to the recording? The video is 240p, worse than potato quality. Hard to see what's going on, but I can see the steering wheel appears broken somehow. Looks like it's rotation pivot is jacked up and it's rotating off of some other arbitrary point. Is the kit that way by default or did you change something in the rotation code or the geometry's pivot? The hands are holding an invisible wheel and floating somewhere inside of the actual steering wheel.
     
    Emile97 likes this.
  33. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    Turned off shadows, still not getting a great framerate. Here you can try yourself to see if it works better on your machine.
    http://bradjensen.info/hoverweb/index.html
     
  34. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    smooth at 32 fps, my pc config is i3 3rd gen 12gb ram and inbuilt graphics.
     
    jaberwocky likes this.
  35. blakeysal

    blakeysal

    Joined:
    Nov 5, 2012
    Posts:
    23
    smooth at 60 fps my pc config is i7 8700K 8 gen 16gb 2400 ram gtx Geforce palit 1060 6gb form old machine and is v sync count on turn it off and u will get more Fps
     
    jaberwocky likes this.
  36. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    35 -> 40 fps smooth on i5 8gigs of ram with an intel iris (an a lot!! of +processess in the backgroud)

    + there is an issue , when you respawn , the controls, they stop working
     
    jaberwocky likes this.
  37. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    Should be fixed now.

    Thanks everyone for helping me to test my game!
     
  38. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    lol it is ok , i also get to test the Ai so :) i don't mind lol, plus your game is nice
     
  39. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Can I use NWH vehicle physics asset with this kit? If so how? I tried but I can't figure it out. Thanks
     
  40. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    102
    Some feedback, sometimes I get to the end of the race and the race manager doesn't recognize that I crossed the finish line. Can also happen with the AI racers. I will try to figure under what circumstances this occurs. It doesn't happen every time.
     
  41. Ian094

    Ian094

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

    There's no official integration for NWH. One will be available soon.

    Thanks.
     
  42. Ian094

    Ian094

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

    This is a strange bug regarding the distance calculation between the last and first nodes (RaceCompetitor.cs lines 125 - 135). I forgot to put this as one of the known issues in my post.

    This and other issues will be fixed in due time.

    Thanks for the report, please fill me in if you figure out under what circumstances that this occurs.
     
  43. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    WOW the beta is really great man! I may not need an external car physics after all.
     
    Ian094 likes this.
  44. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,527
  45. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,836
    For RGSK V1 I've noticed the replay camera tends to jump from one Cinematic Camera Position to the next oddly in some situations. Not sure how to repair the calculation or place the Cinematic Camera Positions so that this doesn't happen. Any insight into the best practice to not get this effect? Should I replace some of the distance checking code in the replay camera? Maybe calculate the closest distance down the race path spline vs. world location?
     
  46. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,527
    In v1, the cinematic cameras are enabled based on the 'world' distance from the camera position. In v2, I took a different approach and used track distance to choose what cinematic camera to enable.

    Yes, this would be one way to resolve the issue. Another solution would be to use triggers to determine what camera to enable. Setting this up can be tedious but the results should be good.
     
    JamesArndt likes this.
  47. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Any possibility of adding Player rewards and cash in the final release especially since the Menu Scene is separated from RGSK.
     
    JamesArndt likes this.
  48. Ian094

    Ian094

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

    This feature has already been added but it's not completely finished.

    To setup a reward system,

    1. Add a PlayerDataManager to your scene (i.e create an empty gameObject and add the PlayerDataManager script to it)

    2. Add a RewardManager to your scene (i.e create an empty gameObject and add the RewardManager script to it)

    Rewards for each position can be configured in the "Rewards" array where element [0] would be the rewards for 1st, [1] for 2nd and so on.

    The currency can be accessed through the class instance:
    Code (CSharp):
    1. PlayerDataManager.instance.playerData.currency
     
    AbhishekRaj likes this.
  49. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    please tell me,
    1)what are the 7 types of races available?
    2) in some racing games when you're doing a championship, the starting grid position of each player will be different according to the number of points you got from the previous races in that championship (except the first one where you are randomly placed) is this feature available on your asset?
     
  50. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,527
    1) There are 11 different race types in RGSK 2.0:
    • Circuit
    • PointToPoint
    • Endurance
    • LapKnockout
    • Checkpoint
    • Elimination
    • SpeedTrap
    • TimeTrial
    • TimeAttack
    • Drift
    • Duel
    Somewhere down the line I would like to create a system that allows developers to define their own race types. So rather than hard coding the race types, just give developers a set of rules that the race session should follow. These rules can be stored in a scriptable object and loaded as a race type. This is an idea I've had for a while.

    2) Right now, the grid order is based on the points a competitor has, so the one with the highest points gets spawned in first place. When starting a championship, the list is shuffled so you get a random grid position.
     
    AbhishekRaj, Emile97 and Mayureshete like this.
unityunity