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

0
votes
0answers
51 views

HTML5 Canvas: Get rect coords after rotation (relative to screen)

update: function(delta) { for (var i = 0; i < this.bullets.length; i++) { this.bullets[i].velocity = this.bullets[i].speed * delta; this.bullets[i].contextX += ...
3
votes
1answer
2k views

HTML5 - Dynamic canvas grid for scrolling a big map

I've been working on different scrolling algorithms for my JS-based game. My main problem is that I need to draw a huge map and also have it scroll smoothly. I've made a few attempts and while they're ...
0
votes
1answer
97 views

How do I add a canvas tag to my ocean id in javascript? [closed]

I'm trying to create a "wack-a-mole" type of game. I've gotten all of the lines of code except in one area. Here is all of the code: <!doctype html> <title>Squid Smash!</title> ...
0
votes
2answers
201 views

HTML5 Quintus button click doesn't work in local

If you try to run this example http://html5quintus.com/docs/ui.html, you'll be able to click the buttons, but you won't if you download a local copy of the example and click the index file (without ...
0
votes
1answer
340 views

Planet gravity? [duplicate]

I am trying to make a game with the Phaser game engine and would like to implement some sort of planetary gravity. Essentially I just want the player to be able to walk on a circle or orbit a point. I ...
7
votes
0answers
2k 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 ...
3
votes
2answers
402 views

HTML5 game fps render lag

I am currently creating a flappyBird-like HTML5 game using Proccessing.js You can see current work here: http://files.tips4design.com/flappySlothRelease/ The problem is that even though the FPS is ...
-2
votes
1answer
182 views

How should I start with Android development? I am basically a PHP HTML JAVASCRIPT developer [closed]

I am a PHP developer wanting to learn Android game programming. I tried java with ADT and android SDK, but I found Java confusing because of its complex Object-Oriented structure. I've heard we can ...
0
votes
2answers
78 views

JavaScript character direction delay [closed]

I am developing a top down game and I'm having trouble with a delay in switching from one character walk direction to another, particularly if the previous direction key is still being pressed by the ...
0
votes
1answer
228 views

How do I make a sprite blink on an HTML5 canvas?

I'm thinking of the flashing effect many games have when a character gets hit and takes damage. Something like overlaying a lighter color on visible sprite pixels for a second.
0
votes
0answers
73 views

Sound Effect Delay occurs when game is deployed with GWT backend?

I've been posting my games on to my personal website recently and I noticed a slight hiccups with the LibGDX games I've made. Within the first few seconds following the loading of the game, there is a ...
1
vote
2answers
269 views

IsoMetric Map draw: sort with Topological Sort, Z-Buffer and anchor point

I'm writing an IsoMetric renderer for my html5 isometric game. The isometric renderer should be able to render objects with floating point coordinates. DEMO: http://matt93.altervista.org/game/ ...
1
vote
2answers
112 views

Calculate tile ID on a Reus style world with canvas context.arc()

I need a bit of math help for my game. I'm using Javascript and the Canvas tag to create a circular world, think God Finger, and Reus. The current version of my game is here: ...
0
votes
2answers
269 views

Tweening multiple image objects in html5/js

Is there an optimal way to choose when tweening multiple images as a single image? For example let's say i have 10 preloaded image objects in my script, and i want to place them one on top of the ...
0
votes
1answer
45 views

Update function in html5 canvas game isn't working properly [closed]

Jsfiddle : http://jsfiddle.net/seekpunk/6eeKH/15/ the code : if (this.collection.length > 0) { if (((this.collection[0].blockX + this.collection[0].blockW) >= cw) || ...
2
votes
3answers
218 views

Is it more efficient to encode rotation in a spritesheet or rotate at runtime?

I'm developing a game with JavaScript and HTML5 and I'm wondering about the performance implications of sprite rotations. There are two ways that I know to rotate a sprite: Rotate the actual sprite ...
2
votes
4answers
478 views

Can sprite sheet width and height affect performance?

Is there any performance difference in the way the images are placed inside a sprite sheet image (for the same total area)? For example, should I place 50 sprites (50x50 each) in a linear way ...
0
votes
1answer
126 views

Why does my HTML5 game loop (with masking) run slowly?

I have a game loop like so: setInterval(function() { context.save(); context.rect(26, 144, 745, 400); context.clip(); context.drawImage(myImage, 100, 100, 900, 900); ...
1
vote
3answers
155 views

Canvas setTransform function clarification

I'm currently building some kind of fake-3D dungeon, and I'm facing some difficulties understanding the behavior of the setTransform() function. Here's my simplified code: var can = ...
0
votes
0answers
18 views

Clicking on a canvas getting polygon [duplicate]

I'm using Canvas to create polygons like this: http://bl.ocks.org/mbostock/6675193 I want each of those polygons to represent a clickable province. How do I know which province is clicked when the ...
1
vote
1answer
282 views

How to draw many identical quads in WebGL efficiently?

I have recently been trying to develop a more basic one of those 'falling sand'/'powder game' style games (See here) the past few months, and after prototyping on a plain canvas, then trying PIXI.js, ...
1
vote
1answer
288 views

Implementing fog of war on HTML5 canvas

I have been wrestling with creating fog of war for a while now. I actually did create it, but I consider the implementation too resource-heavy to be usefull. For initial information: I use createjs / ...
0
votes
0answers
141 views

detection of a circle inside a rectangle in html5 canvas

I've created this game where the player can hit space to make the circle float in certain way. the main goal of the game is let the circle enter the rectangle .I did this code to create a collision ...
1
vote
2answers
1k views

HTLM5 canvas game (easeljs) slow peformance on ipad (ios7) with phonegap

I have developed a game with easeljs for HTML5 Canvas. the game is a single HTML5 page with canvas and a lot of javascript. All this time I tested the app on iOS Safari (iPad3 iOS7) with 40~50 fps ...
1
vote
1answer
109 views

UI in Canvas-Games [closed]

I am quite new to programming with <canvas/> and WebGL, but very familiar in HTML5. So far, I have made to render some entities on the <canvas/>. Next would be to add a simple HUD to it. ...
0
votes
1answer
122 views

Card Game Complex Hand Holder [duplicate]

I've been working on a card game project for a while and have just got into the hand holder. What is stopping me now is how to spread the cards linearly in a complex way. By complex, I mean it changes ...
2
votes
1answer
3k views

Is it possible to rotate an image on an HTML5 canvas, without rotating the whole canvas?

So I basically want to rotate single sprites on the canvas without rotating the whole canvas, is that someway possible. I also don't want to create a new canvas for each object I have. Also, it ...
1
vote
1answer
232 views

Replace a div (with a ball picture in it) with a 3D canvas ball [closed]

I am trying to make a game where you have to keep the ball on a green platform. At this point the ball is a div with a ball image. You can move the ball over the field, all works great. See it in ...
1
vote
0answers
81 views

Is pre-rendering Canvas graphics with ImpactJS safe? [closed]

I have several fairly complex menus I'm loading into my HTML5 game created with ImpactJS (skill trees, journal, equipment, ect). In order to draw them with a low performance impact I'm rendering them ...
2
votes
2answers
171 views

Testing HTML5 canvas games on low resource computers

I've made a game in HTML5 & JS and want to test it on varying types of user setups as I've heard it doesn't perform too well on older MacBooks. How can I accomplish this? I'm thinking of ...
2
votes
2answers
174 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 ...
4
votes
4answers
414 views

HTML5 without a framework

I am looking to get into game development, after a lot of searching I have decided to try with html5 and, while I can see the advantages of frameworks, I would like to learn the basics without a ...
1
vote
1answer
389 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
1answer
154 views

Isometric displaying two different images in different positions

I'm creating a simple Isometric game using HTML5 and Javascript, but I can't seem to get the display to work, at the moment i have 9 tiles that have X and Y positions and the player has a X and Y ...
7
votes
1answer
293 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 ...
2
votes
1answer
367 views

Drawing Sprites at Correct Z-Index without A Sprite Map?

My game is in HTML5 canvas, but I assume this concept applies to any language. In the past I've used a multi-dimensional array to keep track of sprite positions. Here is a simplified example: [ [ ...
0
votes
2answers
274 views

HTML5 Canvas Parsing image into tileset while preserving transparency

I'm trying to import a Tiled Map Editor JSON file into my HTML5 canvas game but I'm having trouble with separating out the tileset image into separate images while preserving the transparency. ...
1
vote
1answer
220 views

WebGL immediate mode

I know that WebGL is based on OpenGL ES 2.0 and that glBegin and glEnd have been removed and replaced with vertex buffer objects. I understand that VBOs are faster and use less code but is there a ...
0
votes
4answers
352 views

HTML5 Jump and Run Game Performance issues

we're developing a HTML5/Javascript jump and run game and therefore we have developed our own gameframework. It consists of following most important structures: Stage/Scene/Layer: divs ...
4
votes
3answers
2k views

ImpactJS and Construct 2 [closed]

I'm interested in HTML5 game development and I found about this 2 game engines, I already know ImpactJS requires more programming experience and that Construct 2 has its own event and action system ...
2
votes
3answers
487 views

Colouring greyscale images/sprites for HTML canvas

What is the best method to colour in sprites at runtime using the canvas element and javascript? I know there are various blending modes using globalCompositeOperation, but I don't know how best to ...
4
votes
2answers
181 views

What's the current preferred method for serving/storing game data on html5 games

Given all the recent improvements on web platform (webgl, websockets, etc.), it should be now possible to see great games on web. However my biggest concern so far has been around serving and storing ...
0
votes
3answers
408 views

Is there a way to create multi-resolution graphics for game with createjs?

I'm on a advanced development for a game made with createjs framework. However it's time to export it to some platforms. The graphics are made for the iPad 3 resolution. I would like to export them ...
0
votes
1answer
224 views

“Painting” elements in html5 canvas

I'm making a game in coffeescript (although for the sake of this problem that's probably not all that relevant) and html5's canvas. It's a game that involves a paint cannon, that fires circular ...
1
vote
1answer
376 views

How to develop a real-time game server for html5 web app?

I'm contemplating a graduate project proposal of developing a rather complex HTML5 game that requires real-time server communication. The premise of the actual game play is simple: 10 players battle ...
2
votes
4answers
1k views

Play audio in javascript with a good performance

I'm developing a browser game where the player can shoot. Everytime he shoots it play a sound. Currently i'm using this code to play sounds in JavaScript: var audio = ...
1
vote
2answers
707 views

How can I create and animate 2D skeletons for HTML5 Javascript games? [closed]

I'm trying to make a 2D fighting game in HTML5(somewhat like street fighter). So basically there are two players, one AI and one Human. The players need to have animations for the body movements. ...
1
vote
2answers
224 views

Movement on Multiplayer Games

I'm developing a JavaScript Multiplayer Game (Using NodeJS and Socket.IO). The problem I'm having is, on a Player's movement, the Event with the X and Y positions is sent to the server and then to all ...
0
votes
1answer
140 views

Is my social game technical solution viable?

I'm currently working on a board social game using HTML5 (canvas) & Asp.net MVC 4, Azure, Sql server, EF. I'd like to do a server side realtime validation (using Ajax) of a player moves (not more ...
2
votes
3answers
498 views

How do I represent walls in a 2D tile based map?

I'm trying to create a simple 3D(2D) Dungeon Crawler but I am going to be using simple flat images to show the user they are in a "3D" world. Now what I mean is something like Sword and Serpents on ...