Dev Log 4 - 3D car game.
The project has moved beyond a simple driving prototype into a more advanced 3D traffic simulation. The system now supports imported car models, a working camera control system, and improved AI traffic behaviour. The focus has shifted from basic movement to building a more structured traffic environment with multiple systems interacting at once.
Vehicle System
The vehicle system has been upgraded from simple placeholder meshes to fully imported 3D car models. This improves visual quality and makes traffic feel more varied and realistic.
AI traffic now uses a random selection system when spawning cars, which assigns different car models to different vehicles. This creates more visual variety on the road and makes traffic easier to read.
The player vehicle is still handled separately from AI traffic, which keeps control responsive and prevents interference between systems.
AI Traffic System
The AI system currently uses lane-based movement where cars follow grid-aligned directions. Each car is assigned a direction on spawn and continues moving along that axis.
Traffic spawning has been improved so cars appear in structured positions aligned with the road grid rather than random world coordinates.
Basic interaction between cars is also present, including collision checks and spacing logic to prevent overlap.
However, there is currently a major issue where traffic sometimes stops moving completely. This is likely caused by cars entering a blocked state that is not properly reset or a velocity value not being restored after collision handling. This is the next major bug to fix.
Camera System
A mouse-controlled camera panning system has been added. This allows the player to look around while driving instead of being locked to a fixed camera angle.
The camera still follows the player smoothly but now includes manual input, making movement feel more natural and giving better spatial awareness in traffic.
World Structure
The environment is built on a grid-based road system. Roads are aligned along fixed axes, which provides structure for both player movement and AI navigation.
This grid system allows for predictable traffic behaviour and supports scaling the world without major changes to core logic.
The world is still visually simple, but the underlying structure is stable and supports further expansion such as intersections and traffic rules.
Known Issues
Traffic occasionally stops moving entirely and does not resume. This is the most important issue currently affecting the simulation.
Some AI cars become stuck at intersections due to collision or state handling not resetting correctly.
There may also be mismatches between car rotation and movement direction in some cases, especially after collisions or model changes.
These issues suggest that the AI system currently lacks a proper state management structure.
Next Steps
The next priority is to fix the traffic freeze bug by reviewing how movement states and collision responses are handled.
After that, the AI system should be refactored into a proper state-based system. Each car should have clear states such as moving, waiting, and blocked, rather than relying on simple speed changes.
Once stability is improved, the next major upgrade will be intersection logic. This will include controlled turning behaviour and basic traffic rules such as right of way or traffic lights.
A longer-term improvement will be replacing random movement with destination-based navigation so cars actually travel from point A to point B instead of spawning and moving endlessly.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.