Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whjwnavy/gametank
GameTank With WinAPI+C
https://github.com/whjwnavy/gametank
c gametank winapi
Last synced: 8 days ago
JSON representation
GameTank With WinAPI+C
- Host: GitHub
- URL: https://github.com/whjwnavy/gametank
- Owner: WHJWNAVY
- Created: 2019-02-28T01:36:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-10T05:50:33.000Z (over 2 years ago)
- Last Synced: 2023-07-03T10:36:27.830Z (over 1 year ago)
- Topics: c, gametank, winapi
- Language: C
- Size: 17.2 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 坦克大战-C语言版
# 游戏体验
> ![](https://raw.githubusercontent.com/WHJWNAVY/myImage/master/PicGo/20180905135655.gif)
# 视频版
> [坦克大战-C语言版-GameTank](https://v.youku.com/v_show/id_XMzgxMTc1MjI0OA==.html)
# 代码框架
坦克大战游戏代码框架如下
![](https://raw.githubusercontent.com/WHJWNAVY/myImage/master/PicGo/20180905131328.png)
在 ***main.c*** 中,创建应用窗口,并初始化一些系统资源,然后初始化gdi,初始化坦克大战游戏.
在 ***gdi.c*** 中,对系统的HDC及绘图接口进行了一次封装,使用WIN32系统提供的绘图接口来实现我们自己的图形绘制API.这里使用到了双缓冲技术,下文会简单介绍.
在 ***Tank.c*** 中,实现了坦克大战的游戏逻辑,包括贴图系统,地图系统,坦克制造,炮弹制造,装备生成,坦克移动,炮弹移动,以及坦克被炮弹击中,坦克吃到装备,等等.## 运行截图
![](https://raw.githubusercontent.com/WHJWNAVY/myImage/master/PicGo/20181015114935.png)
![](https://raw.githubusercontent.com/WHJWNAVY/myImage/master/PicGo/20181015114759.png)