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

[v2.0 soon] Racing Game Starter Kit - Easily create racing games!

Discussion in 'Assets and Asset Store' started by Ian094, Jun 30, 2015.

  1. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Sorry for all the questions.

    How do I make so the vehicle that is chosen at start is available on the race selected.

    Thanks
    G.
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    All player vehicles are loaded from a "Resources/PlayerVehicles" folder.

    To make sure that the vehicle chosen is available on the selected race, ensure that the vehicle's prefab is located in a "Resources/PlayerVehicles" folder. This can be done automatically when setting up a car if the "Save As Prefab" option is selected.

    Data loading is done through the DataLoader.cs component so ensure that you have one in your scene. Also remember to check "LoadRacePreferences" in the RaceManager.

    Thanks.
     
  3. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks got it working now.
    G.
     
  4. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    After further test, I 've noticed:

    Circuit is set for 3 laps, after 1st lap no update but after 2nd lap counter said 1 of 3 laps.
    So it takes 2 laps for counter to register 1.
    Race completed and finished after 6 laps.

    Cicuit is smaller than original large 20km. This is about 10.8kms.
    Path has 123 waypoints using smoothness 1000.

    Just thought this might help you in debuging the long circuits.

    Regards
    G.
     
  5. Ian094

    Ian094

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

    To register a lap, the vehicle is required to pass all the path nodes. This bool "passedAllNodes" is stored in the Statistics.cs component. It has the [HideInInspector] attribute so remove this from the script to debug in the inspector.

    Another issue that could cause lap issues is vehicle colliders. More than one collider can cause the lap to register multiple times. A simple fix for this is to put a delay timer between the OnTriggerEnter function so that it cant be called more than once in the same frame. This is something I've done for the upcoming version.

    I'll be testing the spline on a long track (20Km+) to see the results. A beta release of v2.0 will be out soon so you'll be able to test on your track.

    Thanks.
     
  6. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Yes but then it would not be skipping laps it would be adding them.

    In any case after further messing about I got a circuit working properly using Path with 67 nodes 10.8kms using smoothing value = 2000.

    I think problem might have been that I had been using Align nodes to Ground when creating path, and I think this is not working properly for me and puts nodes below the road.

    I created new path without using this and it seems to be working.
    Will try longer circuits next.

    One more things, when the race ends I get the Race Completed panel coming up and the Replay scene starts behind this. I cant seem to get rid of this panel to be able to view replay behind.

    What is the correct function that should be added to the View Replay button?

    Thanks.

    G.
     
  7. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    This happens because "Auto Start Replay After Finish" is set to true in the RaceManager.

    ReplayManager.ViewReplay();
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    How is progress on 2.0 coming along?
     
  9. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Hi Ive prepared a short video showing how the 1st circuit is looking.



    I seem to be having some problem with skidmarks, as you can see they are not visible in with player camera but can be seen sporadically in the replay camera.

    Any ideas?
     
  10. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    The progress of v2.0 is going good - bumpy but good. Everyday it draws nearer to a beta release. Lately I've been trying to perfect the AI. I tried a navmesh solution for AI navigation yesterday. It works great but I can't say that I'm very happy with it. Main issues with using navmesh for racing AI is that they don't always follow the racing line - making them a bit slow around corners. I'm still trying to weigh my options and make the AI as smart & competitive as I can.
     
  11. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Nice, CR1 is looking awesome! :)

    The issue with the skidmarks on replays is something that I'm aware of. I think a fix for this would be increasing the "Ground Offset" value in the Skidmarks.cs script. Maybe a value of 0.03 would resolve the issue.
     
  12. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks dude!

    OK I tried this but still cant get any skidmarks during normal play.

    Another issue I am having is a lot of camera trembling with heavy flickering shadows while playercamera chase mode is active.

    There is a lot less trembling with fixed mode but still there is the occasional jolt.

    If I disable the playercamera.cs script the trembling & moving shadows stop completely so seems to be related to this script.

    Please see this small video showing the problem.

    http://gibracer.com/video/bandicam 2017-03-07 20-50-06-901.mp4

    The order in the video is: Chase, Fixed, Script Disabled, Script Enabled with Chase Mode.

    What could be causing this?
    Thanks for all your help.

    G.
     
  13. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    wow such a big lap....

    is this game 4 mobile..?

    amazing work tho..
     
    JamesArndt, Max1982 and gibmation like this.
  14. Ian094

    Ian094

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

    Sorry for the late reply.

    So I checked out the video and I'm not entirely sure what could be causing this.

    Try setting the Camera's Near Clipping Plane to 0.1.

    Thanks.
     
  15. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Hi, lowering the Cliiping Frame value increases the problem.
    Increasing to about 2.16 stabilizes the shadows but then driver, bonnet wheel views start loosing parts of the car.
    This is driving me crazy lol.
    G.
     
  16. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks, not for mobile, currently for PC.
     
  17. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hmmm, I'll take some time to try and reproduce this issue on my side and get back to you with a solution. I've never experienced this issue so hopefully I can actually manage to reproduce it.

    Thanks.
     
  18. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133


    Your game, track and cars look really good.[/QUOTE]
     
    gibmation likes this.
  19. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Intense_Gamer94 - I want to use my own simple physics for the vehicle, just using a simple 4 raycast vehicle to control moving and turning. Everything else I want to use is yours. Do you have a guide or any instructions for implementing my own custom physics for the vehicle? I am an owner of your package and have seen the importer packages and instructions for Edys, etc. in there. I'm more curious about how to use my own custom physics.

    Nothing wrong with your implementation. I am doing a go kart that has very, very minimal to no suspension and it doesn't play well with most wheelCollider based setups as they want a bare minimum on suspension distance.

    For reference I'm using this package for physics. It's really simple.
    https://github.com/unity-car-tutorials/SimpleRaycastVehicle-Unity
     
  20. Ian094

    Ian094

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

    The documentation (page 43) goes through how to implement your own vehicle physics. It's not a very complicated process but does involve tweaking the source a bit.

    I just downloaded the package you linked. The physics are dead simple and shouldn't be difficult to implement to RGSK. If you need any help I can create a custom .unitypackage that will support that physics package.

    Thanks.
     
    Neviah and JamesArndt like this.
  21. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Wow dude that would be amazing! If you feel like it would take you a long time...just let me do the editing myself. if it's a fast thing for you, please go ahead. I am PMing you with my invoice number.
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Your game is coming along nice. One thing you should consider is investing in a good sky/lighting package such as Time of Day, uSky, Tenkoku, etc. and something like PRISM for post camera effects. Right now the game just looks flat. Those packages will make your game shine.
     
  23. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    Just curious about the animated biker, how will crashes be handled? Will they be able to fall off the bike, will they simply respawn or no crashing at all?
     
  24. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    No crashing at all would be very dull :)

    The biker will use ragdoll physics when the bike crashes, then respawn on the track after a few seconds. Similar to what you see in MSK and Sportbike Pro.
     
    Atzig likes this.
  25. user099

    user099

    Joined:
    May 29, 2015
    Posts:
    25
    any post processing effects used? temporal aa?
     
  26. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    Awesome! If you do a beta, definitely let me know.
     
  27. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Yes you are right, game looks flat, there are no effects on camera as I am trying to sort out problem with jerky shadows.
    Appreciate your comments and advice @magique.
    Already own TOD & Tenkoku but will look into PRISM.
    Thanks
     
  28. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Nope, theres no effects on camera.
    This only happens in camera chase modes.
    If I disable the playercamera script the jerks stop.
    Looking closer its not only the shadows, other elements in the scene also seem to move.
    Thanks for your help.
    G
     
  29. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    Is there more than 1 camera being used to render the scene? Or a day/night cycle system? Have you tried adjusting your shadow distance / shadow cascades under quality settings?
     
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Great. I was in the same situation early on and when I added in TOD and PRISM it made a huge difference. Hope you have success with your project.
     
  31. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    OK I think problem is not camera based.
    It seems to be that the actual vehicles are producing the jerky movements which in turn are tracked by camera.
    Ive made another video showing this.
    Looks like the cars are a bit nervous before they set off :)
    http://gibracer.com/video/movecars.mp4
     
    Ian094 likes this.
  32. AOEIII150

    AOEIII150

    Joined:
    Jun 22, 2014
    Posts:
    9
    Hi Intense_Gamer94

    I would like some information :)

    Version 2.0 will be released as a free upgrade for owners of the kit?

    When it will be available approximately?

    Thanks and good work!;)
     
  33. Ian094

    Ian094

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

    Yes, v2.0 will be absolutely free for those who already own the asset. With all the features that will be included in the new version, the price of the asset will increase.

    I'm planning to have a beta release for a period of 1 - 2 weeks before submitting to the asset store so I can get constructive feedback and make v2.0 a somewhat perfect release on the asset store. I'm aiming to have the beta released anytime before the end of March. So many hours have gone into v2.0 and can't wait for the release.

    Thanks.
     
  34. AOEIII150

    AOEIII150

    Joined:
    Jun 22, 2014
    Posts:
    9
    Thanks for your replies!
     
  35. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Is this happening to me only or is this the case in general.
    Is there anyway of avoiding this?

    Small video - watch in full screen to appreciate the movements.

    http://gibracer.com/video/carshake.mp4

    Thanks
    Gib.
     
  36. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I can't seem to reproduce this.

    Have you tried placing the car in a different scene to see if the same thing happens? It could be related to the track mesh or the wheel colliders.
     
  37. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    OK Ill do a few more tests.
    G.
     
  38. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
  39. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Ok, please do.

    Thanks.
     
  40. Thre3ouls

    Thre3ouls

    Joined:
    Apr 13, 2016
    Posts:
    22
    I Intense_Gamer94 I'am working with RGSK 1.1.0 and I have 1 simple question how can I change the limit of 5 AI in the menu? Because I want to be able to select 20 AI but it seems to be limited to 5. If i set 20 AI in the race manager without loading preset reference it works but in the menu the range is from 1 to 5.

    Finaly I found the Extra Settings Dialog were I can set the max opponents for the menu UI.
     
    Last edited: Mar 16, 2017
  41. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Great :)
     
  42. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Has the beta been released already?
     
  43. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    No, not quite yet.

    If it were, you would have definitely had it already :)

    Thanks for your patience.
     
    antoripa likes this.
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks.
     
  45. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi Intense_Gamer94,

    i would like to know, if there will be option in 2.0 to change the color of wheels in menu (like it is in v1.1.0)
     
  46. Ian094

    Ian094

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

    The option to change wheel colors currently hasn't been added to v2.0 - only performance and body paint are available.

    I'm looking to add more visual customization options such as front/rear bumper, spoilers, rims and more sometime in future.

    Thanks.
     
    JamesArndt likes this.
  47. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Quick question. I know I may find where I broke a connection somewhere tomorrow morning. Just in case I don't, I'd lke to ask what might be the cause of this: When viewing my replay for a race I notice now that the wheels are not rotating in the replay, they are stuck turned to the right. I must have broken some connection somewhere on a prefab. I'm guessing something is recording those rotations on the wheels to play back during replays.
     
  48. Ian094

    Ian094

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

    The replay system records the position, rotation, velocity and inputs of the vehicle then plays them back.

    Wheel rotations depend on the input values played back so I'm guessing it somehow isn't recording inputs from your custom vehicle physics.

    I'll take a look to see what the issue may be and get back to you.

    Thanks.
     
  49. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    Hi there, and first of all congratulations for this asset, it looks really well done and optimized (and it has accessible code, which is always a plus :D). Just one question from programmer to programmer: on a scale from 1 to 10 (where 1 is super hard and 10 is super easy) how tedious would it be to bypass the built-in customization and credits process to implement my own? Also, in the demo, cars shift gears automatically, is there an option for manual shifts?
     
  50. Ian094

    Ian094

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

    Assuming you mean the menu vehicle customization, this would be a 10. Bypassing this wouldn't be difficult at all because the racing system does not depend on this in any way.

    The credits system would also be a 10 because the only thing involved here is a adding/subtracting to single value and saving/loading this value.

    There is no option for manual transmission. A new version is due very soon. This version includes a complete rewrite of everything including vehicle physics. Automatic and Manual transmission will be included.

    Thanks for your support.
     
    JamesArndt likes this.