1、I 本科生毕业论文(设计)本科生毕业论文(设计) 论论 文文 题题 目:目:基于基于 JavaJava 的网络版坦克大战游戏设计的网络版坦克大战游戏设计 学学 生生 姓姓 名:名: 系系 专专 业:计算机科学与技术业:计算机科学与技术 学学 号:号: 指指 导导 教教 师:师: I 基于基于 Java 的网络版坦克大战游戏设计的网络版坦克大战游戏设计 摘摘 要:要: 本设计采用面向对象的设计模式, 对游戏中的所有物体赋予对象的概念和属性。 运行程序后允许用户选择执行选项菜单。在开始游戏后,启动服务器和客户端,对背景的所 有物体进行绘图。 在主程序运行的线程中, 画面刷新将以一定的频率采用双缓冲
2、技术对屏幕 重绘,实时反映整个游戏的进行状态。用户控制的坦克运行在主线程中,随屏幕刷新的频率 而移动。坦克将在游戏开始时进行初始化,然后将坦克绘制在地图的上层。本设计主要实现 的功能是让坦克移动并能够智能的打出炮弹,躲避子弹,炸毁对方坦克。能够支持网络对战 和单机对战两种模式。 关键词:关键词:面向对象;坦克大战;网络游戏;Java;Socket 类 中图分类号:中图分类号:TP311.1 Java-based Web version of Battle City Game Design 【AbstractAbstract】The design of object-oriented desig
3、n 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 t
4、he 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.