目录
摘要 I
Abstract II
1 引言 - 1 -
1.1 问题概述 - 1 -
1.1.1 问题的来源 - 1 -
1.1.2 目的和意义 - 1 -
1.1.3 国内外研究现状 - 1 -
1.2 问题剖析 - 2 -
1.2.1 主要问题 - 2 -
1.2.2 难点和关键 - 2 -
1.2.3 思路和方法 - 2 -
2 可行性分析和需求分析 - 4 -
2.1 可行性分析 - 4 -
2.1.1 技术可行性分析 - 4 -
2.1.2 经济可行性分析 - 5 -
2.1.3 操作可行性分析 - 6 -
2.1.4 时间可行性分析 - 6 -
2.1.5 结论 - 6 -
2.2 需求分析 - 6 -
3 总体设计 - 7 -
3.1 总体设计的框架 - 7 -
3.2 模块功能概述 - 7 -
3.3 关键算法 - 8 -
3.3.1 双缓冲技术绘图 - 8 -
3.3.2 工兵寻路 - 8 -
3.3.3 棋盘坐标转换 - 9 -
4 详细设计 - 11 -
4.1模块结构 - 11 -
4.2 模块详述 - 11 -
4.2.1 主模块 - 11 -
4.2.2 大厅界面模块 - 12 -
4.2.3 大厅处理模块 - 13 -
4.2.4 游戏界面模块 - 14 -
4.2.5 游戏处理模块 - 15 -
4.2.6 网络消息处理模块 - 17 -
5 系统调试与测试 - 19 -
5.1 遇到的主要问题 - 19 -
5.2 解决问题的方法 - 19 -
5.3 程序运行情况 - 20 -
6 结论 - 21 -
参考文献 - 22 -
致谢 - 23 -
摘要
本文详细介绍了一个windows环境下的局域网四国军棋游戏的设计和实现。该游戏使用Socket编程实现在局域网中的通信;使用windows提供的GDI+图形设备接口实现界面。本游戏采用C/S结构设计,以其中一个玩家作为服务器,其他玩家作为客户机连接到服务器。游戏最终实现了局域网中创建游戏、加入游戏和协同游戏的功能,可以实现在局域网中联机对战的要求。
关键词:四国军棋;联机对战;套接字;GDI+
Abstract
This paper describes the design and implementation of a windows operating system LAN Siguojunqi game. The game uses the Socket Programming in LAN communication; use windows GDI + graphics device interface to achieve the interface. This game uses the C / S structure design, as a server on one of the players, other players connect to the server as a client. The game has finally realized the LAN create games, join the game and collaborative game, you can achieve the requirements of online gaming in the LAN.
Key words: Siguojunqi game; Online gaming; Socket; GDI+