Toy Ramps Unity Racing Game Source Code

$34.00

  • 100 levels
  • 5 rooms
  • Power-ups
  • Documentation
Categories: ,

Description

Toy Ramps Unity Racing Game Source Code is a complete portrait 3D toy-car stunt racing template for Unity 6 (6000.0 LTS) and URP 17, made for Android and iOS. Little toy cars race down giant plastic stunt tracks that wind through a house: off the bed, along the kitchen counter, around the sofa, over the bathtub and out into the garden. It is played with one thumb: the car accelerates by itself, the player drags to steer, launches off kickers, flips and rolls in the air, lands cleanly for nitro and tries to beat three rival toy cars to the finish line. A race lasts about 25 to 70 seconds.

The core loop: the home screen shows the player’s car turning on a toy podium in the current room; Play starts the next level. The camera flies in over the start grid, then 3-2-1-GO (during the countdown a Rocket Start can be bought with a token or a rewarded ad). On the track the player steers, jumps, does tricks, collects coins, hits boost pads, grabs nitro cans and power-up capsules and dodges the room’s obstacles; a fall off the track respawns the car at the last checkpoint. The results show the place, the level’s three star objectives, the trick score and the coins (place reward + picked coins + trick score / 100), with x2 coins for a rewarded ad, then Next, Retry or Home.

Each room has 16 Races (against 3 rivals, cleared by a top-3 finish), 3 Stunt Shows (levels 5, 10 and 15: solo score attacks with three score thresholds) and a Championship (level 20: tougher rivals, a longer track, the player starts on the outside, only a win clears it). Winning a Championship opens the next room and gives that room’s Legendary car.

The twist is the air game. In the air the same drag becomes a rotation: up is a front flip, down a back flip, sideways a barrel roll, and letting go hands the car to a landing assist that levels it for the touchdown. Front and Back Flips pay 300 points per rotation, a Barrel Roll 250, Big Air (1.4 s in the air) and Long Jump (40 m) 150 each, gliding with Wings 50 per second, and every extra rotation in one jump adds 50 %. A Perfect landing keeps the speed, gives a short boost and a third of a nitro charge and multiplies the jump’s points by 1.5; a Good landing keeps 85 % of the speed; a bad angle is a Crash that tumbles the car for a second and loses the jump’s points.

Every trick jump landed within 5 seconds of the last one raises the combo, up to x5. The nitro meter holds 3 charges (one at the start) and fills from trick points (one charge per 1,000), Perfect landings and nitro cans; one charge is a 1.4 s boost at 1.3 x the target speed. A Perfect double back flip with Big Air on a x2 combo pays 3,375 points.

Four power-ups come in capsule rows on the track: Wings (10 s; gravity x 0.35 off a kicker and Glide points – the only way across a “wing gap”, which always has a Wings row before it), Rocket (2.5 s at 1.6 x speed), Magnet (7 s, pulls in the coins within 6 m) and Shield (8 s; no bumps, no obstacle hits, and one crash turns into a Good landing). Magnet and Shield last 0.7 s longer per upgrade level. Tracks also have loops and corkscrews that hold a fast enough car, bridges without rails, sticky syrup and mud, slippery soap and puddles, boost pads, checkpoints and at most one gem per level on a risky line (81 of the 100 levels have one).

Each room has four of the five obstacle kinds (Block, Bumper, Swinger, Spinner, Mover) in its own style: toy blocks, bouncy ball, wind-up robot, whisk, ladle, book stack, desk fan, robot vacuum, rubber duck, toothbrush, shower head, flower pot, beach ball, sprinkler, toy tractor …; an obstacle never stops a car, and a fairness check makes sure every obstacle row leaves a free lane at every moment.

The three AI rivals drive the same deterministic race simulation as the player. Each rival’s brain thinks every 0.1 s: it plans its line over the road ahead (through moving obstacles as a path over time), goes for pads, cans and capsules, plans its tricks from the predicted air time and fires nitro where it is not wasted. A skill value from 0 to 1 shapes its reaction time, steering wobble, look-ahead, trick appetite, mistakes, hurried landings and nitro patience; rival skill rises with the level, Championship rivals are tougher, and a light rubber band (at most 3 %, never within 50 m of the player) keeps the pack together.

