Top-down 2D car simulator: car body + 4 wheels, meters-first physics with a fixed timestep, and smooth rendering via a single unit-quad mesh and a RectShader (scale → rotate → translate).
OS Windows 10
| Library | version | link |
|---|---|---|
| GLFW | 3.4 | https://www.glfw.org/download.html |
| GLAD | Refer to https://rpxomi.github.io/ | https://glad.dav1d.de/ |
| C++ g++ compiler (Windows 10) | 13.1.0 | - |
A discrete action space is currently implemented and the car movement is calculated by a kinematic bicycle model with the input controls. Combined actions (e.g. accelerate + steer) are possible.
| Controls | Description |
|---|---|
| Up | +acceleration |
| Down | -acceleration |
| Left | +steer(CCW) |
| Right | -steer(CW) |
| Escape | Quit |
- without CMake
g++ -std=c++17 src/glad.c src/main.cpp src/Loader.cpp src/shaders/ShaderProgram.cpp src/shaders/RectShader.cpp src/entities/Entity.cpp src/renderers/Renderer.cpp src/vehicledynamics/BicycleModel.cpp -o output/program -Llib -Iinclude -lglfw3dll- CMake
- Configure & Generate Build Files
cmake -B build -S . -DBUILD_TESTING=OFF (Without tests)
or
cmake -B build -S . -DBUILD_TESTING=ON (With tests)
- Build / Link the Project
cmake --build build --config Release
Refer to this page
- Introduce reinforcement learning for the parking
- Research RL libraries for C++
- Build an environment like gymnasium-style environment in Python
- Introduce continuous action space
- Implement RL
- Training
- Evaluation
- Path finding
- Decision making
- Reinforcement learning
- Sensors
- 3D environment
Draw 2D Shapes C++ OpenGL from Scratch
OpenGL 入門
Hello Triangle
https://tokoik.github.io/GLFWdraft.pdf
https://zenn.dev/nyanchu_program/articles/97637278839801
https://codelabo.com/posts/20200228150223