飞机大战游戏设计与实现

 2022-12-22 11:12

论文总字数:18565字

摘 要

飞机大战是电脑游戏发展史中早期最为经典的游戏之一,这款游戏曾经在按键机的年代可谓是叱诧风云,那时的游戏发展并不像现在这么多样化,那时候这款游戏可以奉为神作。这款游戏最初是二维平面上的游戏,而且还是以黑白的形式出现的,由于计算机的发展,这款游戏无论在电脑还是手机上的发展都得到了极大的提升,飞机种类繁多、碰撞效果炫酷、视觉冲击极强。Java自面世以来就非常流行,发展迅速,对C 语言造成了有力的冲击,Java拥有功能强大的IDE、大量的第三方类库、和其庞大而完善的生态系统。本论文主要阐述以面向对象的程序开发语言Java及Eclipse为开发工具的飞机大战游戏。首先简要介绍课题的研究背景、目的及意义,Java的发展历程、当前国内外的发展现状。然后介绍Eclipse平台开发环境及环境搭建,最后讲述了基于Java飞机大战游戏功能的实现。

关键词:飞机大战;游戏;Java ;Eclipse

Abstract

Aircraft wars were one of the most classic games of the early days in the history of computer games. The game was once a snap at the age of the keypad, when the game wasn't as diverse as it is now. The game was originally a two-dimensional plane game, but also in the form of black and white, because of the development of the computer, the game has been greatly improved in both computer and mobile phone development, a wide variety of aircraft, collision effect dazzling cool, visual impact is extremely strong. Java has been very popular since it came out, and has developed rapidly, which has caused a powerful impact on C language Java has a powerful IDE、 large number of third-party libraries and its large and perfect ecosystem. This paper mainly describes the development of object-oriented programming language Java and Eclipse as a tool for aircraft warfare games. Firstly, it briefly introduces the research background, purpose and significance of the subject, the development course of the Java and the current development situation at home and abroad. Then the development environment and environment of Eclipse platform are introduced, and finally the realization of game function based on Java aircraft war is described.

KeyWords: lightning;Game;Java;Eclipse

目录

前言 1

第一章 开发技术和开发平台 3

1.1 Java语言特性 3

(1)跨平台 3

(2)简单性 3

(3)面向对象 3

(4)分布式 3

(5)鲁棒性 3

1.2 Java技术在游戏开发中的应用 3

1.2.1 绘图技术 3

1.2.2 游戏开发中的交互 4

1.2.3 基于AWT及SWING的游戏界面开发 4

1.2.4 多线程技术的应用 4

1.2.5 Java网络技术的应用 4

1.2.6 Eclipse 5

1.3 开发平台搭建 5

1.3.1 安装JDK和Eclipse 5

1.3.2 JDK环境变量配置 5

第二章 飞机大战需求分析 6

2.1 用户需求分析 6

2.2 可行性分析 6

(1) 技术可行性 6

(2) 经济可行性 7

(3) 社会可行性 7

2.3 总体设计原则    7

2.4 功能模块设计 7

2.5难点分析 7

第三章 总体设计与详细设计 8

3.1 系统模块划分 8

3.2 主要功能模块 8

3.2.1 系统对象类图 8

3.2.3 系统主程序活动图 10

3.2.2 项目包和类层次结构图 10

3.2.4 系统部分流程图 12

第四章 系统实现及其测试 16

4.1系统实现 16

4.1.1 滚动背景 16

4.1.2 显示战机 18

4.1.3 随机产生敌机和敌机炮弹、Boss炮弹 18

4.1.4 显示战机发射子弹 21

4.1.5 碰撞检测,以战机子弹集中敌机为例 21

4.1.6 显示爆炸效果 24

4.1.7 血包功能 24

4.1.8 通关和死亡消息页面 27

4.1.9 魔法值控制维护 28

4.1.10 得分到达关卡需求,进入Boss 29

4.1.11 检测标记位isPass,判断打赢Boss,进入下一关 30

4.1.12 按键监听 31

4.1.13 鼠标移动监听: 36

4.1.14 鼠标左键发射子弹和开始界面进入游戏: 36

4.1.15游戏重新开始 37

4.1.16 生命值归零,游戏结束 39

4.2 系统测试 39

4.2.1飞机大战游戏的基本运行界面 39

4.2.2 系统测试 40

总结 45

致辞 46

参考文献 47

前言

项目背景

电子游戏在世界上的发展也已经有几十年了,这同时也影响了中国几代人,他们目睹了电子游戏数十年的兴衰,这些人,或许是因为生活或工作的原因,已经到了不得不放弃游戏的年纪了,但他们永远不会忘记引领他们步入神奇世界的那些经典游戏。

现如今,飞行模拟游戏已经经历了几十个年头,游戏中的飞机也越来越炫酷,打击感也越来越强,但给我们留下最深刻印象的却还是80、90年代的黑白飞机。其实在网络上,特别像一些火热的短视频软件上,只要有人上传相关视频,下面的评论区总会探讨当年的黑白飞机,一些只属于他们的游戏经历。

剩余内容已隐藏,请支付后下载全文,论文总字数:18565字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;