【正文】
石家莊科技信息職業(yè)學(xué)院畢 業(yè) 論 文題目: 基于 J2SE 的坦克大戰(zhàn) 學(xué) 號(hào): 090124017 姓 名: 李世陽(yáng) 專業(yè)班級(jí):軟件技術(shù)(游戲方向)0924 班指導(dǎo)教師: 劉永偉 完成日期: 20221218 基于 Java 的網(wǎng)絡(luò)版坦克大戰(zhàn)游戲設(shè)計(jì)摘 要 : 本設(shè)計(jì)采用面向?qū)ο蟮脑O(shè)計(jì)模式,對(duì)游戲中的所有物體賦予對(duì)象的概念和屬性。運(yùn)行程序后允許用戶選擇執(zhí)行選項(xiàng)菜單。在開(kāi)始游戲后,啟動(dòng)服務(wù)器和客戶端,對(duì)背景的所有物體進(jìn)行繪圖。在主程序運(yùn)行的線程中,畫(huà)面刷新將以一定的頻率采用雙緩沖技術(shù)對(duì)屏幕重繪,實(shí)時(shí)反映整個(gè)游戲的進(jìn)行狀態(tài)。用戶控制的坦克運(yùn)行在主線程中,隨屏幕刷新的頻率而移動(dòng)。坦克將在游戲開(kāi)始時(shí)進(jìn)行初始化,然后將坦克繪制在地圖的上層。本設(shè)計(jì)主要實(shí)現(xiàn)的功能是讓坦克移動(dòng)并能夠智能的打出炮彈,躲避子彈,炸毀對(duì)方坦克。能夠支持網(wǎng)絡(luò)對(duì)戰(zhàn)和單機(jī)對(duì)戰(zhàn)兩種模式。關(guān) 鍵 詞 : 面向?qū)ο螅惶箍舜髴?zhàn);網(wǎng)絡(luò)游戲;Java;Socket 類Javabased Web version of Battle City Game Design【A bstract】The design of objectoriented 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. Usercontrolled 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: Objectoriented。 Battle City。 online games。 Java。 Socket class摘要 ......................................................1第 1 章 前言 ..............................................4 游戲設(shè)計(jì)的需求分析 ..................................4 本系統(tǒng)的現(xiàn) 實(shí)意義 ................................4 本系統(tǒng)和其他開(kāi)發(fā)游戲區(qū)別 ........................4 開(kāi)發(fā)技術(shù)概述 ........................................5 JAVA、C 語(yǔ)言、C++三種主流編程技術(shù)比較 ............5 本章小結(jié) ............................................5第 2 章 相關(guān)技術(shù)理論 ......................................5 系統(tǒng)運(yùn)行環(huán)境 ........................................5 系統(tǒng)運(yùn)行的軟件環(huán)境 ..............................5 系統(tǒng)運(yùn)行的硬件環(huán)境 ..............................6 相關(guān)理論 ............................................6 關(guān)于 ECLIPSE的介紹 ...............................6 J2SE 框架 .......................................6 聯(lián)機(jī)通信機(jī)制 ....................................7 JAVA圖形編程 .....................................8 本章小結(jié) ............................................9第 3 章 系統(tǒng)設(shè)計(jì) ..........................................9 系統(tǒng) 功能設(shè)計(jì) ........................................9 坦克大戰(zhàn)總體功能設(shè)計(jì) ............................93 TANKCLIENT類基本功能分析 ........................10 TANK類基本功能分析 ..............................11 MISSILE類基本功能分析 ...........................12 EXPLODE類基本功能分析 ...........................13 服務(wù)器類基本功能分析 ...........................13 信息傳送類基本功能分析 .........................14 本章小結(jié) ............................................14第 4 章 系統(tǒng)實(shí)現(xiàn) .........................................14 游戲主窗體實(shí)現(xiàn) .....................................14 單機(jī)游戲的實(shí)現(xiàn) .....................................16 聯(lián)機(jī)功能實(shí)現(xiàn) .......................................17 本章小結(jié) ..........................................22第 5 章 總結(jié)與展望 .......................................22 總結(jié) ...