二d赛车游戏的设计与实现大学本科毕业论文.docVIP

  • 17
  • 0
  • 约2.94万字
  • 约 47页
  • 2017-06-10 发布于辽宁
  • 举报

二d赛车游戏的设计与实现大学本科毕业论文.doc

二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.

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档