- 1、本文档共47页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
实用标准文案
文档
Java版坦克大战
摘要
Java是近几十年来随着各种技术的发展,尤其是编程语言飞速发展而诞生的一项新的开发语言。随着信息技术的飞速发展,计算机的使用也日渐普及,各种各样游戏也纷纷出现在我们的视野中。本论文从实际应用出发,向大家介绍坦克大战游戏的设计与实现。
该版本的坦克大战是基于Java语言设计开发的,本设计采用面向对象的设计模式,对游戏中的所有物体赋予对象的概念和属性。在开始游戏后,启动客户端,在主程序运行的线程中,画面刷新将以一定的频率采用双缓冲技术对屏幕重绘,实时反映整个游戏的进行状态。用户控制的坦克运行在主线程中,随屏幕刷新的频率而移动。坦克将在游戏开始时进行初始化,然后将坦克绘制在地图的上层。本设计主要实现的功能是让坦克能向八个方向移动,并且打出炮弹,子弹击中敌人坦克,子弹和敌人坦克同时消失,产生爆炸,敌方坦克能智能的移动并且打出炮弹。能够支持单人对战和两人对战两种模式。?
完成这个项目的主要目的是让自己尽可能全面的掌握Java的基础知识。在整个坦克大战的开发过程中将涉及到Java基本知识的大部分内容,这个自己本身对Java知识的巩固有很好的作用。
关键词: Java;坦克;游戏;智能
Java version of the Battle City
Abstract
Java is a new development language in recent decades with the development of various technologies, especially the rapid development of the programming language and birth. With the rapid development of information technology, the use of computers has become more popular, a variety of games have also appeared in our field of vision. From the practical application of this paper, we introduce the design and implementation of Battle City game.
This version of the Battle City is designed and developed based on the Java language , the design of object-oriented design patterns, for all objects in the game to give the concept of objects and attributes . After the beginning of the game , start the client, in the main threads running , the screen will refresh certain frequency using double buffering technology to redraw the screen in real time to reflect the state of the entire game . User-controlled tanks run in the main thread , with the screen refresh frequency and movement. Tanks will be initialized when the game starts , and then draw in the upper tank of the map. The main function is designed so that the tank can be moved to eight directions , and shot shells, bullets hit the enemy tanks, bullets and enemy tanks simultaneously disappear , resulting in an explosion , enemy tanks can move and play smart bombs . Able to support both single- player game and battle modes.
The main objective of this project is to complete as much
文档评论(0)