Rivals get names from 40 toy-box nicknames and drive other cars in random paints. Measured with the shipped numbers, a normal player wins 28 to 59 % of the races by room and finishes in the top 3 in 80 to 98 %; the perfect bot wins practically all of them.

The Track Builder (open after room 1 level 3) lets players build their own toy tracks: 8 save slots, 23 pieces in five groups (straights and a bridge, 45 and 90 degree turns and banked turns, spirals and slopes, small, medium and large jumps, a drop and a wing gap, a loop, corkscrews and bumps), an extra per piece (coins, boost pads, a nitro can, Wings, Rocket, Magnet, Shield or a room obstacle), any unlocked room as the theme, and an orbit camera. Pieces are added at the end like a real toy track; a ghost shows each piece in green or red (a jump with its landing speed), and a piece is refused with the reason when it would overlap the track, leave the 600 x 600 m area, go too low or too high or make a jump or loop the default car cannot handle. Before a Test Drive or a Race (against three rivals) a bot drives a test lap.

Every track has a share code: “TR1-” followed by letters and digits with two check characters, about 49 characters for a 20-piece track and about 129 for the longest one, short enough to paste into a chat; Import refuses broken codes, codes from a newer version and tracks that break the rules. Custom races pay picked coins, trick score / 200 and a quarter of the place coins, and count for missions and achievements.

The content: 5 rooms (Bedroom, Kitchen, Living Room, Bathroom, Garden) with their own track colors, floors, walls, light, fog, post-processing, props, landmarks, music loop and ambience; 100 levels (5 x 20) planned by the included track generator from 27 segment types and checked by a bot that must win without a crash or a fall, land every jump and hold every loop, while a weak rival must finish within 1.8 x the bot’s time; 20 toy cars in four rarities (7 Common, 5 Rare, 3 Epic and 5 Legendary Championship cars) with Speed, Accel, Handling and Air stats; 12 paints with plain, racing-stripe, flame, checker and animated rainbow patterns, Chrome and Gold metallic; 5 upgrades with 10 levels each (Engine, Grip, Nitro, Magnet, Shield); Endless “Toy Box Run” (a new room every 900 m, harder over the first 3 km, one life and one revive by rewarded ad); a Daily Track (the date picks the room and the 900 m track, so every player races the same one that day, paid by place: 300 coins and 15 gems for the win); English and Turkish texts (657 strings).

Around the races: 3 daily missions from 15 templates (one swap a day for a rewarded ad, a 10-gem bonus for all three), 33 achievements with gem rewards, a 7-day login reward (with the Fire Truck on day 4 and the Rainbow paint on day 7), a spin wheel with 8 slices (free every 22 hours, up to 3 extra spins a day by ad), Rocket Start tokens, the garage with a live 3D preview, stat bars and paint swatches, the map with room cards and level nodes, a shop (Remove Ads, a Starter Pack, three gem packs, three coin packs for gems, 5 free gems every 4 hours by ad, Restore Purchases), a guided tutorial race and one-time hint cards, and settings for sound, music, vibration, language, steering sensitivity (low, normal, high), the privacy policy and reset progress.

Controls: drag left and right anywhere outside the buttons to steer (a touch that starts on a button never steers); in the air drag up, down or sideways for flips and rolls (a gesture locks to one axis, so a flip does not wobble into a roll); let go to land; the NITRO button fires a charge. In the editor A / D or Left / Right steer and roll, W / S or Up / Down flip, Space fires the nitro and Esc pauses. The Android back button closes the top popup, pauses a race and (pressed twice on the home screen) quits; leaving the app pauses and saves. Haptics on iOS (UIFeedbackGenerator plugin) and Android (vibrator), switchable in Settings.

