Full notes
Full City-Racing update
Read the full published notes in a cleaner layout. The original post stays linked below.
What changed
- Gameplay
Key Changes Made:
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 deadlocks
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()
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 simultaneously
Automatic Waypoint Tracking
· When an AI car progresses to a new waypoint, it automatically releases the old one and reserves the new one
· Handles OnDisable/OnDestroy to clean up reservations when cars are removed
Configurable Parameters
· maxWaitTimeForWaypoint: How long to wait for a free waypoint (default 5s)
· reservationTimeout: How long reservations are valid before expiring (default 15s)
This system ensures AI cars won't collide during repositioning and prevents all cars from spawning at the same waypoint!
Source
Changelog.gg summarizes and formats this update. How we read updates.
