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

1
vote
1answer
499 views

How do I go from a simple html5 tic tac toe game to an online 2 player game?

I've been working on an online 2 player Tic Tac Toe solution for blackberries. both old and new. And so far I have html5 code that has a 3 x 3 layout that switches between x and o for the game ...
1
vote
1answer
390 views

A* Start path finding in HTML5 Canvas

I'm trying implement A* Start path finding in my games(which are written with JavaScript, HTML5 Canvas). Library for A* Start found this - ...
7
votes
2answers
291 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 ...
1
vote
1answer
196 views

Calculate travel time on road map with semaphores

I have a road map with intersections. At intersections there are semaphores. For each semaphore I generate a red light time and green light time which are represented with syntax [R:T1, G:T2], for ...
4
votes
6answers
678 views

Should I refer to browser-based games as HTML5 games or Javascript games?

First of all, I know that there are alternatives to both HTML5 and Javascript, but I worded the question so generally ("browser-based") because if I had said "HTML5" or "Javascript" games that would ...
1
vote
1answer
172 views

Manually updating HTML5 local storage?

I'm just starting out HTML5 game developement (and game dev in general) and watching all the videos and tutorials available something has crossed my mind. Everyone keep saying I should set the ...
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 ...
2
votes
3answers
3k views

How do I structure a 2D platform level?

I'm doing a 2D platformer but I don't know how they are usually built. The approach I'm looking at is making it tilebased, with ground tiles on bottom row, then platforms on some places in "mid-air" ...
1
vote
1answer
232 views

How to perform efficient 2D picking in HTML5?

I'm currently using an R-Tree for both picking and collision testing. Each entity on screen has a bounding box for collisions and a separate one for picking. Since entities may change position very ...
3
votes
2answers
877 views

Essential 2D engine features [closed]

I have decided to make a simple engine for a new game I'm working on, and now, I'm wondering: what are the essential features of a 2D game engine? Or, a game engine in general?
0
votes
1answer
608 views

How to handle animations?

I am coding a simple 2D engine to be used with HTML5. I already have classes such as Picture, Scene, Camera and Renderer, but now I need to work on Animations. Picture is basocally a wrapper for a ...
0
votes
2answers
168 views

DrawImage doubt

What is the best option for animation in a game (HTML5 Javascript)? Put all the images in one png and change the background. Or create each image separately and draw with DrawImage?
6
votes
1answer
533 views

What is this JavaScript gibberish?

