Full notes
Full City-Racing update
Read the full published notes in a cleaner layout. The original post stays linked below.
What changed
- Gameplay
- Fixes
City-Racing changes
The Problem We Solved
All AI cars (truck, F1, etc.) were sharing the same single waypoints container in the hierarchy. The learning system was writing learned targetSpeed values back into those shared waypoints — so:
·The F1 would lower a corner speed to 60 km/h because the truck couldn't make it.
·Then the F1 would push it back to 120 km/h and the truck would fly off.
·They were constantly overwriting each other's learning on the same data.
·The "main" designer-tuned waypoints got polluted permanently.
A truck and an F1 physically cannot take the same corner at the same speed — so they shouldn't be sharing the same learned numbers.
What We Did (in CRAILearningSystem.cs)
Introduced a per-car runtime waypoint container
Added two new inspector fields:
· usePerCarWaypoints (bool, default true)
· blendWithMainGuide (0–1 slider, default 0.15)
And two private references:
· mainWaypointsContainer — the original shared container, now treated as a read-only guide.
· perCarWaypointsContainer — a runtime clone that only this AI car uses.
New method CreatePerCarWaypointsContainer()
On Start(), before any learning kicks in, each AI car:
·Looks up the shared container assigned on its RCC_AICarController.
·Creates a brand-new GameObject named exactly Waypoints, {SceneName}, {CarName} (e.g. Waypoints, CityRacing1, F1).
·Adds an RCC_AIWaypointsContainer to it.
·Clones every waypoint (position, rotation, targetSpeed, radius) as a child RCC_Waypoint.
·Re-points aiController.waypointsContainer to this new per-car container.
·If the same-named container already exists in the scene (respawn case), it reuses it instead of duplicating.
From this point on, every existing line that writes waypoints\.targetSpeed = ... automatically writes to the per-car copy, never the shared one. No other code had to change.
Compromise with the main guide
At the end of AdjustWaypointSpeedAggressive, after clamping the new speed, we lerp it toward the main guide's targetSpeed:
newSpeed = Mathf.Lerp(newSpeed, guideSpeed, blendWithMainGuide);
This is the "compromise" you asked for — each car learns its own speeds but never drifts too far from the designer's base profile. Set blend lower for more freedom, higher to stay closer to the original.
Save/Load already keys per car + per scene
SaveLearningData() and LoadLearningData() were already keying by
SceneManager.GetActiveScene().name
+
aiController.CarController.name
, so no changes were needed there. Now they correctly resume each car's individual learning at race start, and save it at race end via OnRaceFinished().
Fixed the truncation bug
The big edit accidentally dropped the class's closing} and the three [Serializable] data classes (LearningData, VehicleLearningData, PassData) at the bottom — that caused the cascade of CS1513 and CS0246 errors. Restored them and the file now compiles clean.
Why It's Better Now
| Before | After |
| One shared waypoints list for all AI cars | Each AI car has its own runtime copy: Waypoints, {Scene}, {Car} |
| Truck and F1 overwrote each other's learning | Truck learns truck speeds; F1 learns F1 speeds |
| Main waypoints got permanently mutated | Main waypoints stay pristine — used as the guide only |
| Hierarchy was confusing — couldn't tell what was learned | Hierarchy now shows one container per car per scene, easy to inspect |
| No safety net for runaway learning | blendWithMainGuide keeps each car honest against the base profile |
| Save/load mixed everyone's data into one file structure | Same save file, but each car's data is correctly isolated and re-applied to its own per-car container |
What You'll See in the Hierarchy at Runtime
Waypoints ← your original shared "guide" (untouched)
Waypoints, CityRacing1, Truck ← truck's personal learning copy
Waypoints, CityRacing1, F1 ← F1's personal learning copy
Source
Changelog.gg summarizes and formats this update. How we read updates.
