平顶山学院本科毕业设计基于Flex和Java的网页小游戏连连看的开发摘要游戏在现今社会里正成为人们释放压力、放松自己最行之有效的娱乐方式之一。
随着网络技术的快速发展,Flex网页小游戏以其界面美观、操作简单、无需安装、对硬件要求低等优点备受广大玩家的青睐。
因此,设计一款符合大众风格的网页小游戏具有重要意义。
在分析Flex游戏的基础上,首先通过游戏策划和需求分析确定游戏规则、界面布局和游戏所需实现的功能;然后用Flash Builder 4.6处理各种界面元素,完成游戏界面的制作;最后采用ActionScript3.0语言编程实现游戏选关、游戏开始、时间显示、得分显示、关卡显示、路径判断、图片消除、图片重置,以及重新开始和下一关等功能。
为了体现游戏的竞技性,增加趣味性,特设计Mysql数据库以保存玩家的得分及排名信息,用Java实现对数据库的直接操作,通过BlazeDs 插件连接Flex前端页面和后台Java代码,实现提交分数和查看排行榜的功能。
同时为了提高游戏性能,对路径判断算法进行了优化。
本文论述了网页游戏连连看的开发背景、意义,介绍了系统开发所使用的环境、工具以及开发语言,并对相关的开发技术进行了阐述。
重点论述了游戏策划、需求分析、详细设计、路径判断算法设计、代码实现和游戏测试的过程。
关键词:连连看,Flex,ActionScript3.0,B/S平顶山学院本科毕业设计Linkgame Development Based on Flex and JavaAbstractGame in today's society is becoming people to release pressure, relax the most effective way of a kind of entertainment. Along with the rapid development of network technology, the Flex web games, with its beautiful interface, easy operation, no installation is required, the advantages of low hardware requirements of the majority of players. Therefore, design a popular style of web games is of great significance.On the basis of analyzing the Flex game, first of all, through planning and demand analysis to determine the rules of the game, game interface layout and functionality needed for game; Then use Flash Builder 4.6 processing all kinds of interface elements, complete the game interface; Game selection is realized by using actionscript 3 language programming, game start, time display, scoring display, barriers, reset path elimination judgment, pictures, images, and start again the next level, and other functions. In order to reflect the athletics of the game, add interest, design the Mysql database to hold the player's score and ranking information, Use Java to realize the direct manipulation of the database, through the BlazeDs plugin connects Flex front-end and back-end Java code, submit scores and view the list of functions. At the same time to improve game performance, the path judgment algorithm is optimized.This paper discusses the web linkgame development background, significance, introduced the system development environment, tools, used by as well as the development language, and the development of related technology are expounded. Detailed discusses the planning, requirements analysis, detailed design, game path judgment algorithm design, code realization and game testing process.Keywords: linkgame, Flex, ActionScript3.0, B/S平顶山学院本科毕业设计目录1 绪论 (1)1.1 研究背景 (1)1.2 研究意义 (1)1.3 研究内容 (2)1.4 论文主要工作和结构安排 (2)1.5 本章小结 (2)2 相关技术及工具介绍 (3)2.1 Flex技术 (3)2.1.1 Flex介绍 (3)2.1.2 Flex的应用前景 (3)2.2 ActionScript语言 (4)2.2.1 ActionScript介绍 (4)2.2.2 ActionScript的优点 (5)2.3 Java语言 (5)2.4 BlazeDS技术 (6)2.5 开发工具 (6)2.5.1 Tomcat服务器 (6)2.5.2 Flash Builder (7)2.5.3 MyEclipse (7)2.5.4 MySQL (8)2.6 本章小结 (8)3 策划与需求分析 (9)3.1 游戏策划 (9)3.2 需求分析 (10)3.2.1 界面需求 (10)3.2.2 功能需求 (10)3.3 数据库需求 (17)3.4 本章小结 (17)4 设计与实现 (18)基于Flex和Java的网页小游戏连连看的开发4.1 总体设计 (18)4.2 详细设计和实现 (21)4.2.1 游戏界面 (21)4.2.2 级别选择 (22)4.2.3 游戏说明 (22)4.2.4 开始游戏 (23)4.2.5 图片区的显示 (24)4.2.6 关卡计时器 (24)4.2.7 得分记录 (24)4.2.8 关卡记录 (24)4.2.9 消除图片 (25)4.2.10 重置图片 (25)4.2.11 查看排行榜 (25)4.2.12 后台数据操作 (26)4.3 本章小结 (27)5 路径判断算法 (28)5.1 算法构思 (28)5.1.1 简化地图路径 (28)5.1.2 数组判断 (28)5.2 算法实现 (30)5.3 本章小结 (31)6 测试 (32)6.1 测试步骤 (32)6.1.1 界面测试 (32)6.1.2 功能测试 (32)6.2 测试结果 (34)6.3 测试分析 (34)6.4 本章小结 (34)7 结束语 (35)附录 (36)参考文献 (43)致谢 (44)平顶山学院本科毕业设计1 绪论连连看小游戏的开发是为了满足玩家休闲的需要。