A simple car race game for lab2 of CG lesson
This is a tiny project for a CG lesson, in which I make a car game with some basic function. The project is based on GLFW and some codes are refered to LearnOpenGL CN (With my greatest appreciation).
- GLFW
- GLAD
- GLM
- ASSIMP
Button | Function |
---|---|
UP | Go Forward |
DOWN | Go Backward |
RIGHT | Turn Right |
LEFT | Turn Left |
CONTROL | Speed Up |
SHIFT | Drift |
B | Brake |
T | Change the view |
L | Line Mode |
U | Face Mode |
R | Restart |
- When turning, UP/DOWN should be pressed simultaneously.
- Acceleration time is 2s. Ones control is pressed, you can get 2 second to speed up. No need to press it all the time.
- Brake just slows down the car. If you want to stop, release all the buttons.
- Add a menu. I tried to use nano-gui but failed. If someone can teach me how to combine it with an existed projecct, I would be really appreciated.
- Add a shadow. I suppose there is something wrong with my race track since it generates really wired shadows.
- Record the best lap.
- More cars and more tracks.