北方民族大学学士学位论文论文题目基于JAVA的打砖块游戏开发系(部)名称:计算机科学与工程学院学生姓名:专业:软件工程学号:指导教师姓名:论文提交时间:2014-5-7论文答辩时间:2014-5-17学位授予时间:北方民族大学教务处制基于Java的打砖块游戏开发I基于JAVA的打砖块游戏开发摘要打砖块是一款堪称经典的小游戏,在掌上游戏机上和许多手机上都能发现这个小游戏。游戏基本内容是玩家通过控制一个能够左右移动的挡板,反弹正在运动中弹球,使之改变移动的方向,用小球消除游戏窗口里面的的砖块,然后到达下一关,在障碍物被消除的过程中,可能会产生一些能改变挡板或者小球状态的物品,例如:挡板变长、变短,小球威力加强等等。本系统是一个基于Java语言平台的打砖块游戏。主要任务是设计打砖块游戏的算法,并使用JAVA语言编写程序,最终完成游戏编程,并使之能够正确运行。主要是小球的碰撞检测和运动轨迹的算法,碰撞部分可以将小球看成一个矩形,当矩形的边界坐标与砖块、挡板、墙壁等一样时,可以判断为进行了碰撞,而运动轨迹只要在碰撞后将X轴或Y轴取反就可以了。本文第一章阐述了选题目的及Java游戏目前的发展现状。第二章介绍了Java语音的特点和基于Java游戏开发的相关的技术。第三章详细介绍了打砖块游戏,包括游戏的规则和期待的效果等。第四章进行打砖块游戏的具体设计与实现,包括界面的设计,类的设计,算法的设计等等。第五章对游戏进行运行和测试,以期检测游戏中的各种问题。期望通过本游戏实例掌握小型Java游戏开发和Java编程的基础的知识和技巧,使自己具备开发Java游戏基本能力。关键字:java,游戏设计,测试,打砖块,算法基于Java的打砖块游戏开发IIArkanoidjava-baseddevelopmentAbstractArkanoidisasmallclassicgamesonhandheldgameconsolesandmanymobilephonescanbefoundonthislittlegame.Thebasiccontentofthegamebycontrollingaplayercanmovearoundthebaffle,thereboundisinmotionpinball,makingchangesinthedirectionofmovement,eliminatingthebrickswithasmallballinsidethegamewindow,thenreachthenextlevel,theobstaclesprocessiseliminated,theshuttermaybesomechangeinthestateofpelletsorarticlessuchas:thepaddlelength,shorter,andsoenhancethepoweroftheball.ThissystemisaJava-basedplatformArkanoidgame.ThemaintaskistodesignalgorithmsArkanoidgameandusingJAVAprogramminglanguage,thefinalcompletionofgameprogramming,andenableittoruncorrectly.Themaincollisiondetectionalgorithmandthetrajectoryoftheball,theballcollisionportionmayberegardedasarectangle,thecoordinatesoftheboundaryrectanglewhenbricks,baffles,suchasawall,thecollisioncanbejudged,andexerciseJustafterthecollisiontrajectoryX-axisorY-axisinvertedit.ThefirstchapterdescribesthepurposeofthetopicandthecurrentstatusofthedevelopmentofJavagames,thesecondchapterintroducestheJava-basedvoicefeaturesandrelatedtechnologiesJavagamedevelopment,thethirdlegdetailingArkanoidgames,includinggamesrulesandexpectationseffects,ChapterIVspecificdesignandimplementationofArkanoidgames,includinginterfacedesign,classdesign,algorithmdesign,etc.,thefifthchapterofthegamerunningandtestinginordertodetectgamevariousproblems.ExpectedbythegamemasterinstancesmallJavagamedevelopmentandJavaprogrammingbasedknowledgeandskills,sothattheyhavethebasicabilitytodevelopJavagames.Keywords:Java,GameDesign,GameTesting,Arkanoid,TheAlgorithm基于Java的打砖块游戏开发III目录摘要...........................................................................................................................IAbstract.........................................................................................................................II第一章绪论..................................................................................................................11.1选题的目的和意义.........................................................................................11.2游戏产业的发展现状......................................................................................1第二章游戏开发的环境及相关技术..........................................................................32.1开发环境.........................................................................................................32.2Java语言特点................................................................................................32.3GUI介绍..........................................................................................................4第三章打砖块游戏介绍..............................................................................................53.1打砖块游戏的规则.........................................................................................53.2打砖块游戏预期的效果.................................................................................5第四章打砖块游戏的设计与实现..............................................................................74.1游戏模块设计.................................................................................................74.1.1游戏界面绘制模块..............................................................................74.1.2游戏操作模块......................................................................................84.2类的设计.........................................................................................................84.3代码实现........................................................................................................104.3.1GameFrame类.....................................................................................104.3.2GamePanel类.....................................................................................114.3.3Pad类.................................................................................................164.3.4Block类.............................................................................................174.3.5Bullet类...........................................................................................204.3.6Ball类...............................................................................................224.3.7SoundPlayer类.................................................................................26第五章游戏的运行与测试.....