- Cars that crashed off the edge of the map at high speed would fall forever - 24 July 2026
Fixed:Cars that crashed off the edge of the map at high speed would fall forever — they now automatically reset back to the last checkpoint you passed.Fixed a bug where a crashed car resting on its side or upside-down could get stuck with the camera flickering/glitching instead of recovering. Flipped cars now reliably right themselves and return to the track within a few seconds.Fixed a potential build-stability issue in the city traffic system that could have caused compile failures in future builds.Technical changelog (for you)Player recovery system (CRCarInfo.cs)New: player car falling below the map (Y
- Repair Stations - 26 June 2026
added more repair stations around all the race tracks, also re-posisioned the other stations, to the waypoint path for the AI Cars. Like the long race track also of AI cars would get damaged and not make it to the next repair station, so I added more stations aroound all the race tracks.
- Now we also needed to tighten the IsCarAhead - 13 May 2026
Looking at the current implementation, awareness has two problems that cause clumping:1.The "in-path" test is too wide — a 35° forward cone within 35 m means any traffic car roughly in front (even one or two lanes over) triggers a slow-down. So, when a pack of city cars is around, the AI brakes for cars it could just drive past.2.The cap fires even when there's a clearly open overtake lane — so the AI matches the slow car's speed (~36 km/h) instead of swinging into the free lane and blasting past.Fix: tighten the geometry to "in my lane" only, and don't apply the speed cap if an adjacent lane is open (let the lane-selection logic do the dodging instead). I'll also raise the default headroom, so the AI keeps enough momentum to actually pass.Now we rewrite ScanForTrafficCars to (1) only consider cars in our actual lane (lateral check), and (2) skip the speed cap if there's a free adjacent…
- added a real lane‑offset field and use it when building the per‑car waypoints - 4 May 2026
Let me explain the issue clearly:Why the cars still drive in the center: The field perfectCenteringDistance is not a lane offset — it's just the tolerance the learning system uses to score whether a pass through a waypoint counts as "perfect" (within X meters of the waypoint). Setting it to 5 just makes the scorer more forgiving; it doesn't move the car off the road centerline.The AI follows whatever positions are stored in the per-car waypoints container, and CreatePerCarWaypointsContainer() clones waypoints with src.transform.position — i.e., dead center of the road. To put cars in the right lane I need to add a real lane offset that shifts each cloned waypoint perpendicular to the road direction.TrafficCar interaction: The methods tc.GetSpeed() / tc.IsHazard() exist and the scan logic is fine. The reason it can look "broken" today is that AI cars are driving on the centerline, so the…
- breakdown of the three big upgrades - 24 April 2026
🏎️ Recap: What We Just Did to CRAILearningSystem.csHere's a breakdown of the three big upgrades and why each one makes the AI noticeably better.---1. 🗑️ Killed the global minWaypointSpeed / maxWaypointSpeedBefore: Every car on every track was hard-clamped between two magic numbers (e.g. 30–250 km/h) in the inspector. A Formula car and a city sedan got the same ceiling, and a tight roundabout had the same floor as a freeway.After: Bounds are derived per-waypoint from baseSpeed (the designer-tuned value cloned into the per-car / dynamic container):·Sharp corners: ceiling shrinks toward 0.85 × baseSpeed·Straights: ceiling opens up to 1.4 × baseSpeed·Floor: 0.4 × baseSpeedWhy it's better: The dynamic per-car waypoints are now the single source of truth for "how fast is reasonable here." No more babysitting two sliders per scene/car combo, and a hairpin literally can't be clamped at the sa…
- New Waypoint FIX BIG Change!!!! - 23 April 2026
The Problem We SolvedAll 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)1. Introduced a per-car runtime waypoint containerAdded two new inspector fields:·usePerCarWaypoints (bool, default true)·blendWithMainGuide (0–1 slider, default 0.15)And two private references:·mainWaypointsContainer — the ori…
- Advanced Lane and Traffic Rule Awareness - 21 April 2026
What We Did Today:1. Advanced Lane and Traffic Rule Awareness• Integrated your city’s map/road data (tsActive, tsOneway, tsOnewayDoubleLine, etc.) into the AI system.• Wired up the AI to use this data for smarter, more realistic driving:• No overtaking on double lines (AI respects no-passing zones).• No wrong-way driving on one-way streets (AI follows correct traffic flow).• Skips inactive/closed waypoints (AI avoids blocked or closed roads).2. Robust Data Access• Ensured the AI accesses the correct shared waypoint data (wpData) from the city’s TrafficSystem.• Added a public getter to TrafficSystem so any AI can safely access the latest map/road data.3. Persistent AI Learning• Improved the AI’s ability to save and load learned driving data (like optimal speed per waypoint) for each vehicle and track.• Now, when a race starts, the AI loads what it learned from previous races and applies…
- New Systems - 15 April 2026
What We Did· Lane Commitment Logic:· We introduced a system where, once an AI car selects an open lane, it “commits” to that lane for a minimum amount of time (or until it becomes blocked), instead of constantly re-evaluating and switching lanes every frame.· Safe Lane Selection:· We added logic to ensure the AI only commits to a lane if it is both open and safe (not too close to the road edge or hazards like telephone poles, hydrants, or parked cars).· This uses a buffer check and a dedicated hazard layer mask.· Bounds Checking:· We added checks to prevent the AI from trying to steer to an invalid lane index, which prevents errors and ensures the car always has a valid target.---Why We Did It· Reduce Erratic Steering:Previously, the AI would constantly try to return to the center or switch lanes too frequently, causing unnatural “back and forth” steering, especially when open lanes wer…
- New Script Learning system and lane changing system - 10 April 2026
What was added:·Lane center calculation based on waypoint and lane width.·Lane detection for the AI car.·Lookahead logic for all 4 lanes.·Example lane selection and steering target.·Optional debug visualization.This will make your AI cars aware of all lanes and able to select the best one based on traffic ahead. Let me know if you want this integrated with your actual steering logic or need further customization! Did we not add the actual steering logic? I thought it was working already! Please code this function so the AI Cars know and use the empty lanes to drive better. What Was Added· Lane Center Calculation:· The system now calculates the world positions of all 4 lane centers at each waypoint, based on the waypoint’s position and the road’s width.· Lane Detection for AI Cars:· Each AI car determines which lane it is currently closest to, so it knows its position relative to all lan…
- logic to store the player’s current camera position and rotation right - 9 April 2026
· Camera View Storage:· We added logic to store the player’s current camera position and rotation right after the intro text finishes scrolling, while the player is still driving.· Car Showcase Sequence:· The camera smoothly transitions to each car in your showcase, following each car as it moves.· The car information UI is positioned above each car and follows it in real time.· Camera Restore:· After all cars have been showcased, the camera is restored to the exact position and rotation it had before the showcase started.· This means the player resumes with the same camera view they had before the sequence, with no need to manually adjust the camera.---How It Works Now·During the intro text: The player can drive their car, and the camera behaves as normal.·When the car showcase starts: The system saves the current camera view, then cycles through each car, following and displaying info…
- class controls the behavior of a police (or enemy) helicopter in your game - 9 April 2026
What the CRHelliControl Class DoesThis class controls the behavior of a police (or enemy) helicopter in your game. It manages:• Following the player (whether in the car or on foot)• Coordinating with other helicopters to surround the player (front, back, left, right)• Displaying warning messages to the player• Deciding when to shoot missiles at the player or their car• Reacting to player actions (driving, stopping, attacking the helicopter)• Handling damage and retaliation logic---How the Class Works (Key Sections)1. Initialization• Sets up message styles for GUI/TextMeshPro.• Registers the helicopter with a coordinator (if present) to get its assigned position (side) around the player.• Sets the initial target (the player’s car) and health.2. Target Tracking• The helicopter always tracks either the player’s car or the player on foot.• If the player gets out of the car, the helicopter t…
- How CRAILearningSystem Works - 8 April 2026
How CRAILearningSystem WorksPurpose:CRAILearningSystem is an adaptive AI system for racing games. It enables AI cars to learn the optimal speed for each waypoint on the track by analyzing their own driving performance in real time.Key Mechanisms:1. Waypoint-Based Learning:• The system tracks each waypoint on the racing track.• For every waypoint, it stores learning data: optimal speed, how well the car passed the waypoint, if it overshot, understeered, or was perfect, and more.2. Performance Monitoring:• As the AI car drives, the script monitors how close the car passes to the center of each waypoint.• It detects if the car overshoots (goes too wide), understeers, or passes perfectly.3. Adaptive Speed Adjustment:• If the car consistently overshoots or understeers at a waypoint, the system reduces the target speed for that waypoint.• If the car passes perfectly, the system increases the…
- updated the mileage tracking system - 24 January 2026
Key Improvements:1.Per-Lap Mileage Tracking: Now tracks currentLapMileage and stores each lap's mileage in lapMileages list2.Track-Based Session Management: New TrackMileageRecord class groups all sessions per track3.Session Numbering: Each race on a track gets a sequential session number (1st, 2nd, 3rd attempt, etc.)4.Enhanced CSV Export: Includes per-lap data with proper headers and metadata5.Data Versioning: Both MileageDatabase and RaceHistory now have version fields for future migration6.Clear Data Separation: Track name stored in every session, preventing confusion when restarting7.Improved Diagnostics: Shows current lap mileage in real-timeThe CSV export now looks like:# Race Data Export# Racer: MuscleCarClassic# Track: CityRacing1# Session Number: 1# Date: 2025-01-23 14:30:00# Total Race Time: 180.500 seconds# Total Race Mileage: 5.234 miles#Lap,LapTime(sec),LapMileage(miles),Ra…
- Update for Highway track also changed CRCarInfo for AI - 23 January 2026
On the CR-Highway track/race I changed the amount of laps to complete to 1. was 3 like every other racetrack. Also changed in every scene/track/race in CRCarInfo for AI cars optimized.
- Waypoint Reservation System And real-time adaptive learning system - 9 January 2026
1. Waypoint Reservation System·Added WaypointReservation class to track which AI car occupies each waypoint·Thread-safe using lock (reservationLock) for concurrent access·Reservations have timestamps and expiration logic to prevent deadlocks2. Reservation Management·ReserveWaypoint(): Attempts to reserve a waypoint for this AI car·ReleaseWaypoint(): Releases a specific waypoint reservation·IsWaypointAvailable(): Checks if a waypoint can be used·Automatic cleanup of expired/invalid reservations via CleanupExpiredReservationsCoroutine()3. Queue-Based Repositioning·RepositionAICarWithQueue(): New coroutine that searches for free waypoints·Searches forward (for missed waypoints) or backward (for stuck situations)·Waits up to maxWaitTimeForWaypoint seconds before forcing a waypoint·Prevents multiple AI cars from spawning at the same waypoint simultaneously4. Automatic Waypoint Tracking·When…
- Waypoint Reservation System , Reservation Management, Queue-Based Repositioning - 8 January 2026
Key Changes Made:1. Waypoint Reservation System· Added WaypointReservation class to track which AI car occupies each waypoint· Thread-safe using lock (reservationLock) for concurrent access· Reservations have timestamps and expiration logic to prevent deadlocks2. Reservation Management· ReserveWaypoint(): Attempts to reserve a waypoint for this AI car· ReleaseWaypoint(): Releases a specific waypoint reservation· IsWaypointAvailable(): Checks if a waypoint can be used· Automatic cleanup of expired/invalid reservations via CleanupExpiredReservationsCoroutine()3. Queue-Based Repositioning· RepositionAICarWithQueue(): New coroutine that searches for free waypoints· Searches forward (for missed waypoints) or backward (for stuck situations)· Waits up to maxWaitTimeForWaypoint seconds before forcing a waypoint· Prevents multiple AI cars from spawning at the same waypoint simultaneously4. Autom…
- COMPREHENSIVE ANALYSIS: Spacebar Skip Issues in City Racing - 7 January 2026
COMPREHENSIVE ANALYSIS: Spacebar Skip Issues in City RacingBased on my analysis, I found 4 main locations where spacebar input can incorrectly skip races/scenes:1. CRLevelLoader.cs ✅ (Already has proper context-aware skip system)·Lines 134-187: Has proper scene type checking·Lines 272-335: HandleSkipInput() correctly blocks racing scenes·Status: This is correctly implemented with keyboard-only input in camera fly-through scenes2. CRIntro1.cs ⚠️ (Needs fixing)·Lines 548-577: HandleInput() method allows spacebar to skip in ALL scenes·Problem: The space bar triggers TogglePause() which can interfere with race flow·Line 564-571: Controller "B" button skip can conflict with handbrake during races3. CRRaceManager.cs ⚠️ (Needs fixing - has 2 problematic coroutines)·Lines 526-597: WaitForManualContinueInput() - Runs in camera scenes but could be called incorrectly·Lines 603-628: WaitForPlayerIn…
- New Unity 6000.0.64f1 & Good Build Back And Fixed Full screen Exclusive. - 7 January 2026
So it run fast again. and Fixed Full screen Exclusive. Installed And Converted City-Racing Unity 6000.0.64f1. Updated All logos to reflect assets.
- Added scripts for fun and Simulation behavior and Updated All Assets To Current - 7 January 2026
All the assets City-Racing is running 1. Crest Water 5 (Oceans, Rivers, Lakes) 5.6.62. Easy Weapons 3.2.03. Realistic Car Controller 4.5.0Key Features:Added A script for fun behavior to add more torque/speed and Simulation Better Grip 1. Enhanced Grip·Increases forward friction for better acceleration (30% boost by default)·Increases sideways friction for better cornering (25% boost by default)·Separate bonuses for front/rear wheels to balance handling2. Reduced Slip·Reduces slip thresholds by 25% (configurable)·Prevents excessive wheelspin and sliding·Makes the car more predictable and controllable3. Enhanced Stability·Increases traction helper strength·Improves steer helper for better stability·Optional anti-roll enhancement for less body roll4. Simulation-Specific·Only activates when "Simulation" behavior is selected (index 0)·Automatically restores original values when switching beh…
- Added Obstacles to the CR-Highway Track - 5 January 2026
added Hammer Obstacles to the CR-Highway Track! I hope its not to hard and will adjust them.