Back to projects

Racetrack Simulation

University project · Graphics and simulation

This racetrack scene combines autonomous movement with shader based lighting and animated scenery. The car follows a loop of 31 checkpoints. Each update calculates the direction to the next target, limits the rate of steering, and advances the car around the circuit. Two bulls follow separate patrol routes with distinct movement and turning states.

The rendering uses C++, DirectX 11, and Hieroglyph 3, with HLSL shaders combining directional, point and spot lights. A spotlight follows the car as a headlight, sky textures blend over time, and procedural trees sway with different phases and amplitudes. A diagnostic HUD exposes position, orientation, speed, frame rate, and the world matrix so the simulation can be inspected while running.

Technical highlights

  • The car follows 31 checkpoints with a limited steering speed for smoother turns.
  • Custom shaders provide lighting, a moving headlight, and a sky transition.
  • Procedural trees, animated wildlife, and live diagnostics add detail to the scene.

Technical details

Movement and routes

Each update calculates the direction towards the next checkpoint, turns the car at a limited angular speed, and advances it along the circuit. The route loops continuously. Two bulls use separate patrol paths and alternate between moving and turning states.

Rendering and diagnostics

HLSL shaders combine directional, point and spot lights, with a spotlight following the car as a headlight. The sky blends between textures over time, and trees sway with different phases and amplitudes. A HUD reports the car's position, orientation, speed, frame rate, and world matrix.

Project context

Built with C++, DirectX 11, Hieroglyph 3, and DirectXTK. The car is controlled by the simulation rather than the player.