登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 物联网工程 > 正文

基于移动平台的3D魔方游戏设计与实现毕业论文

 2021-11-15 09:11  

论文总字数:20509字

摘 要

原型为现代较流行的魔方玩具,结合现代网络游戏中魔方素材类型游戏的缺失,使用web开发技术来实现一款多人交互的3D魔方app。

本app对于本游戏的功能模块主要是用户模块、游戏设置模块、单人游戏模块、多人游戏模块和个人记录模块。用户模块主要是用于用户的注册和登录功能服务。其中为玩家的个人信息和相关游戏记录。游戏设置模块:该模块主要是对于玩家自主性所加的功能,更改玩家的游戏设置。单人游戏模块主要是用于玩家个人独自完成魔方还原。多人游戏模块主要用于完成多人协同功能。

在通过手机屏幕的控制下能够实现3D魔方模型的转动,通过相应游戏引擎的算法来实现屏幕二维坐标信息与3D场景中信息的转换。并通过3D建模技术实现对魔方被选择行或列的识别,并能够进行对应方向的旋转动画加载演示。而且通过对各个魔方块的id标识来实现对魔方的自动还原和打乱功能。其中自动还原算法是通过网络上流行的简易算法层先法来实现的。通过网络服务商提供的api接口来实现多人协同和对应个人数据的保存与修改。而且对应玩家出现网络连接不良的情况下,app也有对应的免登录单机模式来满足玩家的游戏需求。

基于AndroidStudio3.0开发环境,通过three.js游戏引擎来实现对应的3D魔方模型的构建,并通过Bmob后端云服务平台来搭建通讯平台和云端数据库,来实现3D魔方游戏。经过测试证明,本app的开发实现了预期目标。

关键字:3D魔方,云服务,three.js。

Abstract

The prototype is the more popular cube toy in modern times. Combined with the lack of cube material type game in modern online games, web development technology is used to realize a 3D cube app with multi-user interaction.

The function modules of this app for this game are mainly user module, game setting module, single player game module, multi player game module and personal record module. User module is mainly used for user registration and login function services. The personal information and related game records of the players are included. Game setting module: This module is mainly for the function added by player autonomy to change player's game settings. The single player game module is mainly used for players to complete the cube restoration alone. The multiplayer game module is mainly used to complete the function of multiplayer cooperation.

Under the control of the mobile screen, the 3D cube model can rotate, and the two-dimensional coordinate information of the screen and the information in the 3D scene can be transformed by the algorithm of the corresponding game engine. And 3D modeling technology is used to identify the selected row or column of the cube, and the rotation animation of the corresponding direction can be displayed. And through the identification of each cube's ID, the cube can be automatically restored and scrambled. Among them, the automatic restoration algorithm is realized by the popular simple algorithm layer first method on the network. Through the API interface provided by the network service provider, the cooperation of multiple people and the saving and modification of corresponding personal data can be realized. In addition, when the network connection of the corresponding players is poor, the app also has a corresponding login free stand-alone mode to meet the game needs of the players.

Based on Android studio 3.0 development environment, through three.js The game engine is used to build the corresponding 3D cube model, and the bmob back-end cloud service platform is used to build the communication platform and cloud database to realize the 3D cube game. After testing, the development of this app has achieved the expected goal.

Keywords: 3D cube, cloud service, three.js 。

目录

第1章绪论 1

1.1研究背景来源及其意义 1

1.2国内外研究现状 2

1.3研究内容 2

第2章3D魔方游戏设计方案 3

2.1游戏开发环境 3

2.2总体模块设计 3

2.3系统的功能模块 4

第3章魔方的3D建模 6

3.1建模工具three.js游戏引擎 6

3.1.1场景 6

3.1.2相机 7

3.1.3渲染器 8

3.2魔方的3D构建 8

3.2.1魔方的结构描述 8

3.2.2魔方块的三维信息 9

3.3魔方建模实现 10

3.3.1加载默认设置 10

3.3.2.OrbitControls.js文件的引入 10

第4章魔方的旋转动画 13

4.1三维空间集合概念描述 13

4.1.1点 13

4.1.2向量 13

4.2旋转动画制作 13

4.2.1获取触摸点 14

4.2.2获得转动方向 14

4.2.3获取转动层 15

第5章自动还原算法 17

5.1魔方的解析概念 17

5.2魔方公式的程序化 18

第6章多人协同 21

6.1Bmob云服务平台 21

6.1.1数据服务 21

6.1.2即时通讯 21

6.2数据库设计 21

6.3 多人协同功能开发 22

6.3.1多人协同界面开发 22

6.3.2后端云的使用 25

6.3.3多人协同功能的工作模式 28

第7章全文总结 31

7.1总结 31

7.2 需要改进的不足之处 31

参考文献 32

致谢 33

第1章绪论

1.1研究背景来源及其意义

历史就像一个不断翻滚的车轮,经过上千年的发展与变化留下了众多的文明遗迹。这些遗迹就像大浪淘沙般在时光中渐渐消失。其中对于人类历史上的伟大瑰宝也在时代的发展中一代代流传下来。而这些人类文明的瑰宝有的在不断消失也有的经历了时代的浪潮在新时代中,涌现新的活力。

这些文化瑰宝中如万里长城、秦始皇陵等大规模古代建筑还保存完好,但在其中留下的益智类玩具或奇妙设计却因众人的疏忽或各个时代的特色而逐渐消失在人们眼中。其中保留下来的具有特色的就有象棋、围棋等发展成世界性的对弈活动竞技类的,也有扑克牌等被广泛应用于博彩业和娱乐活动中的,也有在小范围群体中流传的益智类的比如魔方、七巧板、九连环和华容道等。这些游戏作为人类文明的智慧结晶不仅是对人类智慧的肯定也是对人类和其他生物的区分标准之一。比如围棋涉及到了推理学、博弈学以及相应的心理策略,且由此引发出棋谱等“棋文化”的分支。而扑克则涉及到了数学、博弈心理学、经济学等大量学科。除此之外,剩下的以魔方为代表的益智玩具则着重于人体神经反应的训练、大脑记忆力的开发、手部大脑的协调程度等等。

而现代的魔方是我们的日常生活中并不陌生,它是一种对于人体的大脑锻炼、人体神经反应都有益的工具。魔方的历史很短暂,但毫无疑问它在益智玩具中占有重要席位。魔方又叫鲁比克方块。世界上第一个魔方是由匈牙利教授鲁比克·艾尔内发明。泛指意义下的魔方,是指狭义的三阶魔方。三阶魔方形状通常是正方体,由有弹性的硬塑料或其他摸具制成。广义的魔方,可以指各类可以通过转动打乱和复原的几何体。其中有代表性的如金字塔魔方、镜面魔方等。

请支付后下载全文,论文总字数:20509字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图