I am studying how to make a 2D game with JavaScript by reading open source JavaScript games and I came across this gibberish... aSpriteData = [ "}\"¹-º\"À+º\"À+º\"À+º\"¿¤À ~C_ ...
0
votes
2answers
428 views

how do i make the JS/jquery tic tac toe squares only clickable once?

As i have it now my script makes the 3x3 grid clickable, and I dont know exactly how to turn on the click once it has been clicked. This is using jQuery and a simple if else statement to switch ...
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 ...
0
votes
1answer
1k views

HTML5 Canvas Tileset Animation

How to do in HTML5 canvas Image animating? I am have this code now: http://jsfiddle.net/WnjB6/1/ In here I am can add animations something like -> Animation.add('stand', [0, 1, 2, 3, 4, 5]); But ...
2
votes
1answer
367 views

Customize Colors for Sprites in Web Game

So I'm working on an html5/javascript/css3-based game. Without going into too much detail, I'm thinking of having the characters be simple 8 or 16-bit style sprites, but I'd like to allow the user to ...
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
3answers
1k views

HTML5 Canvas Game Timer

How to create good timer for HTML5 Canvas games? I am using RequestAnimationFrame( http://paulirish.com/2011/requestanimationframe-for-smart-animating/ ) But object's move too fast. Something like ...
1
vote
2answers
389 views

Frustum Culling/Only rendering what's viewed by the Camera in HTML5 Canvas?

I coded up a simple 2D Camera for my HTML5 Canvas-Based Game Engine but I noticed the performance wasn't very good. So a lot of people suggested only rendering things that are shown by the camera but ...
3
votes
1answer
588 views

HTML5 Canvas fillStyle as numbers not text

When drawing vector graphics in the canvas you set the fillStyle using an rgba string like this... context.fillStyle = "rgba(255, 223, 191, 1)"; Is it possible to feed in a javascript object ...
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 ...
-5
votes
2answers
1k views

HTML5 Canvas game viewport

How to create in HTML5 canvas viewport? something like for tile maps.
1
vote
0answers
693 views

How to turn a 3d camera (in HTML5 2D Canvas)

A few years back I started experimenting with 3d in canvas. Everything went pretty well untill I had to to turn the camera, I couldn't get it done. A few days back I just happened to stumble upon ...
6
votes
1answer
1k views

HTML5 Canvas Converting between cartesian and isometric coordinates

I'm having issues wrapping my head around the Cartesian to Isometric coordinate conversion in HTML5 canvas. As I understand it, the process is two fold: (1) Scale down the y-axis by 0.5, i.e. ...
6
votes
2answers
2k views

What would be a good game making engine supporting Vector images?

I want to create a simple platforming game, in which you are a square in a wonderful world. I would like this game to be able to be played in browsers. Basically I am searching for something similar ...
1
vote
1answer
588 views

How do I deploy my JavaScript/HTML 5 to desktop and smartphone?

I'm looking for framework that will let me code on JS for HTML5 canvas and then will let me deploy to desktop and Android. I'm not looking to learn new stuff like Haxe or Lua. I want to do it in plain ...
0
votes
1answer
478 views

3d js map rendering

In the past I've done a 2D tile map using HTML, CSS and Javascript. Now I have the task of creating a 3D version using the same technologies - think of it like a space map where all planets have x/y/z ...
3
votes
1answer
387 views

How to compute the 2D equations of 3D circular arcs?

I'd like to obtain these equations for the ellipses produced by the perspective projections of (3-dimensionally transformed) circles. This is useful for rendering in 2D contexts which provide curve ...
1
vote
1answer
687 views

Converting coordinate systems to/from an isometric game world

I have tried searching and reading for an answer, but the information I could dig up either didn't fit what I need or was in the form akin to "Just multiply the vectors with the inverse matrix of.." ...
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 ...
1
vote
2answers
1k views

Is it possible to convert file from Blender 3d to svg?

I want to build web game in html5 with canvas/svg. Can I convert/export file from blender to canvas/svg? Maybe via unity3d?
0
votes
1answer
945 views

Staggered Isometric Map In Javascript

I'm trying to create a staggered isometric map in Javascript. var x, y, row, column, top, left, width = window.innerWidth, height = window.innerHeight, tile = {width: 64, height: ...
2
votes
5answers
2k views

free web library for leaderboards / achievements [closed]

I would like to know if there is any free leaderboard libraries for web games developed in HTML5/JS (as openfeint is for iPhone, Android) I found this http://www.appmobi.com/, but it seems the ...
0
votes
2answers
534 views

Good book/resource recommendation for HTML5 mobile game development?

The problem: I am taking an existing, 5 year old, html based MMORTS game and "HTML5-ing" it, "AJAX-ing" it and most importantly, optimizing for mobile devices like iPhone, android etc. For these ...
0
votes
1answer
345 views

Scale DIV with tiles

I am trying to create a repeating background. I have a main DIV with a grid of small 16x16 DIVs. I am trying to scale the main DIV in CSS; when the small DIVs simply have a red background color ...
3
votes
1answer
1k views

Canvas tile grid, hover effects, single tilesheet, etc

I'm currently in the process of building both the client and server side of an HTML5, canvas, and WebSocket game. This is what I have thus far for the client: http://jsfiddle.net/dDmTf/20/ Current ...
3
votes
3answers
455 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 = ...
6
votes
3answers
566 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 ...
1
vote
1answer
381 views

How can I render player movement on a 2d plane efficiently?

I'm prototyping a 2d HTML5 game with similar interaction to Diablo II. (See an older post of mine describing the interaction here: How can I imitate interaction and movement in Diablo II?) I just got ...
1
vote
0answers
396 views

Good practices when optimizing HTML5/Javascript Game Developement [closed]

I'm just starting out as a game developer and have created a few crappy but playable clones of classic games like pong, and bomberman. Being self taught (bless the internet) I do this by just stuffing ...
3
votes
5answers
2k views

Html5 games, what is the standard dimension to use?

I am trying to make html5 games to be played on the browser(not offline apps), and I am trying to support the maximum number of platforms, hence I need to know what dimension should I use for the game ...
2
votes
0answers
248 views

Independent HTML5 Physics Game: Any Feedback? [closed]

I've been independently developing a physics-based HTML5 game. I haven't used any libraries or engines; all the code, including the physics, is my own. It is free for a while on the Chrome Web Store ...
0
votes
2answers
856 views

How can a NodeJS server be used from Game Maker HTML5?

I want to create a client-server game that runs on Game Maker HTML5-NodeJS. The NodeJS server will be an AI server - a bot that acts like a human opponent and plays against the human player at a ...
1
vote
2answers
1k views

Creating several instances of the same object, and selecting only one

I'm playing around with making a puzzle game, haven't done that much before I run into my first problem. I want to create a certain amount of the same object/function. But without hardcoding the ...
4
votes
5answers
876 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 ...
10
votes
2answers
569 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 ...
3
votes
0answers
249 views

Choosing a (browser) game environment [closed]

I apologise in advance if this post is something you've heard a million times already or seems like a trolling attempt. I just want some advice and I'm coming up short with my own Google searches. ...
5
votes
4answers
1k views

Making a startscreen for an HTML5 game?

How would I make a start screen for a game using HTML5 canvas? I'm not looking for something advanced, just the new game button and highscore link etc. The question might be stupid, but I've never ...
2
votes
1answer
157 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 ...