# OpenglGame
This is a simple game implemented with OpenGL. In the game, the scene is made up of several boxes placed in different height. Besides, there are several breads floating on different places of the boxes. The player, in the first-person-perspective, need to move, jump and look around, to look for the breads and eat them!
## 1. Introduction
### 1.1 Result
- Play
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/camera.gif)
- First-Person-Perspective of the scene
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/First-Person-Perspective.png)
- Third-Person-Perspective of the scene
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/Third-Person-Perspective.png)
### 1.2 Control
- W/A/S/D on keyboard to move.
- Space on keyboard to jump.
- Click the left button of mouse and drag for perspective roaming.
---
## 2. Coding Environment & 3rd Party Library
- Win10(x86) + VS2015
- C++
- freeglut
- GLEW
- Assimp
- DevIL
- SOIL
---
## 3. Functionalities
- Basic functionalities
- Camera Roaming
- Texture Mapping
- Simple Lighting
- Sky Box
- Deep Test
- Model Managment
- Additional features
- Scene switching
- Gravity simulation & Collision detection
- Stencil Test
- Display Text (En/Cn)
- Complex Texture (Bumpmap)
- Particle System & Explosion Effect
---
## 4. Additional Features' Detail
1. __Scene switching__: When starting the program, we will enter the home page, containing the game rules and a _Start_ button. Clicking the button, and we will enter the main game scene. (You can see the effect from the GIF above)
1. __Gravity simulation & Collision detection__: see the code explanation in Chinese version: http://blog.csdn.net/qq_33000225/article/details/72861956
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/gravity.gif)
1. __Stencil Test__: We use Stencil Test to draw the edge of the bread.
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/stencilTesting.png)
1. __Display Text__: We have English and Chinese text on the home page. At the game scene, a string text is placed on the upper left corner of the window to show how many breads the player has eaten. Keeping the text at the fixed position is relavant with the camera roaming.
1. __Complex Texture__: We use bumpmap here to make the boxes more stereoscopic.
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/bumpmap.png)
1. __Particle System & Explosion Effect__: When the player eats the bread, an explosion effect with several particles will be generate ahead.
![Image text](https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/explosion.png)
没有合适的资源?快使用搜索试试~ 我知道了~
一个用 OpenGL 实现 的简单 游戏_C++_代码_下载
共349个文件
hpp:138个
inl:114个
bmp:29个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 174 浏览量
2022-06-24
21:50:40
上传
评论 1
收藏 110.68MB ZIP 举报
温馨提示
这是一个使用 OpenGL 实现的简单游戏。在游戏中,场景是由几个放置在不同高度的盒子组成的。此外,还有几个面包漂浮在盒子的不同位置。玩家,在第一人称视角下,需要移动、跳跃和环顾四周,寻找面包并吃掉它们! 效果展示: https://github.com/MarkMoHR/OpenglGame/raw/master/ResultScreenshots/camera.gif
资源推荐
资源详情
资源评论
收起资源包目录
一个用 OpenGL 实现 的简单 游戏_C++_代码_下载 (349个子文件)
SkyBox2_front.bmp 12MB
SkyBox2_back.bmp 12MB
SkyBox2_right.bmp 12MB
SkyBox2_up.bmp 12MB
SkyBox2_down.bmp 12MB
SkyBox2_left.bmp 12MB
SkyBox2_front.bmp 12MB
SkyBox2_back.bmp 12MB
SkyBox2_right.bmp 12MB
SkyBox2_up.bmp 12MB
SkyBox2_down.bmp 12MB
SkyBox2_left.bmp 12MB
20b.bmp 6.44MB
19d.bmp 6.44MB
20b.bmp 6.44MB
19d.bmp 6.44MB
18.bmp 3.86MB
18.bmp 3.86MB
17.bmp 1.28MB
11.bmp 944KB
14.bmp 732KB
14.bmp 732KB
16.bmp 571KB
Sunny_right.bmp 192KB
Sunny_left.bmp 192KB
Sunny_up.bmp 192KB
Sunny_back.bmp 192KB
Sunny_front.bmp 192KB
Sunny_down.bmp 12KB
ClassDiagram.cd 59B
Model.cpp 29KB
SceneController.cpp 26KB
glm.cpp 8KB
PhysicsEngine.cpp 8KB
dummy.cpp 5KB
main.cpp 5KB
FPSCamera.cpp 5KB
texture.cpp 3KB
Shader.cpp 3KB
ParticleSystem.cpp 2KB
assimp.dll 2.93MB
DevIL.dll 747KB
glew32d.dll 502KB
freeglut.dll 194KB
ILU.dll 28KB
ILUT.dll 17KB
OpenglGame.exe 513KB
OpenglGame.vcxproj.filters 2KB
shader.frag 2KB
shader.frag 2KB
camera.gif 14.77MB
gravity.gif 14.64MB
.gitignore 440B
matrix.h 39KB
platform.h 15KB
common.h 7KB
geometric.h 4KB
integer.h 4KB
PhysicsEngine.h 2KB
FPSCamera.h 2KB
SceneController.h 1KB
Model.h 1011B
ParticleSystem.h 617B
exponential.h 365B
Shader.h 255B
vector_relational.h 139B
trigonometric.h 136B
packing.h 129B
fwd.hpp 78KB
_swizzle_func.hpp 62KB
_swizzle.hpp 50KB
type_mat.hpp 40KB
type_aligned.hpp 32KB
packing.hpp 31KB
setup.hpp 29KB
type_vec.hpp 26KB
type_precision.hpp 24KB
func_common.hpp 22KB
matrix_transform.hpp 19KB
type_vec4.hpp 17KB
simd_vec4.hpp 15KB
type_vec3.hpp 15KB
compatibility.hpp 14KB
type_aligned.hpp 14KB
matrix_integer.hpp 14KB
type_vec2.hpp 14KB
quaternion.hpp 13KB
_features.hpp 11KB
func_packing.hpp 10KB
type_vec1.hpp 10KB
func_integer.hpp 10KB
func_trigonometric.hpp 9KB
dual_quaternion.hpp 9KB
type_int.hpp 9KB
simd_quat.hpp 8KB
associated_min_max.hpp 8KB
bitfield.hpp 8KB
io.hpp 7KB
type_mat4x4.hpp 7KB
type_mat3x3.hpp 6KB
共 349 条
- 1
- 2
- 3
- 4
资源评论
- q9323974292023-01-06实在是宝藏资源、宝藏分享者!感谢大佬~
- m0_650974882022-07-03资源值得借鉴的内容很多,那就浅学一下吧,值得下载!
- liou4567892023-11-28简直是宝藏资源,实用价值很高,支持!
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功