Search Unity

► Racing Game Template ◄

Discussion in 'Assets and Asset Store' started by Stephen_O, Sep 9, 2015.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I'm not sure I fully understand what you'er describing. If you like you can email me to setup a skype call I'm happy to help solve your problem.

    The cars neon light values are saved using PlayerPrefs after an edit has been made in the garage scene and the purchase is accepted by the player. I haven't experienced values being reset or set to null. I'd like to know more about this if you can contact me by email so I can help you solve it.
     
  2. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.052 is now available.

    Version 1.053 is being finalized and will be submitted soon, it will include basic Unity Networking (UNet) Matchmaking functionality that includes a lobby system to create or find games through the matchmaking service. The initial UNet release will allow you choose from a list of open world scenes, set the group size, set the room name, then load your vehicle and group of players that joins you into the scene using the Unity Networking Matchmaking Service; or you can choose to find and join a game that someone else has already created . This functionality is currently being tested with Windows Standalone and Android builds.
     
    Last edited: Feb 15, 2016
  3. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.053 Multiplayer preview, the basic framework is almost ready.
     
    Last edited: Jan 15, 2019
  4. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I finished syncing wheels and IK driver. Still need to setup car material instances then the the network controller prefab will be ready to be merged into the standard car controller prefab. Here's my dev log #9 if you're interested in the progress:
     
    Last edited: Jan 15, 2019
  5. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    The IK driver can be a fairly complex rig if you're not familiar with how some of the components work. I've prepared a tutorial to demonstrate how to change and adjust the driver rig.
     
    Last edited: Jan 15, 2019
  6. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I finished setting up the player controller and synchronizing most of the car components. The brake lights and nitro will be done next, then after some checks & ... the asset update should be ready for submission.
     
    Last edited: Jan 15, 2019
  7. wilxr

    wilxr

    Joined:
    Jul 29, 2013
    Posts:
    16
    Hello, I love how the project is going,I would like more options for the minimap, perhaps somewhat flatter. it would be easier to see the road and the position of other cars. I honestly do not know how to do

    upload_2016-2-20_23-13-10.png
     
  8. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Thanks, I'll try to spend some time on improving the minimap options in one of the future updates. It will most likely be started after UNet updates are finished and a few other improvements/additions are made.
     
  9. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.053 has been submitted. Standard UNet functionality is now part of the car prefabs. I've built a lobby system that I will continue to develop for use with the newly networked cars. You can use this lobby system to spawn cars into an open world game with no rules. Use this to start building your own multiplayer car game with the multiplayer foundation established or as a standard open world scene.

    Over time I will add more UNet functionality, including a more robust lobby with more and better matchmaking features, more gameplay modes including online racing and other things based on your feedback.

    The system has been tested on Android and Windows, including both cross platform as these are currently my development and testing machines.

    The networked cars are designed to run in single player games, there is still only 1 prefab for each of your vehicles :).

    I have 3 notes moving forward:
    • Network Migration Manager - This is a new component I worked with while preparing the UNet Service update. I was not able to get this to work properly in all conditions, it may be a bug or I may not be using it properly. I will be focusing more on this component to bring the network migration functionality to the framework for version1.054 or ASAP.
    • Match Visibility - I was trying to find a built in way of marking matches as private once loaded from the lobby to prevent the match from being listed as available when searching for games. Games also become visible again if the player count is not at max value. I will continue to see if I can access the match data to modify it. I've only been able to alter match info when creating a match. If I cant I will try to request this feature from the UNet devs or build a workaround. This seems like something that should be more accessible and will be a common concern for most any UNet lobby system.
    • UNet is not finished yet. Unity is still working on and improving core functionality. As it's more developed I will incorporate important changes and updates from the system into this template. Find out more about UNet here: https://unity3d.com/services/multiplayer .
     
  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #11
    I started to setup my first car prefab, I'm using a T-Bull car in this video with rims and steering wheel from a GR3D car.
     
    Last edited: Jan 15, 2019
  11. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    hello,

    Can the AI go round obstacles?
     
  12. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hi, AI is not currently smart enough to go around obstacles or overtake other cars, I'll be focusing on this area very soon. However if AI gets stuck, on a wall or in a clustered car crash, they will rotate themselves so they can find a path to continue driving. There is also a basic fallback to move an AI car to the next waypoint if the car that does not reach a checkpoint after a specified amount of time.

    Now that UNet framework and car controller are stable enough, I can focus on some of these other areas. My short list for the next few rounds of updates are AI, adjustable race sizes and merging more of the systems data into scriptable objects.
     
  13. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.053 is now available.
     
  14. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Adjustable race sizes for single player games is nearly complete. Final testing and implementation is being done, the update 1.054 should be submitted in the next day or two.
     
    Brity likes this.
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Here's a Dev Log testing some improved AI behavior and the adjustable race sizes. I've set it so that up to 63 AI opponents can be spawned and tracked.
     
    Last edited: Jan 15, 2019
  16. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev log testing UI racer position updates. When the player drops below 8th place the color is changed to red and the 2 positions above the player are shown instead of 6,7,8 racer positions. All racer data is available for you to create your own logic implementation of a UI position display when more than 8 racers are used as well.
     
    Last edited: Jan 15, 2019
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.054 submitted.
    -Added adjustable racer amount for each race. Single player games can now have up to 63 opponents tracked in real time.
    -When the player drops below 8th place the UI racer position color is changed to red and the 2 positions above the player are shown instead of 6,7,8 racer positions. All racer data is available for you to create your own logic implementation of a UI position display when more than 8 racers are used as well.
    -Added adjustable lap amount for each race
    -Added AudioData scriptable object reference audio files and manage some settings.
    -Improved end of race UI presentation and added AI to take over the players car after completing a race.
    -Improved AI a bit, they are a bit more aggressive and will over take other cars now. More work will be done for the AI in a future update.
    -Tags have been adjusted and are now only used for AI detection, this may be change again in the future.
    -Moved more references to scriptable objects, this will continue to happen until all data references and settings are organized into scriptable objects for easy project management.
     
  18. dennis1980

    dennis1980

    Joined:
    Jun 13, 2013
    Posts:
    16
    Hello, can help she with other car physics, Realistic CarControllerV2 to their intrigue Racing Game Template
     
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I'm thinking about supporting other vehicle physics packages down the line, right now I'm still building framework. When I finish building the framework and optimization I will look more into this.
     
  20. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    are you working on this fulltime?
    it seems like it :)

    you're bringing the goods
     
    Stephen_O likes this.
  21. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Pretty much, I have some small side projects but this is the main focus. I'm glad you're enjoying :) more goodies to come soon.
     
  22. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #14 Adjustable Races through Scriptable Objects, AI Improvements, End of Race Presentation

    This is a video demo of me adjusting the racer amount and lap amount on the race data scriptable object to show how the data is able to be used/adjusted dynamically at runtime to create different types of races.

    The AI now has the ability to overtake other cars, sometimes they just crash as they try to hard. AI also re-position themselves much more efficiently when they are not aligned properly to waypoints or crash. AI will continue to receive more work in the near future.

    The end of race presentation is now much better, AI takes over the players car to continue driving, this make the race ending not feel as abrupt. The UI has also been greatly improved.
     
    Last edited: Jan 15, 2019
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.054 is now available. Lots of improvements and updates.
     
  24. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I made a short tutorial to show visually how some scriptable object data can be adjusted on the fly to change race settings dynamically before the scene loads. This can be used by developers who want to use one scene and have it be multi-purposed. I also go into some detail and show how the racer data can be found so you can reference it to create your own custom UI with your own logic, if you have more than 8 racers in a race or for any other reason.
     
    Last edited: Jan 15, 2019
  25. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Just upgraded to latest one (love the new features) but I am having problems playing the race, looks like the cars dont spawn and it just says the scene is missing a camera. I see this error
    IndexOutOfRangeException: Array index is out of range.
    RG_SceneManager.Awake () (at Assets/TurnTheGameOn/Racing Game Template/Scripts/RG_SceneManager.cs:96)

    Before the upgrade I had a working race. Looks like the racer info isnt set up in the scene manager but even when I assign a car for the player prefab and hit play the same happens. Any ideas?
     
  26. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I got your other messages, it sounds like you have everything working by using the garage manager to configure settings for the races, this resizes the arrays on the scriptable objects and applies the settings you want. Since adding more features this might be becoming less intuitive as it's a child object in the garage now. Soon, I'll be working on a game manager window to make managing settings easier and more centralized.

    I'm glad you're enjoying, let me know if you have any other questions.
     
  27. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Unity Multiplayer Services are now publicly available, this template has received many updates recently including making player car prefabs UNet ready. For more information on Unity Multiplayer Services see this link https://unity3d.com/services/multiplayer .
     
  28. GayanUthpala

    GayanUthpala

    Joined:
    Feb 3, 2016
    Posts:
    8
    What is this error. how can i fix it. Err1.jpg Err1.jpg
     
  29. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    It would be great if cars could avoid each other pretty well :)
     
  30. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    This error is because you're not using 5.3 or above, if you use the newest version of Unity it works fine. 5.3.4 is also most stable version of Unity 5.
     
  31. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I'll be spending some more time with AI this next round of updates, as well as some pre-configured race modes. :)
     
  32. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've created a PDF with many screenshots for step-by-step instructions on changing the avatar and car model. More detailed written instructions will be added over time. This will be added to the asset and also for download here
     
  33. racerwheel

    racerwheel

    Joined:
    Mar 23, 2016
    Posts:
    1
    When the car is turning (steering angle > 0) and I apply brake, the car seems to straighten out by itself. You can see the front wheel angle move to 0 as brake is applied. How can I disable/tweak this behavior? This behavior doesn't seem to exist in the original Unity Standard Assets CarController. I have version 1.054.
     
  34. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hi,

    When I use the brake while turning, the front wheels keep their proper rotation based on input. I think the effect you're noticing could be from the Wheel Colliders friction settings, brake torque or perhaps the drag from Rigidbody.

    Since I started this project I've made many tweaks and changes to inspector properties of the car controller. The main settings I've adjusted for the player car in comparison to the default standard assets vehicle settings are public variables. You can have 2 unity instances open at once, I recommend opening a default stand assets project and the racing template in separate projects, then view the settings for each to compare the differences.
     
  35. the13law

    the13law

    Joined:
    Mar 9, 2016
    Posts:
    2
    Hey TTGO,
    enjoying this assets pack so far, gradually finding my way around it and have added a T-Bull car into the project as per you recommendations.

    Having a couple of issues though, the first is when importing the asset pack into a new project I get the following error originating from Standard Assets\Vehicles\Car\Scripts\BrakeLight.cs (line 14):
    "The type or namespace name 'RG_SyncData' could not be found (are you missing a using directive or an assembly reference?)"

    The project cannot be launched while this error persists, and so far my quick and dirty way around it is just to comment out the line and any code in the file that throws errors after this, (yeah I'm not the best programmer) but a proper fix would be nice since I think this disables brake light effects from networked player opponents.

    The other issue I'm having is with the garage manager, every time I close down Unity it 'forgets' any changes I've made and reverts to the default settings. This is starting to get quite annoying as every time I load it back up I need to go through, rename, change prices and reassign the correct material objects for each car I'm using (since I'm using different models). Looking up unity playerprefs tells me these changes should be stored in the registry? But even running Unity in administrator mode doesn't solve the issue.
     
  36. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hello,

    The brake light problem is likely related to standard assets being imported before or after the racing template, which causes the project to use the wrong brake script. Try to delete the "Assets\Vehicles\Car\Scripts\BrakeLight.cs" script and import racing template again. The proper brake light script should be "RG_BrakeLight" located in the "TurnTheGameOn/Racing Game Template/Scripts" folder. I modified that script but need to update it again to not derive from the original, sorry about this confusion, ensuring there is only the one brake light script in the project will fix this issue.

    As far as the garage manager goes, I will look into the editor managing the settings and see if there's a bug that would cause changes to not be saved properly. If this continues to happen an alternative way of configuring data would be using the scriptable objects directly to modify the settings. In the "TurnTheGameOn/RacingGameTemplate/ScriptableObjects" folder you can make changes to these objects directly without entering the garage scene.

    The garage manager references these scriptable objects and manages changing the data. I have a short list of updates in progress, after they are finished I plan on creating a new data manager window for all game settings to replace the garage manager.

    Sorry for any inconvenience, if you continue to encounter any problems send me an email and I'd be happy to help get you going through Skype.
     
  37. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #15 Advanced AI Sensor Rig Initial Thoughts

    In this video I describe my initial thought process for building a more intelligent and modular AI sensor detection system. This system is being built to replace the current sensor system in the Racing Game Template, allowing for a more robust array of data to be gathered and used for AI vehicle behavior logic.
     
    Last edited: Jan 15, 2019
  38. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.055 submitted. The price will also be increased to $100 USD.

    • Added "Wrong Way Message" timer delay
    • Added UNet server selection to options menu. This can be used to connect to a specific matchmaking server for multiplayer games instead of the default server (closest server). The servers currently available are EU, US and AP.
    • Moved the "Options Menu" from Main Menu to the "Garage Menu".
    • Adjusted mini map Mask
    • Removed unused files
     
  39. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #16
    Testing the car controller and graphics quality settings.
     
    Last edited: Jan 15, 2019
  40. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #17
    About my prototye progress and open world scene.
     
    Last edited: Jan 15, 2019
    radiantboy likes this.
  41. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've started to write a new editor window to manage all the project's settings in 1 location, in doing this I've found the cause data on scriptable objects to be reset. I apologize to anyone experiencing this, the new editor is being finalized and will be included in v1.056 which will be submitted after v1.055 is approved later this week.
     

    Attached Files:

  42. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Dev Log #18
    In this video I talk about scriptable objects and the new editor window that will be used to manage all of the game's project settings. I also do a short demo on how to reference and assign data from scriptable objects.
     
    Last edited: Jan 15, 2019
  43. the13law

    the13law

    Joined:
    Mar 9, 2016
    Posts:
    2
    Ahh excellent, glad to hear it, I especially look forward to that version then.

    Just as an update, the RG_brakelight issue I was having was fixed by removing the version from standard assets as you suggested.

    And one last thing you may be interested in/glad to hear.
    I used the iOS builder in Unity to make an xcode project, then transferred that to a mac and after setting the project to only use ArmV7/7s architecture (Unity iOS builder is quite out of date it seems and doesn't support 64bit architecture) I successfully installed a copy of the project to my iPhone 6s. It runs a bit choppy at times but I'll attribute that to the iOS builder being out of date and essentially having to convert C# and directX code to ObjectiveC and openGL. Touch and motion controls all work perfectly however and I'd argue that the analogue steering input from the motion steering makes it play a lot nicer too.
     
  44. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've replaced the brake light script in v1.055 so that conflict with Standard Assets shouldn't happen again. Over time I plan to pull other modified scripts out of standard assets and rewrite them and the rest of the project into a unique namespace to avoid any type of standard assets conflicts.

    It's nice to hear about the IOS working out well, I don't have the apple hardware to test on so I can't offer much support in that area; my hope was if anyone tries to use mac or ios it would all work.
     
  45. eager

    eager

    Joined:
    Nov 23, 2010
    Posts:
    12
    Does this Multiplayer can be implemented on dedicated server or it only run on a Unity Multiplayer Service?
     
  46. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    The multiplayer features use the unet matchmaking service. Maybe somewhere down the line I'll add support for dedicated servers.
     
  47. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.055 is now available.
     
  48. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.056 has been submitted
    • Added new Editor Window to manage all Racing Game Template configuration settings. Open from the Unity Toolbar "Window/ RGT Settings".
    • Added following categories to the RGT Settings Window: Audio, Input, Races, Player Cars, AI Cars and PlayerPrefs.
    • Updated Garage Manager in the Garage Scene, many configuration settings have been moved to the RGT Settings Window, including races, player cars, and deleting PlayerPrefs data.
    • Added more Input configuration settings to account for input functionality, these can be found in the RGT Settings Window under the Input category.
    • Added options for Joystick inputs in addition to keyboard inputs.
    • Basic joystick input has been configured.
    • Extended the Input Manager to be editable from the RGT Settings Windows Input menu.
    • Removed unused Input Manager configurations.
    • Added update button to Configure Race/Car size property fields, this will prevent array from being re-sized unintentionally.
    • Improved Audio menu management menu.
    • Added confirm deletion prompt when deleting PlayerPrefs data.
    • Scriptable Objects have been moved to the Resoures folder.
    • Fixed bug causing some changes made to not be saved when Unity is closed and reopened.
    • Updated some networking scripts to remove console warnings about unused variables.
    • Reduced Ethan's texture sizes from Standard Assets to reduce the asset size. You can reimport these from standard assets if you want to use Ethan and the higher resolution textures.
     
  49. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    New menu layout and graphics improvements comming in 1.057. Video preview:
     
    Last edited: Jan 15, 2019
  50. mahdijj

    mahdijj

    Joined:
    Sep 24, 2015
    Posts:
    31
    hi
    android demo is not smooth on my htc one
    i think fps of game sometimes is low
    can you resolve this problem
    i am interested to your template.and i want buy it
    pls create a roadmap for your template if is possible
    thanks