This whole Unity racing game template is built from code. Editor builders turn C# tables into the data assets, materials, post-processing profiles, fonts, effects, prefabs, the UI and the two scenes (Toy Ramps > Setup > Run All Setup Steps, then Toy Ramps > Build > Build Everything regenerates them), every gameplay number is a field default in GameConfig.cs, the content tables live in EconomyDefaults.Tables.cs and every price and payout formula in EconomyFormulas.cs. The generators ship with the template: Blender 3.6 Python scripts for the 146 FBX models, a Python synthesizer for the 53 sound effects (64 files with variants), the 8 music loops and the 8 ambience loops (no samples), a Python palette generator for the 256 x 256 palette every model is colored from, C# signed-distance-function drawing code for the UI sprites, icons, logo and app icon, an icon baker that renders the car portraits and room thumbnails from the real models, and the track generator and level validator that plan and race the 100 levels.

The track meshes are built at runtime from each level’s stored layout. The race simulation and the track generator are plain, deterministic C# with no Unity physics, so the same code also runs outside Unity in the included command-line race simulator (plan, race and validate levels, tune the rivals, check the economy, read share codes, draw pictures of tracks).

Ads and in-app purchases sit behind interfaces with working mock services, so every flow runs in the editor without any SDK: rewarded ads for x2 race coins, the Endless revive, extra spins, free gems, a Rocket Start or a Rocket retry after a 4th place, a Daily Track retry and the mission swap; an interstitial only when the player leaves a results screen (from the 4th finished race, at most every 2nd race and 60 seconds apart, never within 60 seconds after a rewarded ad, never before or right after the tutorial race, never with Remove Ads); Remove Ads, a Starter Pack and three gem packs as in-app purchases. An AdMob adapter compiles with the TOYRAMPS_ADMOB define once the buyer installs the Google Mobile Ads Unity plugin v9 or newer; it asks for consent with Google’s User Messaging Platform, puts the privacy options form behind the Privacy button in Settings where the player’s region requires it, and has settings for child-directed treatment, under the age of consent and the maximum ad content rating.

A Unity IAP adapter compiles by itself when com.unity.purchasing 4.14 or a newer 4.x version is installed (4.14 ships Google Play Billing Library 8, which Google Play requires; Unity IAP 5 has a different API and needs its own adapter). Both are switched on in one config asset, and a release check warns before a store build about every placeholder still left (mock services, test ad ids, the template bundle id, save key and privacy URL).

NOT included: online play of any kind – no multiplayer, no online leaderboards, no accounts, no cloud save and no server (share codes are text that players paste themselves); no analytics SDK (game events are ready as hook points); the ad and store SDKs themselves. Version 1 is set up and documented for Android and iOS in portrait; the keyboard controls and the desktop window are for testing in the editor, and there is no level editor scene – the levels come from the generator and can be hand-tuned in the Inspector, and players build tracks in the in-game Track Builder.

934 edit mode test cases (track geometry and rules, the generator, the car simulation, the rival brain and the level validator, level balance and economy, every meta service, saving, monetization, data and texts, the Track Builder and its share codes, the world views, effects, prefabs and UI) and 27 play mode test cases are included: a normal run executes 932 edit mode cases (2 explicit ones race all 100 shipped levels and plan and race all 100 levels again) and 21 play mode cases (smoke tests that boot the real scenes and play the tutorial race, every home screen panel, Endless with a revive, a Daily Track, the garage and the Track Builder through the UI, plus the test helpers); 6 explicit play mode cases (5 screenshot tours and a soak run that clears all 100 levels, 3 km of Endless and a Daily Track through the real UI) run when selected.

Everything was written and generated for Toy Ramps. Third-party content is limited to fonts and Unity’s own TextMesh Pro resources: Paytone One (SIL Open Font License 1.1, license text next to the font) and the LiberationSans font of Unity’s TextMesh Pro essential resources (SIL OFL 1.1, license text included); those resources also hold Unity’s unused sample emoji sheet (EmojiOne, with its attribution file). No SDKs and no Asset Store packages are included or required. Full documentation: a start-here README, a 14-chapter manual with a step-by-step release guide for Android and iOS, a gameplay reference with every rule and number (GAMEPLAY.md), a developer guide (ARCHITECTURE.md) and the game design document (DESIGN.md).

Requirements

  • Unity 6000.0.85f1

Reviews

There are no reviews yet.

Be the first to review “Toy Ramps Unity Racing Game Source Code”