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

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    ahn oki oki thank you.
     
  2. Ian094

    Ian094

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

    I'll have to look into this before I can get back to you with a fix.

    The only platforms I have tested using the beta version is Windows and Android.

    Thanks for the report!
     
  3. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    My game posted earlier is WebGL and works fine. http://bradjensen.info/hoverweb/index.html Try turning off post-processing.
     
    Last edited: Jun 21, 2018
  4. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    That's strange, I'm getting the same issue as @Megazorz.

    I guess it could be a web browser issue - I'm using Chrome.

    I'll be sure to debug this issue later and see if we can get it resolved.
     
  5. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
  6. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    64
    I'm doing a rally raid game, will be possible that the cars start each X difference of time, for example each car start every 30 seconds?

    or adding something where I can develop this as you say.
     
  7. Ian094

    Ian094

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

    I've had this type of start mode planned for a while. It wouldn't be very difficult to implement so we will probably see this start mode type in the initial 2.0 release.

    One issue with this kind of start mode is keeping the player waiting. If you have played Dirt 3 or other games that have this type of start mode, you will notice that sometimes the AI cars start far into the track with their times, splits and everything already calculated. I don't fully understand how they do this so the initial release of this start mode in RGSK wont have this feature where some cars start at some distance into the track.

    It will be a one by one race start as you explain it.
     
    facundogalella likes this.
  8. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Switched off all post-processing effects and it works. I'm going to dive further into this issue and see if I can get it to work with post processing somehow. So at this point this seems to be a "Black screen when using any post processing effect in WebGL issue".

    Also I'm using Unity 2018.2.0b9. I normally don't use Unity 2018 but I accidently opened my project in 2018 the other day and it rebuilt and worked, so I didn't want to rebuild it back to 2017 and it not work so I just went with it. Seems to be working fine so far. I'm building a 2017 project to make sure it's not a 2018 issue. I'll update when I can.
     
    Ian094 likes this.
  9. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Baking lightmap didn't work I had to manually update every object from Race Track Generator to re-generate UV so lightmaps bake properly. I also own Race Track Generator and every track I make I have to do the same. But you might want to generate UV's for your beta so people aren't confused when baked lightmaps have black spots all over them, like I was?
     
  10. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I'll keep this in mind, thanks for your feedback.
     
  11. Emile97

    Emile97

    Joined:
    May 28, 2017
    Posts:
    105
    I would suggest you also install mesh baker... Once you do, create your track, once your track is created use mesh baker to bake the whole track ( it will reduce your track to 1 drawcall and I guess(hope) that the mesh will bake this time. )
     
  12. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Using beta, I'm having a problem with my AI cars turning around trying to go backwards and then circling and going backwards again at each node. They perform properly on lap 1 and this happens during lap number 2. What am I doing wrong? This happens right after my first turn on lap 2. They go down the straight fine on lap 2. And after the first turn "some" of the AI start turning around, sometimes they don't.
     
  13. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I noticed this during testing and found out it was a duplicate node issue. Please try using the "Check Duplicate Nodes" in the TrackLayout component and see if it helps. Another thing to note is the positions of the 1st and last nodes, ensure the first node is infront of the finish line and the last node behind it.

    There's clearly some bugs with the distance tracking and I am working to resolve them.
     
  14. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    After respawning....
     
    Ian094 likes this.
  15. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    No problem, Thanks for the advice. I'll check it out.
     
  16. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Turns out my Node 0 "start node" was pushed behind the yellow Start/Finish Line trigger so it was my fault. No wonder the cars were turning around. Thanks, works fine now, and I updated the start and finish nodes to be on either side of the finish line like you said so there is two of them. =)
     
  17. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Awesome, that's good to hear.

    I'm constantly working on better ways to better handle distance tracking. You know, sometimes I wish I came from a AAA games background to have some insight on how the big boys handle this sort of stuff ;)

    Remember, if you have any suggestions, feature requests or anything you would like to see done different in RGSK 2.0, feel free to let me know.

    Thanks.
     
  18. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    OK as far as suggestions. Multiplayer racing would be a HUGE plus. I'll have to add my own multiplayer I guess it can't be to hard right? Also maybe you can throw in a camera that moves back a bit as you get to go faster to give a better sense of speed. Also a tuberlence / wind type effect as get to high speed. As well as when using boost some type of effect to give the driver a sense of speed. Like a blur / turbulence / wind thing type of thing you know? I was able to add the camera pulling back as the car built up speed with your camera system. Which was cool but when I hit the look behind button and with the camera pulled back under speed I was way to close to the car and I couldn't see behind so I had to turn it off.

    The kit is pretty solid. Right now I'm in need of a menu and race select / car customization / upgrade / point spending system type of thing and I would have pretty solid starter game. I know you have a menu in version 1 I'm not sure if I need to move it into the beta or what. Maybe you can send me some updated files because the menu says work in progress you know?

    I understand about not being a professional developer I am still learning myself. And I understand that if you are working alone like me, everything moves at a crawl. No worries, I really like this kit, I've been tinkering with it for a few days and it's very cool. I've already had a lot of fun customizing my own race and racing with my AI. It's been fun to see my AI go from bumbling idiots to pro drivers as I tweak and tune to get them just right.
     
    Last edited: Jun 23, 2018
    Ian094 and AbhishekRaj like this.
  19. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Multiplayer will be my main focus after releasing v2.0. I believe multiplayer is an essential part to any game these days. We will definitely see multiplayer support added to RGSK in a future update.

    The camera effects you mention would be a nice addition. I will add scripts that handle shake, zoom, blur etc that you can add to the cameras to give the desired effects. The camera system used in RGSK 2.0 is Cinemachine, check out the forums here.

    I'm planning to create a menu system add-on for RGSK so we probably wont be seeing a menu system out of the box in v2.0. Check out this post for the details.

    Thanks for your suggestions and support!
     
    AOEIII150 likes this.
  20. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    Keeping the menu system as a separate package is good idea to keep core system as cheap as possible. but i would like some discounts for the existing customers. ;)
     
    AbhishekRaj and Ian094 like this.
  21. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    I was able to somewhat implement version 1 menu system into version 2 last night in about an hour. Needs more work and I'm tweaking out the bugs but I can select levels and car at least. =) I'm not a programmer I but I have basic programming knowledge, it was fun getting into the code as it's helping me to learn to program some more.
     
    Mayureshete likes this.
  22. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    Read your post. I think it would be smarter to include at least a very simple menu. If you want to make a more intensive menu system as an add-on then that would be understandable.
     
    blakeysal and Emile97 like this.
  23. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    That's the idea - include a simple menu and leave the more detailed features for a separate package.
     
    Mayureshete and blakeysal like this.
  24. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    I would much rather that the new version gets released sooner than to have the menu or other features that are not central to the game.
     
  25. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    I would consider a menu central to the game.
     
  26. Megazorz

    Megazorz

    Joined:
    Mar 5, 2018
    Posts:
    14
    I sent you an email about adding my menu to the beta. Please help.
     
  27. Treacle-Games

    Treacle-Games

    Joined:
    Aug 24, 2015
    Posts:
    23
    I agree that a menu is central to the game however this is designed to be a kit and not a full releasable game. I'm sure you would want your game to look and feel totally different for any other game created with the kit. I am intending to release my game on the app stores and won't be using any of the graphics included with the kit.

    I am using Race Track Generator (which was used for the track in the demo) as that's is what i had already purchased to handle the tracks I also looking at the code to I can create random tracks in run time.

    There are a number of great UI menu packs on the asset store, the one I'm using is Racing UI-pack as it includes the psd files allowing me to add my own feel and branding to the graphics.

    https://assetstore.unity.com/packages/2d/gui/icons/racing-ui-pack-57320

    regards
    Mark
     
    AbhishekRaj, Mayureshete and Ian094 like this.
  28. SaadSerious2

    SaadSerious2

    Joined:
    Jun 26, 2018
    Posts:
    1
    Do we still don't have a release date for 2.0?? can you please tell us like how much work is still remaining and what is done so far??
     
  29. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    There are other frameworks available that you could use as a menu. Therefore, I would personally prefer the racing sooner and the menu later (or I will use mine). Just my .02
     
    Treacle-Games likes this.
  30. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    318
    Awesome kit. I've found it much easier to work (and way better optimized) than the other racing kits. It is hands-down the best one and I have tested them all for a driving game I'm working on. I have a couple questions:

    1) What's the best way to make the car go slower when it's on surface grass (with your default vehicle controller)? It seems that the friction can be changed, but that doesn't always slow you down it just makes you slide. I could be way off, but it seems one way to accomplish this would apply braking or something when going over grass.

    2) If I make a webGL game with this and have 10 unique tracks at similar optimization as the demo "car" race track, is the kit set-up to progressively load those scenes when they are called (sort of like lazy loading images on a website but with scenes)?
     
    Ian094 likes this.
  31. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    318
    Did you change the player prefab in the player settings under the Race Manager in the scene? RSGK Race Components (GO) > Race Manager Player (GO) > Player Settings > Player Prefab
     
  32. Ian094

    Ian094

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

    Sorry for the late reply, I haven't been around much this week.

    There is still quite a lot of work remaining. The beta version may seem ready for release but it still falls short of what I want v2.0 to be. The main areas I am working on are:
    I understand v2.0 has been in development for a very long time but I believe the final product will be awesome. I want RGSK to be a reliable, easy to use solution to making all kinds of racing games in Unity. I wouldn't want to compromise the vision by rushing the release.
     
    Treacle-Games likes this.
  33. Ian094

    Ian094

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

    Thanks for your support and kind words! I appreciate it.

    1) In v1.x this is not possible. However, this is possible in the v2.0 beta. Many things have been improved in the beta and I would reccomend trying it out. Check this post on how you can download the beta version.

    2) I'm not so sure what you mean here but I will try to answer. In v1.x there is no progression loading i.e from one level to the next. Touching a bit on v2.0 again, scene loading has been improved by adding a SceneLoader component that handles loading scenes in a better way. Also, championships are a feature so this would be a great way to handle progression loading where after you complete one event, the next event in the championship is loaded. I hope this answers your question.

    Thanks!
     
    Treacle-Games likes this.
  34. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    Is there a good guide to setting up the cameras? I seem to have messed up the track cameras and cannot seem to figure out how to put a camera to show the driver's perspective. http://www.bradjensen.info/hoverweb
     
  35. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    318
    You're welcome! For 1) I might try integrating a basic damage script that I'm familiar with to achieve a penalization for driving off the road. There's also things like physical speed bumps off the road that I can use to achieve the desired effect. I am keeping an eye on the progress of version 2, but I'm going to have to stick with the current to meet my deadline and it's good enough for my current project requirements.

    For 2) I'm talking about asynchronous loading. The last webGL game I made utilizes this. Basically the way it works in order to load a start menu screen for a webGL game, the user/player only has to download the scene, game objects, scripts necessary for the loading screen starting menu. While the player is on the start menu, the rest of the game is downloading without making the player wait...it's progressive and happening the background. So for a webGL race game that has 10 different scenes or many races, you don't have to wait for all of those separate race scenes and assets to download before reaching the first meaningful content of the first interface (ie The start menu)....With asynchronous loading the theory in terms of WebGL loading speed is that it will load 10-100x (or more) faster to start the game initially...and it can work really well. The new Unity versions might be doing this nowadays behind the scenes more since WebGL for unity came out of experimental. The first game I built in unity was WebGL and was with version 5.2 (I think) and WebGL was still in experimental. Anyways that game does exactly what I described above. It's a crappy and unfinished game really, but it loads really fast for the number of scenes and amount of sound files, game objects etc (about 8 audio files over 30 seconds among other things). https://familycarbuyers.com/cargame/ (loads instantly...on broadband the unity splash screen should take longer than the actual loading..)

    Thank you for your honest and direct answers about the limitations of the current version. Not a problem! Knowing that is really helpful and I still think that even your current version is still the best racing package on the store.
     
  36. Ian094

    Ian094

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

    Cameras are empty child gameObjects of the vehicle with the CameraTarget.cs component attached.

    Each camera has a CameraType that determines which Virtual Camera it will use. For the interior camera, set the CameraType to "Interior".

    The CameraSettings below let you select the audio snapshot used when in this view and whether a UI rear view mirror should be enabled.

    You can test how the camera will look in edit mode by assigning the CameraTarget to a Virtual Camera and pressing the "Solo" button.

    Let me know if this helps.
     
    blakeysal likes this.
  37. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Ok, one quick way to slow down a vehicle would be increasing the WheelCollider's damping rate value.

    That's cool about the WebGL loading times, I think all web based games should load fast. I actually wasn't familiar with this type of loading for WebGL, I'll look into it more.

    Thanks.
     
  38. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    Hello,
    I've tested v2.0 Beta and it is truly amazing. I am about to switch to it in my project (currently I am using v1.x). Physics feels like really improved one and also performance. I don't have (with version 2) some peaks in profiler using it like it was with previous one (mainly because of wheel script, but it is easily adjustible so not a problem at all). Probably I will stay with this physics model instead of RVP2 though.
    Can't wait for it's release
     
    Ian094 likes this.
  39. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    Hello again,
    I've found one interesting bug: after AI car passes finish line, the length of AI Target increases almost 5 times in size and doesn't let AI find a correct path.
    Before (normal state): Issue_1.jpg
    After finish line: Issue_2.jpg
    P.S. Also I've noticed some issues with estimated time to reach another racer, so maybe this bug caused by same thing
    P.P.S. The issue exists also in demo scene with racing track. The reason why it is not noticeable is the lack of really curvy road segments. Also maybe it will be useful, but the targetAheadDistance becomes a constant after passing finish line. I don't think this is serious issue, I assume there is a little mistake somewhere in lapDistance calculation or something
    Super P.S. Holy! Seems like my bad, I found what was wrong. So, turns out, this issue was caused by distance between finish line and start node (actually that huge target distance was a distance between start node and finish line + value from inspector). I repeated tests with finish line moved to the start node and now everything works perfectly.
     
    Last edited: Jul 2, 2018
    Ian094 likes this.
  40. Ian094

    Ian094

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

    Thanks for your feedback!

    There are some known issues with the distance tracking in the beta version that I am working to resolve.

    The first node should be placed in front of the finish line and the last node behind it.

    The AI's target distance may seem to remain constant because they slow down at the end of the race and the target distance is based off their speed - the higher the speed, the further the target is projected. The speed at which the AI drive after a race can be set through the Race Manager's "Post Race Speed" value.
     
    derkoi and kittytrillah like this.
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  42. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @Intense_Gamer94 I'm trying the beta, but can't figure out how to change the camera's far clipping plane. Whenever I change it, it is automatically set back to 2000, but I don't see anything that controls this setting globally. I even searched for 2000 in the entire project, but turned up nothing.
     
  43. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    The far clipping plane can be changed through the Virtual Cameras themselves under "Vehicle Cameras" in the hierarchy.

    Select the camera and adjust the far clipping plane under the "Lens" settings.

    If you are not familiar with Cinemachine, check out the links below:

    https://unity3d.com/learn/tutorials/topics/animation/using-cinemachine-getting-started
    https://forum.unity.com/forums/cinemachine.136/
     
    blakeysal and magique like this.
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @Intense_Gamer94 I'm having an issue in beta version with vehicles. I followed the directions to create a player vehicle. I used the F1 template for an F1 car and assigned the wheels configured as FWD. However, when the car spawns it is rotated 90 degrees incorrectly and it just bounces off the ground and eventually falls through the world.

     
    Last edited: Jul 4, 2018
  45. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    The rotation issue is either because:

    1) The direction the grid position is pointed - indicated by a line.

    2) The rotation of the model itself. Please check that the z axis (blue arrow) faces forwards in both "Local" and "Global" tool handle modes. If the blue arrow does not point forwards then it's a model pivot rotation issue. This can be fixed within the editor by simply parenting the model to and empty gameObject with the correct rotations.

    As for the bouncing, please confirm that the vehicle has a collider added to it. Whenever I forgot to add collider to a vehicle, I got this same issue.
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I thought about that, but when I added a collider, it still did the same thing. I will investigate further.
     
  47. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Ok, let me know if you manage to resolve the issue.

    If you're using a mesh collider, set "Convex" to true.

    If the collider isn't the issue then it must be a wheel collider issue - probably something to do with the mass. Try increasing the mass of the rigidbody to see if it helps.
     
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. That was it.
     
  49. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Now I'm stuck at getting the race to actually start. I configured all the components and my car starts in the right position on the grid, but there's nothing to start the race like I see in the demo scene. In the demo scene the Race Canvas has a lot more stuff than what is created through the Scene Setup, but even if I copy over the Race Canvas from the demo scene I still don't get the Start Race button. The docs don't seem to have enough information to get past this part. The only thing I didn't do yet was to create any AI cars. I just want to try with the player car first.

    [EDIT]
    I also see the demo scene has dependencies on TimelineSequences. I've tried to connect all the dots, but still not getting it to start. I hear countdown beeps, but when the countdown finishes, I get the following error:

    NullReferenceException: Object reference not set to an instance of an object
    TextSwitcherMixerBehaviour.OnGraphStop (Playable playable) (at Assets/Racing Game Starter Kit/Scripts/Playables/TextSwitcher/TextSwitcherMixerBehaviour.cs:69)
     
    Last edited: Jul 5, 2018
  50. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    This is where Timeline comes into play.

    Timeline takes care of the countdown and finishing sequences.

    A Unity Event is triggered in the countdown timeline sequence to start the race.

    To create a countdown sequence simply create an empty gameObject, and add the PlayableDirector component to it. For the playable, assign the "CountownTimeline" (Demo/CommonAssets/Timelines).

    Open the Timeline window and select the event track clip:

    Timeline_1.png

    In the inspector, assign the RaceManager.StartRace function:

    Timeline_2.png

    You can create your own Timeline sequences for the countdown but be sure to call this event for the race to actually start.

    For the finishing sequence, do the same thing but with the "PostRaceTimeline" playable and assign RaceManager.EnterPostRaceState to the event track. The finishing sequence isn't needed and can be left unassigned.
     
    AOEIII150 and blakeysal like this.