Mobile Racing Game Template

Hello,

I’ve been working on preparing a Mobile Ready Racing Game Template for the Unity Asset Store. This asset will be available as a standalone package, and will also be included with Arcade Racer: Racing Game Development Kit as a free upgrade.

Asset Store

This post will be updated as additional content and information becomes available.

A ready-to-edit game template that can be used to create mobile racing or driving games. Includes ready-to-use mobile UI menus and car controller. Customize the included scenes, player/AI prefabs, and UI with your own art, then add your own additional content to make the game yours.

The template contains multiple game-ready scenes and project settings to provide a complete game flow, including: Main Menu, Garage Menu, Open World, Race (can be used as a base to create additional races), Race Victory, and Race Defeat scenes.

Included Template Scenes

Main Menu: Allows the user to load Open World scene, select and load a Quick Race, select and load an Arcade/Championship Series of races, load Garage scene, access Options menu, or Quit the game.

Garage Menu: Allows the user to select/customize cars from their garage, or purchase new cars. Customization options included: changing body paint color, neon light color, rim color, and window tint color.

Open World: A free-roam scene with no rules; the perfect sandbox to start adding your own unique content, building a driving game, or use for whatever your imagination desires.

Race: A template scene that can be customized and used for creating quick races, or races for arcade/championship series.

Race Defeat & Victory: A template scene that can be customized and used for creating unique victory/defeat screens to be shown after each race.

Player Key Features

4 Steering Types: UI Buttons, UI Joystick, UI Steering Wheel, and Accelerometer Tilt; selectable via options menu.

4 Camera Types: Chase, helmet, hood, and look back.

Automatic/Manual Transmission: Selectable via options menu.

UI Mini Map: Toggle on/off via options menu. Toggle fixed or rotate with player via options menu.

UI Rear View Mirror: Toggle on/off via options menu.

UI Dashboard Canvas: World-space canvas for interior view that renders gear text, speed text, mph/kph text, nitro bar, mini map, analog speedometer, analog tachometer (RPM).

IK Avatar Driver: Procedurally animated based on input.

Mirrors: Rearview, left sideview, and right sideview for interior view.

Updated original post with new content and tutorials, preparing for submission.

Version 1.0.0 has been submitted.

Version 1.0 is now available.

Version 1.0.1 submitted.

• Added new garage camera controller, allows the camera to orbit the selected car via touch and drag.

1 Like

Version 1.0.1 is now available.

Version 1.0.2 Submitted.

• Improved pivot for various UI screen elements to provide more accurate auto scaling.

Version 1.0.3 submitted.

• Added ‘Auto Throttle’ option to player prefab, and a button to toggle the option to player UI canvas.

Version 1.0.3 is now available.

I want to add some ai in the OpenWorld scene. I don’t need anything complicated, just a few cars that move around the scene. I see there is an option to create an AI Route( Tools/TurnTheGameOn/Mobile Racing Game Template/Create/AI Route) but I can’t get it to work. Does this kit has the same traffic system the pc version has? If not, do I have another option to set this up?

If you have Arcade Racer, you can use the traffic from that asset (that’s where that menu item came from). In general though, I would recommend Simple Traffic System for mobile since it’s more optimized.

Edited*
That menu item creates a single AI route, that can be built manually, as opposed to the spline route creator which automates waypoint creation. Waypoint routes can be connected to create branching points via assigning waypoints to a waypoint’s OnReachWaypointSettings.NewRoutePoints array.

Version 1.0.4 submitted.

• Converted _RaceTemplate scene’s environment to a prefab, located in DemoAssets folder.
• Renamed PlayerVehicleManager to PlayerCarManager
• Moved DashboardCanvas from UI to CarComponents folder.
• Implemented canCycle option on player cameras, used to filter out registered cameras from being cycled with the cycle camera button, an example is the look back camera.
• Fixed missing SplineRouteCreator example references in QuickRace scene.

I’ve followed this tutorial:

and tried to set up a race in a duplicated _RaceTemplate scene. Everything worked fine until I’ve imported the Simple Traffic System into the project.

Now if I follow the same steps, I get these errors when I try to create ai waypoint routes or spawn waypoints:

1 Like

Thank you for reporting this bug.

For now, you can resolve it by editing MRGTRefs:
Assets\TurnTheGameOn\MobileRacingGameTemplate\Scripts\Static\MRGTRefs.cs

change line 14 from:

var guids = AssetDatabase.FindAssets("t:AssetReferences");

to:

var guids = AssetDatabase.FindAssets("t:TurnTheGameOn.RGTM.AssetReferences");
1 Like

Version 1.0.5 submitted.

• Fixed a bug where skid trails would not render properly.
• Fixed a bug where template prefabs spawned by editor functions would not load if Simple traffic System was also in the project.

1 Like

Version 1.0.6 submitted.

• Fixed a bug where loading into open world without entering the garage would always load the first car instead of the last selected car.

Hello !
Does the race system allow to have the start and arrival point at different places on a map (mission like game, with race from point A to point B, and not # laps based) ?
Is it or will it be possible to have an introduction scene (like mission briefing) before the race as to complete decribed option to have victory/defeat scene for each race (kind of story mode) ?
Thank you

Hi, currently races only work with sequential waypoints.

The race has a pre race countdown timer, you could set that to the length of your introduction and display it on a different camera, once done the cars will be ready to start the race, but I don’t have a dedicated scene like the victory/defeat scene.

1 Like

Hi,
I’ve created some AI routes for a race scene using the Spline Route Creator and added a speed limit to certain waypoints. But when the AI cars get to those waypoints, they don’t seem to be slowing down, causing them to crash.

Am I doing something wrong, or is this a bug? Can you give me an answer, please?