HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags.

learn more… | top users | synonyms

48
votes
18answers
23k views

What are good JS libraries for game dev? [closed]

If I decide to write a simple game both text and graphical (2d) what libraries would I use? (Assume we are using a HTML5 compatible browser) The main things I can think of Rendering text on screen ...
40
votes
7answers
3k views

Managing text-maps in a 2D array on to be painted on HTML5 Canvas

So, I'm making a HTML5 RPG just for fun. The map is a <canvas> (512px width, 352px height | 16 tiles across, 11 tiles top to bottom). I want to know if there's a more efficient way to paint the ...
33
votes
20answers
5k views

Examples of good Javascript/HTML5 based games [closed]

Now that Flash is largely being replaced with HTML5 elements (video, audio, canvas, etc.) are there any good examples of web-based games built on completely open standards (meaning Javascript, HTML ...
30
votes
9answers
13k views

How do you prevent your JavaScript / HTML5 web game from being copied or altered?

I'm in the middle of planning a game built using JavaScript and HTML5. I'm having trouble understanding how you could prevent someone from simply copying the JavaScript from the web server and ...
23
votes
6answers
4k views

Anti-cheat Javascript for browser/HTML5 game

I'm planning on venturing on making a single player action rpg in js/html5, and I'd like to prevent cheating. I don't need 100% protection, since it's not going to be a multiplayer game, but I want ...
23
votes
3answers
6k views

Double buffering on HTML5 Canvas game?

My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...
22
votes
7answers
17k views

Packaging HTML5 games as applications for iPhone/Android [closed]

Is it possible to package HTML5 game for iPhone and Android as an application or does it have to be accessed through a browser?
22
votes
2answers
1k views

My game is just about finished! What do I do now? [closed]

I have an HTML5/canvas game just about finished and ready to launch. It's a 2d game in which you explore and disrupt a procedurally-generated landscape, crafting items and structures to survive. I ...
22
votes
12answers
14k views

Isometric game engine in JavaScript/HTML5 [closed]

Is anybody aware of any stable-ish (ie out of alpha) isometric drawing engines for JavaScript/HTML5? I have done some Google searches and found a few, but they were mostly in alpha/invite-only ...
20
votes
7answers
10k views

HTML5 Game (Canvas) - UI Techniques?

I'm in the process of building a JavaScript / HTML5 game (using Canvas) for mobile (Android / iPhone/ WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be ...
19
votes
3answers
3k views

How do I make a JS game downloadable?

I can put the HTML and JavaScript together in the same .html file, but the images need to be separate files. The only solution that comes to my mind is to give to the user a .zip folder. This is not ...
17
votes
6answers
2k views

Essential knowledge for making HTML/JavaScript-based games [closed]

I was wondering if any experts out there could share the knowledge and resources of what is necessary to start making games with the latest HTML standards and JavaScript (or what some like to call ...
15
votes
9answers
6k views

Adding multiplayer to an HTML5 game [closed]

I am interested in making a game that I currently have a co-op experience, however I'm curious as to the best method of implementing this in HTML5. I have made games before using straight C sockets, ...
15
votes
7answers
3k views

How does one optimize an HTML5 Canvas and JavaScript web application for Mobile Safari?

I've created an HTML5 Canvas and JS game that runs great on a desktop or laptop in Chrome (30fps), but on mobile Safari I only get around 8 fps. Are there any simple tips or tricks to increase the ...
15
votes
6answers
6k views

Are there any alternative JS ports of Box2D?

I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library. I ...
14
votes
8answers
7k views

How should I sort images in an isometric game so that they appear in the correct order?

This seems like a rather simple problem but I am having a lot of difficulty with it. What should I do to properly sort images in an isometric game? In a normal 2d top-down game one could use the ...
13
votes
1answer
12k views

Multiplayer HTML5, Node.js, Socket.IO [closed]

I trying create simple Multi-player with HTML5 Canvas, JavaScript(too using John Resig simple Inheritance library) and Node.js with Socket.IO. My client code: var canvas = ...
12
votes
7answers
2k views

Will a Game written using HTML5 work on smartphones?

I would like to write a game that could be played on smart phones and was wondering if HTML5 might be a way to write games to work on a wide selection of smart phones.
12
votes
5answers
2k views

Is HTML5 and Canvas good for rapid prototyping of games? [closed]

Are there frameworks and processes for HTMl5 that can be used for the rapid prototyping of 2D games?
11
votes
8answers
4k views

HTML5 mobile game development vs. native game apps

What is the current state of game engines, frameworks, libraries and conversions related to the HTML5 set of technologies (including CSS3 and JavaScript libraries such as RaphaelJS, Impact, ...
11
votes
4answers
1k views

Will the same Flash game business model work for HTML5 games?

One of the best ways to earn money with Flash games is by making sponsorship deals. The developer puts the sponsor's logo and a link to their site in the game and lets the game spread around the web. ...
11
votes
7answers
5k views

How do you make money from html5 games (i.e sponsorships)?

I make games with flash and I am interested in making games in html but I haven't seen any companies or websites which are willing to buy these games (i.e game sponsorships). I was hoping somebody ...
10
votes
7answers
8k views

To canvas, or not to canvas, when building browser-based games?

Background: I have extensive development background, but the last time I coded a game was many years ago. My Javascript skills are quite limited, and I intend to improve them by building a simple game ...
10
votes
9answers
17k views

What are some good jquery/javascript game engines? [closed]

So I have decided to try a bit of javascript/html5 game development (worked with XNA/Unity so far). Wondering if anyone had any suggestions. I am currently looking at impact, gameQuery and Jaws. ...
10
votes
2answers
586 views

Dirty 2D map rendering

I keep hearing people talk about "dirty rendering" when it comes to map rendering for HTML5. I've Googled and searched the GameDev about it but there isn't much about it. What exactly is it? How to ...
10
votes
0answers
910 views

How to create 2D shadows [duplicate]

I'd like to create lights and shadows in a 2D environment, like in the image below: I did several searches but got no results. Do you have any hint?
9
votes
4answers
4k views

How to bundle a HTML5 JavaScript game as native Windows application?

As the web browsers evolve, HTML5 game development with JavaScript, Canvas, webgl is increasingly becoming popular. The advantage of web-based games compared to native apps is that they run on ...
8
votes
8answers
3k views

HTML5 game obfuscation

HTML5 games have viewable source code. Is there a way to make them like swf file? How to hide the game algorithm? What do you think of the Firefox JavaScript Deobfuscator Plugin and obfuscation?
8
votes
2answers
3k views

Is it possible to develop multiplayer games with HTML5?

I know HTML5 is great for web games, but I don't really know if it's possible to develop online games with multiple users, keeping everybody synchronized and handling logins, et cetera. Is it possible ...
8
votes
1answer
1k views

Set sprite to face direction of mouse

I'm building a html5 canvas game and I need a way to get my sprite to face the mouse cursor. I have the X and Y co-ordinates for the sprite, and also the X and Y co-ordinates of the pointer. All I'm ...
8
votes
3answers
2k views

Web workers for HTML5 game physics simulation?

A bit related to this question. The idea is to guarantee the same physics behavior as much as possible. Would it be possible to run fixed time step physics on a web worker? The UI would update ...
7
votes
5answers
3k views

How do I protect sending scores from HTML5 games to my server

On backend I am using java. I have a game in HTML5; when user completes it I sends an Ajax call to save the score to database. Now, someone can easily use tools like Fiddler and firebug to modify this ...
7
votes
5answers
5k views

Best technique for drawing isometric tiles

I'm thinking about making a simple isometric game with HTML5 Canvas, and wondering what's the fastest way to render the tiles. Since the tiles are diamond shaped, but drawImage draws rectangles, I ...
7
votes
2answers
2k views

Is there a simple way to do true isometric projection with an HTML5 canvas?

Is there a simple way to get a true isometric projection with the HTML5 canvas element?
7
votes
2answers
768 views

Capitalizing on JavaScript's prototypal inheritance

JavaScript has a class-free object system in which objects inherit properties directly from other objects. This is really powerful, but it is unfamiliar to classically trained programmers. If you ...
7
votes
2answers
4k views

Free movement in a tile-based isometric game

Is there a reasonable easy way to implement free movement in a tile-based isometric game? Meaning that the player wouldn't just instantly jump from one tile to another or not be "snapped" to the grid ...
7
votes
3answers
4k views

Javascript and PHP for real-time multiplayer?

I'm wondering if combining Javascript clientside with PHP/mysql serverside is a good idea for HTML5 real-time multiplayer (small scale) browser games? My technical knowledge is very limited, and even ...
7
votes
1answer
323 views

How Do Shapes (Rectangles) Work in Quad Trees?

I've been told that a quad tree is the ideal data structure for my game, but I'm having trouble understanding how exactly shapes work within quad trees. I'm doing this in JavaScript, but I think ...
7
votes
1answer
814 views

Jump handling and gravity

I'm new to game development and am looking for some help on improving my jump handling for a simple side scrolling game I've made. I would like to make the jump last longer if the key is held down ...
7
votes
1answer
854 views

Do you need resource manager for HTML5 games?

Usually, resource manager is needed for desktop/mobile games. But is it needed for HTML5 (browser) games? Resource manager's main responsibility is to make sure there is no clone of a resource in ...
7
votes
2answers
304 views

What is the standard way of delivering HTML5 games to portals and such?

Let me explain what I mean by "standard way of delivering"... Think about Flash games sites. Flash games can be delivered as a single file, either hosted by the site, or, I guess, provided by someone ...
7
votes
2answers
2k views

How to efficiently store and display a tile map on the web?

About These are actually two questions in one. First of all I am looking for a way to efficiently store large amounts of tile data. The other aspect deals with querying the data set and displaying ...
7
votes
2answers
958 views

How to scroll hex tiles?

I don't seem to be able to find an answer to this one. I have a map of hex tiles. I wish to implement scrolling. Code at present: drawTilemap = function() { actualX = Math.floor(viewportX / ...
7
votes
3answers
3k views

Poor performance in android when running APK, runs fine in browser

I have created a small game project in HTML5 using Phaser engine (tried both 1.1.5 and 1.1.6). Then to port it to mobile platform, used Phonegap/Cordova for Windows Phone 8, Android and iOS. In my ...
6
votes
4answers
2k views

Which image format to use for sprites in an HTML5 game?

In a 2D HTML5 game, what is the best image format to use and why? Should I use different formats in different situations? For example, .png for the background image, .jpeg for the animation frames and ...
6
votes
3answers
2k views

How can I deploy a JavaScript game into the iOS app store?

Unfortunately, I don't have a Mac, so I can't develop for iOS. I understand that HTML5 apps run in the browser, but is there a way to make an HTML5 app (e.g. a JavaScript game) and get it deployed ...
6
votes
1answer
354 views

Play game by coding your strategy

I am building a simple strategy game, the goal of the game to teach programming basics to kids. The concept of the game is simple, there will be a set of colony individuals - different type (resource ...
6
votes
7answers
2k views

How long till HTML5 canvas becomes a viable game development platform?

So I have been working on web application. So invariably what it boils down to is making simple games which were previously based on flash or openGL. Now I know apple was moving away from flash ...
6
votes
3answers
641 views

How can I tweak this A* search pathfinding algorithm to handle different terrain movement values?

I'm creating a 2D map-based action game with similar interaction design as Diablo II. In other words, the player clicks around a map to move their player. I just finished player movement and am moving ...
6
votes
2answers
1k views

Is there an ideal width to height ratio?

I would like to know if there is any "ideal" width to height ratio when creating games for the web. My canvas is fluid, and resizes according to the browser width and height. But with all the devices ...