节点文献
基于MFC框架的网络对战游戏的设计与实现
Design and Implementation of Online Battle Game Based on Mfc Framework
【作者】 杨平;
【导师】 魏达;
【作者基本信息】 吉林大学 , 软件工程, 2012, 硕士
【摘要】 随着人们工作压力、生活压力的与日俱增,网络小游戏势力也逐步发展壮大,有了更多的发展空间。网络小游戏不仅能增强人们的抽象思维能力、逻辑推理能力、空间想象力,提高人们的记忆力、心算能力等,而且深含哲理,有助于修身养性。该游戏有现代休闲方式所特有的特征“短、平、快”,它规则简单,棋面直观,既有简单易学的特点,为人民群众所喜闻乐见。又有深奥的技巧,每动一个棋子,都需要思考下一步该如何走动;而且讲究高度的配合,自己一方只有做出完美配合才能取得胜利。由于现代社会快速的生活节奏,人们没有了多余的时间去玩“大游戏”,但同时存在通过轻度娱乐来放松心情的需求,就这样,越来越多的人开始倾向轻量化的小游戏。小游戏也因玩法简单、创意新颖、品类繁多而日益受到都市人的宠爱,更升级为一大娱乐休闲项目。据不完全统计,国内开发者数量已超过10万,这个数字每年还在持续快速增加中。这个游戏是基于VS2005平台,利用软件工程的设计原则和方法,采用MFC主框架类实现的单人游戏和双人游戏。单人游戏是操作者有电脑的对战,双人游戏则通过网络连接进行对战。主框架其实就是一个对话框,其实现过程包括对算法的设计和整合、资源的创建和引入、资源和相应类的关联、菜单和菜单项的设计、菜单和相应类的关联、Ctable类的设计、网络连接类的设计、各种类的整合。该游戏主要实现了电机电脑对战和双方网络对战,通过网络连接,双方还可进行网络会话。该游戏并不算复杂,但若能完美的实现其功能,也并不容易。众所周知,一个游戏,最主要的是一个完整的算法,而做出一个游戏,需要很强的游戏架构。一个新的游戏,对我来说有很大的挑战。本文第一章中介绍了棋牌等小游戏的发展现状及未来前景。第二章介绍了本游戏开发用到的相关技术及MFC主框架类。第三章为网络编程的相关介绍。第四章为开发环境和运行环境。第五章为全文开发构架及用到的主要类,以及消息机制消息循环消息分发的具体实现。第六章介绍游戏中的相关算法及代码框架。第七章为本文最后的效果测试。
【Abstract】 As people work pressure and life stress increases, network little game forces growsgradually and have more space for development. The network can not only enhancepeople abstract thinking ability,logical reasoning ability and space imagination ability,raise people’s memory and mental arithmetic ability and deep including philosophy, helpsto cultivate one’s morality. This game has characteristics "short, flat, speed" of themodern leisure. It’s rules are simple, chess surface directly perceived through the senses, and ithas the characteristics of learned easily,people loving and a profound skills. we need tothink about how to move next step when moving a pawn; And need to pay attention tohigh cooperation, his own side only make perfect cooperation will win.Due to the fast pace of life in modern society, people have no extra time to play the"great game".But at the same time, the mild entertainments are needed to relax, just likethat, more and more people begin to tend to play lightweight game. Small game playsimply, with creativity, and also because of its novel, various people favour to play,and havebeen upgraded a large leisure projects. According to not complete count, the domesticnumber developers more than100000and the number continues to rapidly increase peryear.The game is based on Visual C++main frame class, using the software engineering,design principles and methods, whose main frame is a dialog. The game includesdesigning and integrating of the creating and of the resource, integrating of resource andclass, designing of menu and menu items, integrating of menu and class, designing ofCtable class, designing of net linking, the integrating of every class. What the mainfunction the game realizes is fighting through the internet, and through linking theinternet, we also can talk with each other. The game is not very complex, but it still noteasy to realize it perfectly.As is known to all, a game, the most is a complete algorithm, but to make a game,need very strong game architecture. A new game, to me it is a huge challenge.In this paper,the first chapter introduces chess and other small games developmentpresent situation and future prospect. The second chapter presents the game developmentused relevant technology and MFC framework class. The third chapter introducesprogramming for the related network.The fourth chapter presents developmentenvironment and operation environment. Chapter5is for full text development framework, and news news cycle of news distribution mechanism of concrete realization.The sixth chapter presents the game related algorithm and code framework. Chapter7isfor the final results of this test.
- 【网络出版投稿人】 吉林大学 【网络出版年期】2012年 09期
- 【分类号】TP311.52
- 【下载频次】404