基于J2SE的坦克大战 毕业设计.doc
文本预览下载声明
石家庄科技信息职业学院
毕 业 论 文
题目: 基于J2SE的坦克大战
学 号: 090124017
姓 名:
专业班级:软件技术(游戏方向)09-24 班
指导教师:
完成日期: 2011-12-18
基于Java的网络版坦克大战游戏设计
摘 要:本设计采用面向对象的设计模式,对游戏中的所有物体赋予对象的概念和属性。运行程序后允许用户选择执行选项菜单。在开始游戏后,启动服务器和客户端,对背景的所有物体进行绘图。在主程序运行的线程中,画面刷新将以一定的频率采用双缓冲技术对屏幕重绘,实时反映整个游戏的进行状态。用户控制的坦克运行在主线程中,随屏幕刷新的频率而移动。坦克将在游戏开始时进行初始化,然后将坦克绘制在地图的上层。本设计主要实现的功能是让坦克移动并能够智能的打出炮弹,躲避子弹,炸毁对方坦克。能够支持网络对战和单机对战两种模式。
关键词:面向对象;坦克大战;网络游戏;Java;Socket 类
Java-based Web version of Battle City Game Design
【Abstract】The design of object-oriented design patterns, all the objects on in the game to give the concept of objects and attributes. After running the program allows the user to select the implementation of the Options menu. At the beginning of the game, start the server and client, all objects on the background graphics. Thread running in the main program, the screen refresh frequency will be some double buffer technology to redraw the screen in real time to reflect the state of the game. User-controlled tanks to run in the main thread, with the screen refresh frequency of the movement. Tank will start to initialize the game, and then draw the map of the upper tank. Designed to achieve the main function is to allow tanks to move and be able to play smart bombs, dodge bullets, to blow up other tanks. To support online play and single play against two modes.
Key words: Object-oriented; Battle City; online games; Java; Socket class
摘要 1
第1章 前言 4
1.1 游戏设计的需求分析 4
1.1.1 本系统的现实意义 4
1.1.2 本系统和其他开发游戏区别 4
1.2 开发技术概述 5
1.2.1 Java、C语言、C++三种主流编程技术比较 5
1.3 本章小结 5
第2章 相关技术理论 5
2.1 系统运行环境 5
2.1.1 系统运行的软件环境 5
2.1.2 系统运行的硬件环境 6
2.2 相关理论 6
2.2.1 关于Eclipse的介绍 6
2.2.2 J2SE框架 6
2.2.3 联机通信机制 7
2.2.4 Java图形编程 8
2.3 本章小结 9
第3章 系统设计 9
3.1 系统功能设计 9
3.1.1 坦克大战总体功能设计 9
3.1.2 TankClient类基本功能分析 10
3.1.3 Tank类基本功能分析 11
3.1.4 Missile类基本功能分析 12
3.1.5 Explode类基本功能分析 13
3.1.6 服务器类基本功能分析 13
3.1.7 信息传送类基本功能分析 14
3.2本章小结 14
第4章 系统实现 14
4.1 游戏主窗体实现
显示全部