- 17
- 0
- 约2.94万字
- 约 47页
- 2017-06-10 发布于辽宁
- 举报
二d赛车游戏的设计与实现大学本科毕业论文
2D赛车游戏的设计与实现
摘 要
随着电脑的普及,游戏已成为大多数年青人的主要休闲方式,赛车价格比较昂贵,而赛车游戏则可以让那些想玩赛车却没法玩的人体验一把。爱好赛车竞速游戏的玩家们以体验比赛中的刺激为乐趣,玩家唯一的真实目的就是“最快”。
本设计所实现的赛车游戏是基于C语言设计开发的,所选用的游戏引擎是基于Directx8.0编写的。能进行赛车、赛道以及各种图片的绘制,实现各种游戏音效,获取键盘输入,单人游戏时,可与电脑控制的赛车竞速,多人游戏时可与其他玩家或电脑AI竞速。
与其他类似游戏相比,本设计所采用的碰撞检测算法,像边界矩形盒算法和颜色识别算法,不仅速度快,而且检测灵敏。多人游戏的实现是靠socket网络编程与多线程的联用,socket提供C/S模式下数据的可靠传输,多线程解决了socket等待问题,两者结合使得在局域网内的多人游戏运行比较流畅。
关键词:2D,DirectX,赛车,游戏
Design and Implementation of 2D Racing Game
Abstract
With the popularity of computer games has become a major leisure activity for most young people , cars are expensive , and racing games for those who want to play can play racing who had no opportunity to experience one. Hobby car racing game players to experience the game for fun stimulation , players only real purpose is the fastest .
This design is realized racing game based on the C language design and development , the choice of the game engine is based on Directx8.0 written . Capable of racing, track and draw various pictures , sound effects to achieve a variety of games to get keyboard input, single- player game, with computer-controlled car racing , multiplayer games with other players or computer AI racing .
Compared with other similar games , collision detection algorithms used in the design , like the bounding rectangle box algorithm and color recognition algorithm , not only fast, but also detection sensitivity . Multiplayer is achieved by the socket network programming and multi-threaded MS , socket provides reliable data transmission under C / S mode , multi-threaded socket waiting to solve the problem , a combination that makes the LAN multiplayer games run more smooth.
Keywords : 2D, DirectX, racing, game
目 录
第一章 绪论 1
1.1研究背景及意义 1
1.2赛车游戏开发环境和语言 1
1.3赛车游戏的主要功能 1
1.4赛车游戏开发的主要步骤 2
第二章 DirectX、游戏引擎和游戏结构 3
2.1 DirectX概述 3
2.2游戏引擎 3
2.2.1选用的游戏引擎结构 4
2.3游戏结构 5
2.4本章小结 6
第三章 游戏逻辑 8
3.1游戏主逻辑 8
3.2单人游戏逻辑 9
3.3多人游戏逻辑 13
3.3.1多人游戏服务器端逻辑 13
3.3.2多人游戏客户端逻辑 15
3.4显示游戏胜利 15
3.5本章小结 16
第四章 赛车碰撞检测技术 17
4.
您可能关注的文档
- 茶楼投资商业企划书大学本科毕业论文.doc
- 柴油机排放颗粒后处理装置设计大学本科毕业论文.doc
- 超偏超重检测系统的设计与实现大学本科毕业论文.doc
- 常见观赏竹类的栽培及应用大学本科毕业论文.doc
- 常州市土地收购储备中心二毛三毛地块25000万元政府土地储备项目建设贷款分析评估报告大学本科毕业论文.doc
- 超声波测距系统大学本科毕业论文.doc
- 超市管理系统4大学本科毕业论文.doc
- 超声波在小车避障技术的应用设计毕业设计说明书大学本科毕业论文.doc
- 超市管理信息系统的设计与实现大学本科毕业论文.doc
- 车床ca6140的数控化改造说明书大学本科毕业论文.doc
- 小区绿化施工协议书.docx
- 墙面施工协议书.docx
- 1 古诗二首(课件)--2025-2026学年统编版语文二年级下册.pptx
- (2026春新版)部编版八年级道德与法治下册《3.1《公民基本权利》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《4.3《依法履行义务》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.2《按劳分配为主体、多种分配方式并存》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.1《公有制为主体、多种所有制经济共同发展》PPT课件.pptx
- 初三教学管理交流发言稿.docx
- 小学生课外阅读总结.docx
- 餐饮门店夜经济运营的社会责任报告(夜间贡献)撰写流程试题库及答案.doc
原创力文档

文档评论(0)