摘要随着internet的迅速发展,社会已经进入了网络时代。
电子商务,网上购物,网上调查,网上学校等等已经确实地存在于我们身边了,而掌握网页和网站的设计技术已经成为程序员的必备技能,将一些编程技术融入网站设计中,可以建立出强大功能的动态网页。
该建立出具有强大功能的动态网页,该论文就是基于以上目的的,通过html 技术来完成网站的设计。
本系统就是利用javaapplet,应用html技术和采用java语言来构成网页游戏应用的基本代码,完成了基于html的网页小游戏。
它操作简单,结果清晰。
本文只要介绍了俄罗斯方块网页小游戏设计开发的整个过程,本网页在开发方法上采用了结构化模块的设计方法,根据用户的需求及程序的应用与响应,将程序各个部分置于不同的模块当中,一一实现各模块,进而完成整个系统的开发。
本游戏界面由网页框架,游戏主屏幕,操作按钮,游戏状态组成。
主要模块分别是图形产生模块,图形移动模块,障碍物模块,中央处理模块,面板显示模块。
最后,对本次设计取得的成绩和不足做出概况性的总结,并对未来的工作进行展望。
关键词:互联网;俄罗斯方块网页小游戏;javaappletAbstractWith the rapid development of Internet, the society has entered the Internet age. E-commerce, online shopping, online surveys, online schools have indeed exist around us, and the master page and site design technology has become an essential skill of the programmer, programming technology into the website design, you can create a powerful dynamic web pages. The establishment of a powerful dynamic pages, the paper is based on the above purpose, html technology to complete the design of the site.The system is the use of javaapplet application html and java language to constitute the application of the basic code of web games, html-based web game. It is simple, clear results. This article as long as the the the whole process of of the the web pages of the Russian box small game design and development is introduced the, this web page in the your development method, on the the uses a the the design method of of the structured module, according to the the the application of and response of the the needs of users and procedures, will the the various parts of of the procedures placed in the different modules among the, one by one each module to achieve, and then complete the the the development of of the the entire system.The game interface consists of a web framework, the main game screen, the buttons, the game state. The to main module is or module, Graph moving module, obstructions module, the central processing module Transportation, Panel the display module in if you are, respectively is the Graph-generating.Finally, make an overview summary of the achievements and shortcomings of the design, and future work prospects.Key words:Internet;the web pages of the Russian box small game;javaapplet目录1 绪论 (1)1.1 开发背景 (1)2 系统开发平台 (2)2.1 开发工具简介 (2)2.1.1 JDK (2)2.1.2 Eclipse 4.2 (2)2.2 系统配置 (2)2.2.1 安装JDK (2)2.2.2 Eclipse的安装 (3)2.2.2.1 Eclipse软件安装 (3)2.2.2.2 Eclipse插件安装 (3)3 系统分析 (6)3.1 需求分析 (6)3.2 可行性研究 (6)4 系统设计 (7)4.1 功能概述 (7)4.1.1 网页框架功能 (7)4.1.2 游戏功能 (7)5 详细设计 (8)5.1网页框架设计 (8)5.2 游戏设计 (9)5.2.1 游戏主要框架 (9)5.2.2 java程序功能与实现 (10)5.2.2.1 俄罗斯方块背景棋盘的产生 (10)5.2.2.2 俄罗斯方块功能按钮的产生 (12)5.2.2.3 俄罗斯方块的事件处理 (17)5.2.2.3.1开始按钮 (17)5.2.2.3.2重新开始按钮 (18)5.2.2.3.3暂停按钮 (20)5.2.2.3.4继续按钮 (20)5.2.2.3.5关于按钮 (21)5.2.2.3.6游戏结束事件处理 (22)5.2.2.4 俄罗斯方块的产生 (23)5.2.2.5 俄罗斯方块预览区方块的产生 (29)5.2.2.6 俄罗斯方块关数以及分数的处理 (31)6 结论 (34)主要参考文献: (35)致谢 (36)1 绪论1.1 开发背景中国互联网络信息中心(以下简称CNNIC)自2008年开始,以每年2次的互联网发展统计报告为基础,对于中国网络游戏行业进行进一步细分研究,连续开展了2008年和2009年网络游戏用户调研并撰写了《中国网络游戏用户调研分析报告》,取得了一定的效果。
为了更加完善的了解中国网络游戏市场状况,CNNIC互联网发展研究部将网络游戏类型进一步细化,针对正处于高速发展期的网页游戏(Web Game/Browser Game)做出专项调研。
中国网页游戏近两年发展迅速,尽管在用户规模上与传统网络游戏还存在很大差距,但在我国整体网络游戏用户增长速度趋于放缓的情况下,网页游戏却持续增长,已经成为带动网络游戏发展的新生力量。
与此同时,网页游戏出现了一些问题:首先,由于网页游戏的进入门槛相对于传统网络游戏低,主要以中小企业为主,其自身原创力不足,抄袭、复制问题严重,导致盲目量产、同质化现象严重;其次,在发展过程中,企业缺乏清晰的盈利模式,忽视社会责任和行业发展状况,仅仅考虑短期利益;第三,由于产品品质和服务等原因,造成个人用户生命周期短,更新换代速度过快,用户黏性低;最后,网页游戏中类似“色情”、“暴力”、“赌博”等方面的内容,也会对用户的行为产生负面影响,众多因素决定了政府和企业对网页游戏市场了解的迫切需求。
综上所述,中国互联网络信息中心(CNNIC)互联网发展研究部开展此次2010年中国网页游戏研究,对于该游戏类型的用户行为与态度、心理认知等状况做出调查,了解该游戏类型市场状况以及存在的问题,为政府以及运营商发展提供有力的支持。
2 系统开发平台2.1 开发工具简介本系统的开发主要使用的是javaapplet[1],所以开发工具只用了eclipse和记事本,而语言则选择了java[2]。
2.1.1 JDKJDK(Java Development Kit)[3]是Sun Microsystems针对Java开发员的产品。
自从Java推出以来,JDK已经成为使用最广泛的Java SDK。
JDK是整个Java的核心,包括了Java运行环境,Java工具和Java基础的类库。
JDK是学好Java的第一步。
而专门运行在x86平台的Jrocket[4]在服务器端运行效率也要比Sun JDK 好很多。
从SUN的JDK1.5开始,提供了泛型等非常使用的功能,其版本也不断更新,运行效率得到了非常大的提高。
现在JDK的最新版本为JDK1.7,本系统使用的是JDK1.6。
2.1.2 Eclipse 4.2Eclipse[9]是一个开放源代码的、基于Java的可扩展开发平台。
就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境。
幸运的是,Eclipse 附带了一个标准的插件集,包括Java开发工具(Java Development Kit,JDK)。
2.2 系统配置2.2.1 安装JDK将JDK 1.6安装到C:\Program Files目录下,然后配置环境变量◆进系统-->高级-->环境变量,在系统环境变量中新建下列环境变量,并赋值如下[10]:◆java_home=C:\Program Files\Java\jdk1.6◆catalina_home=C:\apache-tomcat-6.0.18◆classpath=.;C:\ProgramFiles\Java\jdk1.6\libpath=%path%;%java_home%\bin;%java_home%\lib;%catalina_home%\bin;◆%catalina_home%\lib2.2.2 Eclipse的安装2.2.2.1 Eclipse软件安装Eclipse是一款绿色软件,安装很方便,只要将下载的压缩包文件解压到指定目录即可。