文档介绍:基于Java的坦克网战游戏的设计和实现
内容摘要:坦克游戏是一款众所周知的休闲游戏,在网络日益发达的今天,局域网游戏为上班一族在工作闲暇之际提供了很好的放松空间。Java语言简单易学,并且能够在所有的计算机上运行,所以越来越多的程序员用它编写游戏。而本文介绍了基于Java的坦克网战游戏的设计和实现,主要介绍了相关技术理论,系统总体设计,各功能设计以及游戏的实现。本游戏在Eclipse平台上开发调试,分为两大部分,即服务器端和客户端。服务器端建立主机,客户端通过连接主机IP地址进行联机,联机成功自动进入游戏。游戏过程中玩家通过键盘来控制坦克,可以进行聊天,选择暂停,游戏结束玩家可以选择重玩,但需要另一玩家同意。
关键词:Java 坦克局域网 Eclipse
Design and achievement work Tanks based on Java
Abstract: Tanks is a well-known casual game. With the increasing development of the , LAN-based game provide a good relax platform for those office workers to spend their leisure time. A growing number of programmer choice to use Java language to program game because this kind of language is easy to learn and it can be operated on all puters. This article is about the design and achievement of the Tanks which is based on Java ,and it mainly introduces some relevant technological theories, the system integrated design, diverse function design and the game’s achievement. This game is developed and debugged on Eclipse platform, which contains Server-side and Client-side. The Server-side aims at building mainframe, and the Client-side through connecting mainframe’s IP address to load game automatically. Players can control tank through keyboard and chat or suspend while playing the game. They can also choice to restart the game if another player permits.
Keywords:Java work Eclipse
目录
前言 1
1 了解java 1
Java语言的发展 1
Java技术理论 1
三种平台简介 2
Java程序开发过程 2
编写Java源文件 3
编译Java源文件 3
运行Java程序 3
关于Eclipse 3
2 系统分析 4
可行性分析 4
游戏规则和系统功能介绍 4
3 总体设计 5
程序运行流程 5
总体构架 5
4 程序模块 7
主体模块 7
通信模块 7
坦克模块 7
子弹模块 8
墙模块 8
关卡模块 8
5 程序实现 8
游戏窗口界面设计 9
游戏控制 12
游戏网络通信 13
游戏元素 15
坦克 15
游戏墙 18
游戏中子弹和爆炸效果 19
游戏整体实现效果 20
6 结束语 21
参考文献 22
基于Java的坦克网战游戏的设计和实现
前言
在人们工作压力日益加大的今天,休息时间有限使娱乐项目越来越少,为了让上班族疲惫的心灵得以休息,开发了可在局域网内联机玩耍的坦克游戏让人们放松一刻。本款游戏设计时,考虑到实际操作性,简化了游戏的操作,只要操作键盘上的方向控制坦克运动,键按住攻击键发射子弹就