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

14
votes
8answers
6k 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 ...
46
votes
18answers
22k 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 ...
2
votes
1answer
1k views

Shoot a bullet towards cursor - top down 2d

I am making a 2D topdown shooter game, in which the player's movement is controlled with WASD and gun with the mouse. I'm having a hard time figuring out how to update the position of the bullet as it ...
28
votes
9answers
12k 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 ...
8
votes
1answer
998 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 ...
4
votes
5answers
5k views

Which free HTML5-based game engine meets these requirements? [closed]

I am experienced with traditional JS and HTML but new to HTML5. I want to develop games in HTML5 so that it can work on all devices and browsers, including IE. Additionally, I require the following ...
10
votes
0answers
908 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?
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 ...
7
votes
5answers
4k 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 ...
3
votes
1answer
796 views

Lightwight cross browser library for server side push?

I am looking for a lightweight javascript library that allows the server to push update information to the client reliably and regularly. We use a fixed turn time of 300ms and often there are only ...
7
votes
5answers
2k 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
1answer
706 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 ...
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?
4
votes
2answers
1k views

canvas ball physics animation

I want to animate ball in html canvas like this. ctx.beginPath(); ctx.arc(75, 75, 10, 0, Math.PI*2, true); ctx.closePath(); ctx.fill(); start position is left top corner and ball's maximum ...
1
vote
3answers
1k views

2D maps, how to structure?

I'm new to this. And I don't really understand 2D tile maps. The tutorials I've read use arrays, but doesn't this get really difficult to manage when they get big? And what if I want different ...
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 ...
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. ...
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 ...
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 ...
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 ...
7
votes
3answers
3k 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
2answers
754 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 ...
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?
10
votes
7answers
7k 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 ...
3
votes
2answers
3k views

HTML5 canvas screen to isometric coordinate conversion

I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates. My code now is: var mouseX = 0; var mouseY = 0; ...
5
votes
3answers
7k views

Where is the Aves game engine?

The Aves game engine made a splash last spring/summer, with very impressive demo videos. I went back to check on them, and it looks like their site has long since died. Google also doesn't seem to ...
3
votes
3answers
466 views

What is better for the overall performance and feel of the game: one setInterval performing all the work, or many of them doing individual tasks?

This question is, I suppose, not limited to Javascript, but it is the language I use to create my game, so I'll use it as an example. For now, I have structured my HTML5 game like this: var fps = ...
2
votes
4answers
511 views

Javascript Audio solution

still has issues. Flash works but... requires flash (an issue for iOS). What do you use in Javascript for audio?
5
votes
4answers
1k views

Defining the track in a 2D racing game

I am designing a top-down racing game using canvas (html5) which takes a lot of inspiration from Micro Machines. In MM, cars can move off the track, but they are reset/destroyed if they go too far. ...
3
votes
2answers
323 views

Is it possible create an HTML5 mobile game without the user having internet connection?

I trying to make a app for the Play Store and App Store. My app will be 2D, but will have 3D effects. Is it possible to program it in HTML5 without the user having internet connection? Also, are there ...
2
votes
2answers
152 views

Glitch-free cross-fades in HTML5

In my HTML5 canvas game, I need to cross-fade two sprites which have some glow around them. (Glow is backed into sprites.) Initially, the first sprite is visible. During the cross-fade the first ...
1
vote
1answer
289 views

Canvas isometric translations to integer coordinates

I'm creating a canvas based game with an isometric playing board. I use the following transformations to get my square tiles to render on the screen: 'applyViewportTransformation' : function() { ...
1
vote
3answers
865 views

What Javascript game engines are out there, other than Impact? [closed]

Does anybody know of a decent (meaning preferably free ;)) alternative to Impact? Any suggestions are very much appreciated!
-1
votes
1answer
2k views

HTML Javascript Hidden Object or Photo Hunt Game

Is anyone aware of any example photo hunt/hidden object games either in HTML and Javascript or flash if necessary? I am having trouble finding one, I may be using the wrong words to search. Photo ...
4
votes
5answers
891 views

How can I imitate interaction and movement in Diablo II?

I'm prototyping a simple browser-based game. It's played from a top down perspective on a 2d canvas. You left-click on a point on the map, and your character will begin walking to it. If you click ...
2
votes
2answers
1k views

Efficient collision detection - tile based HTML5/Javascript game

I'm building a basic RPG game and I'm looking at collisions/pickups etc now. It's tile based and I'm using HTML5 and Javascript. I use a 2D array to create my tilemap. I'm currently using a switch ...
2
votes
1answer
158 views

How can I clear explosions in my function?

Hi I have a function to place bombs, and a for loop that places explosions on the tiles where possible. My problem is that I can't remove the explosions after a while. I've tried everything I can ...
2
votes
3answers
743 views

Is there a HTML/JS game engine/library that deals with things (HUD, menus, accounts, etc) other than the core gameplay?

I've been looking through the many HTML/Javascript game engines/libraries out there (many of which are found here https://github.com/bebraw/jswiki/wiki/Game-Engines). Most of them seem fairly ...
1
vote
1answer
348 views

Do you need to make a tileset for a platformer?

I've been tasked to make a platformer, I've never made a tiled game before, is this necessary? I.e. can I just make different child classes of a Sprite class and add place them on the map, adding ...
0
votes
2answers
120 views

How to move an image back and forth with javascript

I currently am trying to make a baseball game and have this code here: http://jsfiddle.net/769BK/ I have the baseballX set to a decrement, and then I try increasing the value using baseballX++; but it ...
0
votes
2answers
143 views

How to move an object using X and Y coordinates in JavaScript

I am making a 2d baseball game with JavaScript and HTML5 and am trying to move an image that I have drawn with JavaScript like so: //canvas var c = document.getElementById("gameCanvas"); ...
0
votes
2answers
535 views

How legal would it be to use some elements of the Half Life universe in my non comercial, indie game?

I'm planning to make a simple, HTML5 game, that would use some elements of the Half Life universe. Basically, it would be a 2D Portal clone, but it would have it's own story, and portals would be ...