基于安卓的2048益智类游戏的设计与实现
摘要:现如今随着社会日新月异,人们越来越离不开智能手机所提供的灵活性与便携性。安卓系统是在这股手机发展迅猛的潮流中其市场占有率过半的手机平台,基于安卓系统的游戏开发有着不可估量的前景。
本论文提出一款基于安卓系统的“2048”游戏设计,并对其具体开发与实现进行剖析,决定了系统的相关功能要求,设计了游戏等级设置、菜单接口、图像和布局。在一定安卓理论的基础上对每个板块的功能实现作出了详细的阐述,最后完成游戏测试。此款游戏为益智类游戏,其内容主要包括游戏登陆、用户登陆、关卡选择、呈现游戏界面、重新开始游戏、当前分数和最高分数、游戏帮助、排行榜等板块。
本论文为安卓系统解决“2048”的开发问题,开发安卓游戏提供理论依据和指导。简单的益智类游戏可以使玩家在娱乐中不断的开发大脑,必将在我们以后的快节奏生活中发挥着重要的缓解压力作用。
关键词:安卓,游戏,益智,系统
Design and Implementation of 2048 Games Based on Android
Abstract:Nowadays, with the changing society, people are increasingly dependent on the flexibility and portability provided by smart phones. Android is the mobile platform with more than half of the market share in the rapid development of mobile phones. The development of games based on android system has an inestimable prospect.
This paper proposes a “2048” game design based on android system, and analyzes its specific development and implementation, determines the system’s relevant functional requirements, and designs the game level Settings, menu interface, graphics and layout. On the basis of certain android theory, the function realization of each plate is elaborated in detail, and finally the game test is completed. This game is a puzzle game, its content mainly includes the game login, user login, level selection, show the game interface, restart the game, the current score and the highest score, game help, leaderboard and other parts.
This paper provides theoretical basis and guidance for android system to solve the development problem of “2048” and to develop android games. Simple puzzle games can make the players in the entertainment of continuous brain development, will play an important role in our future fast-paced life to relieve stress.
Key words: Android, Game, Puzzle, System
目 录
第1章 绪 论 1
1.1研究背景和意义 1
1.1.1 2048游戏市场的背景分析 1
1.1.2 本课题的研究意义 1
1.2 国内外研究现状 2
1.3本课题研究的主要内容 2
第2章 开发环境的介绍和搭建 3
2.1 开发环境的介绍 3
2.1.1 JDK的介绍 3
2.1.2 Android Studio的介绍 3
2.1.3 Android SDK的介绍 3
2.2 开发环境的搭建 3
2.2.1 JDK的安装与环境变量配置 3
2.2.2 Android Studio与Android SDK的安装与配置 4
2.2.3 创建模拟器 4
第3章 系统的需求分析和概要设计 8
3.1系统需求分析 8
3.1.1系统功能需求分析 8
3.1.2游戏基本规则 9
3.2系统概要设计 9
3.2.1系统流程的设计 9
3.2.2系统模块设计 11
第4章 系统实现 14
4.1 游戏框架搭建 14
4.2 登陆界面的实现 14
4.3游戏界面的实现 15
4.3.1 游戏布局的实现 15
4.3.2 游戏的初始化 15
4.4 游戏滑屏卡片移动的实现 17
4.5 计分与关卡的实现 19
4.5.1 游戏计数的实现 19
4.5.2 游戏关卡的实现 19
4.6 游戏排行榜的实现 22
第5章 系统测试 24
5.1测试目的和意义 24
5.2 测试方法 24
5.3 测试用例 27
第6章 总结与展望 29
6.1 论文总结 29
6.2 展望 29
参考文献 30
致 谢 31