贪吃蛇游戏是电脑游戏发展史中早期最为经典的游戏之一,无论是在电脑端、移动端、还是游戏机上,都能见到与飞机相关的射击类游戏。不过,最初常见的贪吃蛇游戏是二维平面上的,并且大多以黑白的形式出现,而如今,在电脑上,不仅机型多,而且五颜六色。Java自面世后就非常流行,发展迅速,对C++语言形成了有力冲击,Java技术具有更好的安全性。
因此,本论文主要阐述以面向对象的程序开发语言Java及微信小程序开发工具的实现的贪吃蛇游戏。本游戏通过微信web开发者工具平台开发环境及环境搭建,本贪吃蛇游戏主要可以实现选择难度贪吃蛇吃东西等功能。本设计是一个基于微信小程序的贪吃蛇游戏应用程序采用C/S模式,从需求分析到系统的设计、实现、调试,最终实现实现了贪吃蛇游戏的功能。并经过严格的测试,可以在手机上正常使用。
关键词:C/S;微信小程序;贪吃蛇;游戏; Java
Abstract
Snake game is one of the most classic games in the early development history of computer games. Shooting games related to airplanes can be seen on computer, mobile and game machines. However, at first the common snake game was on a two-dimensional plane and mostly appeared in black and white. Now, on computers, there are not only many models but also many colors. Java has been very popular and developed rapidly since it came out, which has formed a strong impact on C++ language. Java technology has better security. Therefore, this paper focuses on the realization of the snake game with object-oriented programming language Java and WeChat applet development tools. This game is built through WeChat web developer tool platform development environment and environment. This greedy snake game can mainly realize functions such as selecting difficult greedy snakes and eating. This design is a snake game application based on WeChat applet. It adopts C/S mode, from requirement analysis to system design, implementation and debugging, and finally realizes the function of snake game. After strict tests, it can be used normally on mobile phones.
Key words: c/s; WeChat applet; Greedy snake; Games; Java
目 录
本 科 生 毕 业 论 文(设计) I
题目:贪吃蛇小游戏的微信小程序的设计与实现 I
摘 要 II
Abstract III
1绪 论 1
1.1 研究背景 1
1.2 研究意义 2
1.3国内外研究现状 2
2开发技术和开发平台 5
2.1 Java技术在游戏开发中的应用 5
2.1.1游戏开发中的交互和绘图 5
2.1.2多线程技术的应用 5
2.2微信小程序的特点 6
2.3 微信web开发者工具 6
3需求分析 7
3.1可行性分析 7
3.1.1技术可行性 7
3.1.2经济可行性 7
3.1.3运行可行性 8
3.2业务需求分析 8
3.3用户需求分析 9
3.4系统用户用例图 10
3.5功能需求分析 10
4游戏总体设计 11
4.1 游戏功能结构表 11
4.2游戏顺序图 11
4.3游戏流程设计 12
4.3运行环境要求 13
5 游戏功能实现 14
5.1游戏的实现思路 14
5.2游戏的设计方案 14
5.3主界面实现 14
5.4游戏界面功能实现 15
5.5场景选择功能实现 16
5.6贪吃功能实现 17
5.7转弯功能实现 18
6 测试与维护 20
6.1软件测试简介 20
6.2软件测试意义 20
6.3软件测试意义 21
结 论 22
致 谢 23
参考文献 24