近几年来社会不断地快速发展,也让人们在工作中产生了很多这样那样的压力,随着科技的进步,人们更希望通过网络、通过游戏来释放自己的压力,以往的技术都只是让游戏在笔记本或者移动产品上单独运行,并不可以跨平台操作,这也增加了开发者的工作量,因此经过人们不懈的努力,终于在原有基础上对html进行了改革,这就是HTML5。HTML5具有很多新的特性,最主要的还是它具有跨平台兼容性,不仅可以在电脑上运行,还可以在移动终端运行,不仅如此HTML5中的Canvas元素可以使浏览器直接创建并处理图像,减轻了开发人员的负担,而且使界面更加美观,具有很好的用户体验。减少了用户刷新页面的时间,得到了更多人的认可,因此基于HTML5所制作的游戏也就成了很多人的研究课题。
本文则是通过消消乐游戏来实现基于HTML5的游戏开发的基本过程与方法。文中基于HTML5的消消乐游戏则是将以前的娱乐生活移到的网络上,在网页上也能玩消消乐游戏。通过HTML5的各种标签和功能来实现消消乐游戏,例如通过canvas标签实现游戏部件操作。此消消乐游戏能通过鼠标对游戏的控制实现游戏过程,可以选点击按钮开始游戏,本文通过介绍HTML5的一些特性,以及对游戏引擎的学习,比如cocos2d,unity3d等的认识,并通过当下比较流行的消除类游戏的研发过程分析来使HTML5的内容更加形象,并对HTML5的前景做了一些分析。
【关键词】 网页游戏 HTML5 消消乐游戏 JavaScript
In recent years, the rapid development of society has also caused people to produce a lot of such pressure in the work. With the progress of science and technology, people want to release their pressure through the network and through the game. The past technology only lets the game run on the notebook or the mobile product, and it can not be flat. Platform operation, this also increased the workload of the developer, so after people's unremitting efforts, finally on the original basis of the HTML reform, this is the HTML5. HTML5 has many new features, and most importantly, it has cross platform compatibility. It can not only run on the computer, but also run on mobile terminals. Not only the Canvas elements in the HTML5 can make the browser create and process images directly, reduce the burden on the developers, but also make the interface more beautiful and have a more beautiful interface. A good user experience. Reducing the time of users to refresh the page and get more people's recognition, so the game based on HTML5 has become a research topic of many people.
This paper is to achieve the basic process and method of HTML5 based game development by eliminating Xiao Le game. The elimination game based on HTML5 is a network that moves the previous entertainment life to online games, and also plays games on the web. Through the various labels and functions of HTML5, we can achieve the elimination game, such as the operation of game components through canvas tags. This game can realize the game through the control of the game by the mouse. You can choose the click button to start the game. This article introduces some of the features of HTML5 and the learning of the game engine, such as cocos2d, unity3d and so on, and makes the HTML5 through the analysis of the research and development process of the current popular elimination games. The content is more vivid, and made some analysis of the future of HTML5.
【Key words】web games, HTML5, games, JavaScript.
