Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airmanh/simple_tankgame
A simple tank game based on OpenGL and C++.
https://github.com/airmanh/simple_tankgame
Last synced: 26 days ago
JSON representation
A simple tank game based on OpenGL and C++.
- Host: GitHub
- URL: https://github.com/airmanh/simple_tankgame
- Owner: AirManH
- Created: 2023-04-22T13:53:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-22T14:05:43.000Z (over 1 year ago)
- Last Synced: 2024-11-02T06:43:47.235Z (2 months ago)
- Language: C++
- Homepage:
- Size: 16.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Tank Game
一个简单的基于 OpenGL 和 C++ 的坦克游戏,参考了 [LearnOpenGL 中文教程](https://learnopengl-cn.github.io/)。
![](./readme_imgs/tankgame.png)
## 构建
``` bash
cd ${path_to_this_repo}
cmake -B build [-G Ninja | ...] [-DTANKGAME_BUILD_TEST=1] .
cd build
[make | mingw32-make | ninja | msbuild ...]
```## 操作方式
| 按键 | 效果 |
| -------- | ------------ |
| `W` | 前进 |
| `S` | 后退 |
| `A` | 左转 |
| `D` | 右转 |
| `Q` | 左转炮管 |
| `E` | 右转炮管 |
| 鼠标左击 | 发射炮弹 |
| 鼠标右击 | 重置炮管位置 |
| 鼠标移动 | 调整视角 |
| 鼠标滚轮 | 调整fov |
| `ESC` | 退出游戏 |## 实现功能
- obj 模型的读取与渲染
- Blinn-Phong 光照模型
- 纹理贴图
- 阴影贴图
- 天空盒
- 粒子效果