This is a physics simulation I created for a highschool physics lab do demnstrate circular motion using two cars going around a race-track where you, the black car (GTR-R35) is who you 'play' as, the white car (Mustang) is the car you have to try to get around. Your goal is to find the right speed and tyre type to make it aruond the white car without understeering off of the track. This simulation does compile for the web as well as for Windows and Unix machines.
Vist the simulation through my itch.io page here
Once you have installed the project all you have to do is run the run.sh file in the project
bash run.shThis will install Raylib and then compile it to ensure that it works on all machines and then it will compile the project then run it
I don't have a run.bat file for this project yet, how ever you could easily make one for Windows based off of the run.sh file
If you want to compile the project to the web yourself, you can run this command
emcc -o webversion/index.html src/main.cpp -Os -Wall ./lib/libraylib.a -I. -Iinclude -L. -Llib -s --preload-file images --preload-file fonts USE_GLFW=3 -s ASYNCIFY -DPLATFORM_WEBThis project is open-source, you can use, change it, whatever, just please don't write it off as your own
The images were from the internet, both the top-down-gtr view and the top-down-mustang view
This project uses Raylib with C++ as well as Raygui for the gui.
If you lose you get a tooltip at the bottom left to help guide you to find the correct values to win
![]()
This allows you to change the tires following the way the Gran Turismo has their tire system down, how ever mine has the friction coefficient along with the tire so that you can use it in the equations needed to find things such as friction force, allowing you to find the centrepetal force.
![]()