安卓系统的贪吃蛇游戏开发
1Android是Google公司于2007年11月5日宣布的基于Linux平台的开源手机操作系统;自公布以来,Android操作系统得到了蓬勃发展,市场占有率逐渐提高。本设计便是利用Java语言在Android平台上进行贪吃蛇游戏的开发。本文首先简要介绍了国内外的智能手机操作系统以及手机应用的发展情况;接着介绍了Android相关技术理论,介绍了Android的发展路程、特点以及其架构。在后文中先详细进行了需求分析和系统设计,提到了本设计的创新之处;再着重说明了贪吃蛇游戏开发所用到的一些类,还介绍了这些类的使用方法,以及自动策略编写过程中用到的算法。
目 录
Abstract 1
Key Words 1
引言 1
1 选题意义 2
1.1 国内外开发现状 2
1.1.1 国内外智能手机操作系统现状 2
1.1.2 国内外智能手机应用程序现状 3
1.2 Android简介 3
1.2.1 安卓的发展 3
1.2.2 Android系统的特点 4
1.2.3 Android系统的架构 4
1.3 系统环境 6
2 需求分析及设计 6
2.1 游戏的需求分析 6
2.1.1 游戏定义 6
2.1.2 可行性分析 6
2.1.3 功能需求 6
2.1.4 数据需求 6
2.2 相关设计思想 6
2.2.1 系统模块结构图 8
2.2.2 游戏流程图 8
2.2.3 功能用例图 9
2.3 创新特色设计 9
2.3.1 创新界面设计 10
2.3.2 创新规则设计 10
2.4 数据库设计 10
3 具体实现 11
3.1 工程文件目录结构与内容 11
3.2 游戏类图 12
3.3 游戏的绘图机制 12
3.4 触屏特效的实现 14
3.4.1 触屏事 *好棒文|www.hbsrm.com +Q: ^351916072*
件的依次响应处理图 15
3.4.2 特效实现 15
3.5 游戏难度的保存——SharedPreference 16
3.6 排行榜 17
3.7 最优策略——自动游戏AI设计 18
4 测试与难点 18
4.1 程序功能的测试功能 18
4.2 程序功能的测试结果 19
4.3 程序功能的测试难点 21
4.3.1 使用GestureDetector的游戏响应延迟问题 21
4.3.2 触屏手指轨迹的绘制 21
5 总结与展望 21
5.1 总结 22
5.2 展望 22
致谢 22
参考文献 22
基于安卓系统的贪吃蛇游戏开发
以及最优策略实现
网络工程专业学生 胡永智
指导教师 朱淑鑫
The Designing of the Snake Game on Android Platform
And the Implementation of the Optimal Strategy
Student majoring in Network Engineering HU Yongzhi
Tutor ZHU Shuxin
Abstract: Android is a Linuxbased operating system for mobile phones and it is openssourced. The Android system is announced by the Google Company on November 5, 2007. Since its publication, Android system has been booming, and its market share has been gradually increasing ever since. In this project, the Java language is used to design the Snake game on the Android platform. Firstly, this paper briefly introduces the development of mobile operating systems as well as mobile applications, both domestic and overseas. Then it introduces the related technical theories of Android, such as its development, specifics and architecture. Later on, the requirement analysis and system design is displayed in detail, and the paper mentions the part of innovation of this project. Next, it highlights those classes which are used in the design of the Snake game application. It also mentions the usage of these classes. Lastly, it describes the algorithm when designing the automatic strategies.
Key Words: Android OS; Snake; optimal strategy
引言随着移动通信的发展以及互联网向移动终端的普及,通讯网络和用户对移动终端的要求愈加提高,而Symbian,Windows Phone,PalmOS,MeeGo,RIM等手机操作系统过于封闭,不能很好的满足用户的需求,因此市场迫切需要一个开放性很强的平台。经过多年的发展,第三代数字通信(3G)技术获得了广泛的接受以及长足发展,为移动终端用户带来了更快的数据传输速率。随着3G网络的使用,移动终端不再仅仅是通讯网络的终端,还将成为互联网的终端和入口;因此,移动终端上的应用软件和配套服务有非常大的发展空间。Google为此于2007年11月推出了一个专为移动设备设计的操作系统平台——Android。Android是一套真正意义上的开放性的移动设备综合平台,它包括操作系统、中间件和一些关键的平台应用。Android是由Linux及Java构成的开源平台,允许所有厂商和个人在其基础上进行开发。Android平台的开放性特点既能促进技术(包括平台自身)的创新,又有助于降低开发成本,还可以使运营商能非常方便地制定自己的特色化的产品。因此,它具有很大的市场发展潜力。
1 选题意义
1.1 国内外开发现状
目 录
Abstract 1
Key Words 1
引言 1
1 选题意义 2
1.1 国内外开发现状 2
1.1.1 国内外智能手机操作系统现状 2
1.1.2 国内外智能手机应用程序现状 3
1.2 Android简介 3
1.2.1 安卓的发展 3
1.2.2 Android系统的特点 4
1.2.3 Android系统的架构 4
1.3 系统环境 6
2 需求分析及设计 6
2.1 游戏的需求分析 6
2.1.1 游戏定义 6
2.1.2 可行性分析 6
2.1.3 功能需求 6
2.1.4 数据需求 6
2.2 相关设计思想 6
2.2.1 系统模块结构图 8
2.2.2 游戏流程图 8
2.2.3 功能用例图 9
2.3 创新特色设计 9
2.3.1 创新界面设计 10
2.3.2 创新规则设计 10
2.4 数据库设计 10
3 具体实现 11
3.1 工程文件目录结构与内容 11
3.2 游戏类图 12
3.3 游戏的绘图机制 12
3.4 触屏特效的实现 14
3.4.1 触屏事 *好棒文|www.hbsrm.com +Q: ^351916072*
件的依次响应处理图 15
3.4.2 特效实现 15
3.5 游戏难度的保存——SharedPreference 16
3.6 排行榜 17
3.7 最优策略——自动游戏AI设计 18
4 测试与难点 18
4.1 程序功能的测试功能 18
4.2 程序功能的测试结果 19
4.3 程序功能的测试难点 21
4.3.1 使用GestureDetector的游戏响应延迟问题 21
4.3.2 触屏手指轨迹的绘制 21
5 总结与展望 21
5.1 总结 22
5.2 展望 22
致谢 22
参考文献 22
基于安卓系统的贪吃蛇游戏开发
以及最优策略实现
网络工程专业学生 胡永智
指导教师 朱淑鑫
The Designing of the Snake Game on Android Platform
And the Implementation of the Optimal Strategy
Student majoring in Network Engineering HU Yongzhi
Tutor ZHU Shuxin
Abstract: Android is a Linuxbased operating system for mobile phones and it is openssourced. The Android system is announced by the Google Company on November 5, 2007. Since its publication, Android system has been booming, and its market share has been gradually increasing ever since. In this project, the Java language is used to design the Snake game on the Android platform. Firstly, this paper briefly introduces the development of mobile operating systems as well as mobile applications, both domestic and overseas. Then it introduces the related technical theories of Android, such as its development, specifics and architecture. Later on, the requirement analysis and system design is displayed in detail, and the paper mentions the part of innovation of this project. Next, it highlights those classes which are used in the design of the Snake game application. It also mentions the usage of these classes. Lastly, it describes the algorithm when designing the automatic strategies.
Key Words: Android OS; Snake; optimal strategy
引言随着移动通信的发展以及互联网向移动终端的普及,通讯网络和用户对移动终端的要求愈加提高,而Symbian,Windows Phone,PalmOS,MeeGo,RIM等手机操作系统过于封闭,不能很好的满足用户的需求,因此市场迫切需要一个开放性很强的平台。经过多年的发展,第三代数字通信(3G)技术获得了广泛的接受以及长足发展,为移动终端用户带来了更快的数据传输速率。随着3G网络的使用,移动终端不再仅仅是通讯网络的终端,还将成为互联网的终端和入口;因此,移动终端上的应用软件和配套服务有非常大的发展空间。Google为此于2007年11月推出了一个专为移动设备设计的操作系统平台——Android。Android是一套真正意义上的开放性的移动设备综合平台,它包括操作系统、中间件和一些关键的平台应用。Android是由Linux及Java构成的开源平台,允许所有厂商和个人在其基础上进行开发。Android平台的开放性特点既能促进技术(包括平台自身)的创新,又有助于降低开发成本,还可以使运营商能非常方便地制定自己的特色化的产品。因此,它具有很大的市场发展潜力。
1 选题意义
1.1 国内外开发现状
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/jsj/jsjkxyjs/1890.html