J2SE的坦克大战游戏设计+源代码_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

J2SE的坦克大战游戏设计+源代码

摘 要:本系统旨在开发一款集单机和网络功能于一体的休闲小游戏——坦克大战,针对该游戏的功能特点进行叙述,首先介绍了课题来源和背景、开发系统的目标和意义,以及系统的软件环境和硬件环境。其次根据游戏的功能需求,将系统设计为两种游戏模式,单机模式和网络联机模式。单机模式下为玩家与电脑战斗来保卫基地,网络联机模式则为玩家通过网络连接其他玩家,联合对抗电脑坦克,共同完成整局游戏。然后重点说明了本设计的功能模块实现的过程,模拟实现了坦克的移动与射击,子弹的发射与爆炸等功能模块。其中,不同的游戏模式使用不同的游戏规则,并给出不同的操作说明。然后测试该游戏,给出测试的结果。最后介绍了开发过程中遇到的典型问题和解决方案。78670

毕业论文关键词:J2SE,坦克大战,Swing, 面向对象设计

Abstract:This system is to develop a stand-alone and network function in the integration of recreational little game -- tanks war, the functions and features of the game for narrative, source and background, first introduced the subject development goal and the significance of the system and system software and hardware environment。 Secondly according to the functional requirements of the game, the system design for the two game modes, stand-alone mode and network online mode。 Stand-alone mode for players fight to defend the base, with computer network online mode for players through the network connection is joined other players against computer tanks, complete the whole board game together。 Then mainly illustrates the design of function module realization process, which USES the J2SE language writing, mainly used in Java Swing, GUI, sockets, threads, and object oriented design technology, simulating the movement of the tanks and shooting, the launch of the bullets and explosions such as function modules。 Among them, the different game modes using different rules of the game, and give different instructions。 Test the game, and then the test results are given。 Finally introduces the typical problems and solutions encountered in the development process。

Keywords:J2SE,tanks war, Swing, object oriented design

目  录

1  绪论 4

1。1  课题来源及背景 4

1。2  目标和意义 4

2  基础知识 5

2。1  MyEclipse 5

2。2  J2SE框架 5

2。3  JAVA图形编程 6

2。4  网络编程 6

3  系统环境 7

3。1  软件环境 7

3。2  硬件环境 7

4  游戏设计 7

4。1  单机版 7

4。2  网络联机版 17

5  游戏实现 20

5。1  游戏启动窗体实现 20

5。2  单机版坦克大战 21

5。3  联机版坦克大战 29

5。4  问题解决方案 33

总 结 34

参考文献 35

致 谢 (责任编辑:qin)