HTML5 game engines

 

The following are few examples of game engines implemented with HTML5 and JavaScript:

  • Construct 2: One of the first WebGL enabled HTML5 game engines. Exports purely to HTML5 and JavaScript. Uses Canvas only and is extensible with JavaScript plugins.
  • Isongenic Engine: One of the most promising engines out there today. Massively multiplayer networking built in, uses Node.js and MongoDB, and has canvas or DOM-based graphics.
  • Impact
  • CutJS: Lightweight, fast, interactable 2D HTML5 rendering engine for game development. Open-source and cross-platform.
  • Canvace
  • Crafty
  • PlayCanvas: A collaborative, cloud-hosted game engine with a visual editor, in-browser code editing and one click publishing.
  • MightyEngine: 2D game engine supporting Web, Android, iOS platforms. Build in editor to manage projects, assets, maps.
  • Game Develop: A game development software exporting to native and HTML5 games. Uses Pixi.js to render using WebGL or canvas.
  • EnchantJS: A simple Javascript framework for creating 2D and 3D HTML5 games. Has good documentation and easy to follow tutorials for getting started
  • WiMi5: A video game platform that eases the creation, publication and monetization processes of HTML5 games, using a cloud based editor.
  • Phaser: 2D game enginge supporting Web, Android, IOS platforms

HTML5 game tools

  • Clay.io: Distribution, Retention, Social and Monetization tools. Easy integration of user accounts, high scores, achievements, cross promotion, in-game payments, analytics etc...
  • Pixi.js: 2D rendering engine using WebGL with a canvas fallback.
  • stat.js: Simple JavaScript performance monitor

Useful technologies

The following can be useful in developing games based on Web technologies.

  • Canvas: 2-D graphics.
  • WebGL: 3-D graphics.
  • Audio: HTML5 element, Web Audio API
  • WebSockets: can be used for real-time communication between a player and the game server, to support multi-player games.
  • Node.js: Node is often used as a multiplayer game server, controlling the logic and handling the WebSockets connections to the players. It can be used for player authentication and the storage of data so game play can persist over multiple game sessions. This is all made relatively easy with great third-party modules, like Socket.IO for WebSockets, and others that handle Redis and MongoDB for storage, for example.
  • DOM Storage is great for storing data locally on the player's device. This way you can cache game data and allow the game to pick up where the player left off.
  • The Full Screen API allows you to expand any HTML element to fill the user's screen, even if the browser isn’t running full-screen itself.
  • Application Cache and the ServiceWorker API: One of the main differences between Web apps and native apps is that native apps can be run offline. Technologies such as Application Cache and Service Worker allow for a website or a Web app to cache necessary assets so it can still run while offline. This includes things like JavaScript files, CSS and images. Combining this technique with intelligent use of things like localStorage will allow your game to continue working even if the Internet connection goes down. You just sync up all the changes when it gets connected again.
  • Emscripten enables you to port a game written in C or C++ over to JavaScript. The Bananabread demo used Emscripten.
  • The Gamepad API is available in latest versions of Firefox and Chrome. What is most interesting about the Gamepad API is that it might be just what finally justifies HTML5 gaming on a TV or console. Who wants to use a keyboard and mouse while sitting on the sofa?
  • The Pointer Lock API is an attempt to improve the mouse as an input device, used in situations such as games and 3D visualizations where the mouse position rotates or moves you around a 3D space. As it stands, there would still be a cursor moving around the screen causing all sorts of trouble when you want to click on something in your game. With this API, you can lock your mouse position and stop it from getting in the way and being a nuisance.

Not every browser supports every part of HTML5. For example, Canvas isn’t supported out of the box by any Internet Explorer below version 9. However, you can use Explorer Canvas to replicate canvas functionality (but that is not ideal and does not perform as well). WebSockets is supported by IE only in IE 10, and it isn’t supported in the stock browser of Android. But again, you can fake this by using Flash for the sockets, such as with Socket.IO. While supported in the latest versions of every other browser, WebGL in Internet Explorer requires at least version 11.

Game template

You can use the Mortar Game Stub template to get a quick start on an HTML5 game, or you can use it to get ideas on best practices.

时间: 2024-09-24 23:28:14

HTML5 game engines的相关文章

HTML5学习资源网址收集

