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.

 

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.

相关文章
|
4月前
|
数据采集 监控 JavaScript
巧用简单工具:PHP使用simple_html_dom库助你轻松爬取JD.com
本文将介绍如何使用PHP语言和一个简单的第三方库simple_html_dom来爬取JD.com的商品信息。simple_html_dom是一个轻量级的HTML解析器,它可以方便地从HTML文档中提取元素和属性,而无需使用正则表达式或DOM操作。本文将通过一个实例来展示如何使用simple_html_dom库来爬取JD.com的商品名称、价格、评分和评论数,并将结果保存到CSV文件中。本文还将介绍如何使用代理IP技术来避免被目标网站封禁或限制。
巧用简单工具:PHP使用simple_html_dom库助你轻松爬取JD.com
|
6月前
|
JSON 前端开发 JavaScript
SAP UI5 index.html 里的 bootstrap script 介绍
SAP UI5 index.html 里的 bootstrap script 介绍
28 0
HTML - Table
HTML - Table
69 0
HTML - Table
|
Python
解决报错:jinja2.exceptions.TemplateNotFound: index.html
一、问题描述 (1)首先写了一个简单的登录账号密码的页面:
1183 0
解决报错:jinja2.exceptions.TemplateNotFound: index.html
|
存储 移动开发 JSON
HTML5的IndexedDB数据库
HTML5的IndexedDB数据库
185 0
HTML5的IndexedDB数据库
|
移动开发
webstorm auto complete for html:
比如View,按下tab,即可自动补完(这里是rn的jsx语法,和html类似)
813 0
|
PHP
解决Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.问题
解决步骤: 1、分析问题是因为laravel5.1不赞成使用illuminate/html而推荐使用laravelcollective/html包,所以我们利用composer命令移除illuminate/html包再安装laravelcollective/html包 2、进入homestead...
1115 0
|
Web App开发 移动开发 前端开发
基于 CSS3 Media Queries 的 HTML5 应用
先来介绍下 media,确切的说应该是 CSS media queries(CSS 媒体查询),媒体查询包含了一个媒体类型和至少一个使用如宽度、高度和颜色等媒体属性来限制样式表范围的表达式。CSS3 加入的媒体查询使得无需修改内容便可以使样式应用于某些特定的设备范围。
906 0