吉林大学珠海学院毕业设计基于H5的角色扮演游戏系别:计算机科学与技术系专业名称:计算机科学与技术学生姓名:学号:指导教师姓名、职称:讲师完成日期:2017年4月10日I摘要目前,游戏行业的发展,游戏的种类也是各式各样的,多姿多彩,主要分为6类:角色扮演、冒险、动作、休闲、模拟和其他,他们各有几十种分支,形成了庞大的游戏体系。然后按照游戏平台分类的话,可以分为街机游戏、手机游戏、主机游戏、电脑游戏、、网页游戏等等。其中网页游戏是开发于Web浏览器的多人网络在线互动游戏,不需要下载游戏客户端,不会出现机器配置不够的问题,最重要的是开启、关闭与切换极其方便,尤其适合时间比较闲散的人群。原本的网页游戏是Flash,但是HTML5的出现,使得网页游戏有了很大的改变。开发者可以使用新特性Canvas和JavaScript开发游戏,更有强大的Webgl可以制作3D网页游戏。所以网页游戏的前景是一片光明。我这次所做的游戏是使用的Canvas开发的一款小型角色扮演游戏。使用了HTML5和JavaScript开的网页游戏。关键词:HTML5;网页游戏;Canvas;JavaScriptIIAbstractAtpresent,thedevelopmentofthegameindustry,thegameisalsoavarietyoftypes,colorful,mainlydividedintosixcategories:role-playing,adventure,action,leisure,simulationandother,theyhavedozensofbranches,formedHugegamesystem.Andthenclassifiedaccordingtothegameplatform,canbedividedintoarcadegames,mobilegames,hostgames,computergames,webgamesandsoon.WhichisthedevelopmentofwebgamesintheWebbrowsermultiplayeronlineinteractivegame,donotneedtodownloadthegameclient,themachineconfigurationwillnotbeenoughproblems,themostimportantthingistoopen,closeandswitchextremelyconvenient,especiallyformoreidletimeOfthecrowd.TheoriginalwebgameisFlash,buttheemergenceofHTML5,makingthewebgamehaschangedalot.DeveloperscanusethenewfeaturesCanvasandJavaScripttodevelopgames,morepowerfulWebglcancreate3Dwebgames.SotheprospectsforwebgamesarebrightThegameImadethistimewasasmallrole-playinggamedevelopedbyCanvas.UseHTML5andJavaScripttoopenwebgames.Keywords:HTML5;Webgames;Canvas;JavaScriptIII目录绪论······················································································································11系统简介································································································································11.1网站简介·····················································································································11.2开发环境简介·············································································································11.2.1HTML5概述·····································································································21.2.2JavaScript概述·····························································································22游戏需求分析························································································································42.1系统需求·····················································································································42.2需求分析·····················································································································42.3系统功能分析图·········································································································53游戏总体设计························································································································63.1游戏流程图·················································································································63.2总体功能设计·············································································································63.2.1游戏设计目标··································································································63.3游戏角色和剧情介绍·································································································73.3.1游戏角色··········································································································73.3.2剧情简单分析··································································································73.4游戏类型的分析·········································································································73.4.1地图属性介绍··································································································73.4.2游戏角色类的设计···························································································93.5游戏的键盘事件和主循环·······················································································123.5.1游戏键盘事件的响应····················································································123.5.2游戏的主要循环函数····················································································134设计思想与实现···················································································································154.1游戏开始的界面·······································································································154.2游戏场景···················································································································164.4游戏失败界面···········································································································17IV5系统测试与运行···················································································································185.1系统运行环境···········································································································185.2游戏测试···················································································································186总结与展望···················