HTML5学习资源整理收集,相信对html5学习者有用. W3C HTML5 规范: http://www.w3.org/TR/html5/ HTML5 与 HTML4的差异:http://www.w3.org/TR/html5-diff/ Opera dev: Improve your forms with HTML5: http://dev.opera.com/articles/view/improve-your-forms-using-html5/ Comparison of layout

Webkit中HTML5 Video的实现分析 (二) - MediaPlayerFactory & RenderVideo的绘制操作

MediaPlayerFactory MediaPlayerFactory像是一个解码库一样,初始化时,各个可用的播放器(MediaPlayerPrivate)向它注册.当需要解码时,由它给出一个合适的播放器(呼叫MediaPlayerPrivate::constructor,即MediaPlayerPrivate::create)创建一个实例[由MediaPlayer:: loadWithNextMediaEngine执行]).所以MediaPlayer与MediaPlayerPrivate应

加入HTML5支持 Excel网页版详细内容曝光

Web版Excel截图 Web版Excel依然充满Metro元素 这个是Web版PowerPiont 电脑教程 Web版Excel支持HTML5 从图中可以看出,网页版的Excel和桌面版本极其相似.微软表示,网页版Excel整个界面十分清爽,根据设备不同可以自动调整,用户能够在不同的设备上都体验到一样的Excel.

HTML5 Canvas捕获用于游戏开发的键盘、鼠标和触摸事件

学习如何处理键盘和鼠标事件,如何阻止 Web 浏览器的默认事件行为,以及如何向游戏对象的某种逻辑表示传播事件.此外,还将学习如何处理 iPhone 和 iPad 等移动设备上与设备无关的(device-agnostic)输入. 令拥有 Flash 或 Silverlight 背景的开发人员感到惊讶的是,为 HTML5 Canvas 编写的应用程序在处理用户输入方面并没有什么特立独行之处.实质上,从启用了 JavaScript 的 Web 浏览器诞生之初开始,HTML 用户输入就涉及到使用内置于浏

Html5 CSS3新标签解释及用法

HTML 5 是一个新的网络标准,目标在于取代现有的 HTML 4.01, XHTML 1.0 and DOM Level 2 HTML 标准.它希望能够减少浏览器对于需要插件的丰富性网络应用服务(plug-in-based rich internet application,RIA),如Adobe Flash, Microsoft Silverlight, 与 Sun JavaFX 的需求. HTML 5 提供了一些新的元素和属性,反映典型的现代用法网站.其中有些是技术上类似 <div> 和

html5文件上传

上文介绍了如何通过ajax异步上传文件,html5对file的新接口,可以使得在页面上,对用户也有更好的体验. 页面上要做的,仅仅是添加一个html标签: [cce lang="html"] <input id="track" name="track" type="file" multiple="multiple" onchange="showInfo();" /> [/cc

html5+-新手学习HTML5的几个小问题?

问题描述 新手学习HTML5的几个小问题? 在下刚学HTML5不久,正在自制一个HTML5视频播放器(即使用video标签),现遇到如下几个问题,想了好久不能解决?求大神解答: ①IE下视频全屏(即video.msRequestFullscreen();)下我的自制控制条(我没有使用video标签自己的控制条)不见了?这是怎么回事?(附:这个功能在Chrome下我以调试正常) ②IE下切换视频分辨率时,我明明设置了将切换后视频的播放进度设为切换之前视频的播放进度(即 var vTime = vi

【HTML5】H5新标签大实例

以下是测试Html5新标签性能的大实例: 首先是效果: 代码: <html> <head> <title>Test</title> </head> <body> <h2>header标签定义文档的页眉(介绍信息)</h2> <header> <h3>Welcome to my homepage</h3> <p>My name is Donald Duck</

HTML5中语义化 b 和 i 标签

  b 和 i 标签在现在的 Web 标准潜规则中是不推荐使用,甚至是反对使用的,因为认为他们只是"表现"粗体和斜体,而没有任何"语义".更多的用 strong 和 em 标签代替. 而在新的 HTML5 工作草案 中对于 b 和 i 标签是这样定义的: 从规范中可以注意到:b 和 i 元素将被赋予真正的语义.更应有预见性注意 b .i 与 strong .em 的不同使用 . A Preview of HTML 5 The b element now repres