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
50 views

How are CSS and WebGL coordinates related? [closed]

I'd like to build a simple framework which rendering combines web page DOM elements with WebGL, such that they're manipulable in the same coordinate space. How does the plain CSS coordinate system ...
-1
votes
1answer
57 views

Centering camera on player div

I've been making a roguelike-style game in HTML5 without using canvas (only divs) with pure JS (fiddle!). I've been trying to enlarge the tile size (font size) while keeping the player centered within ...
-1
votes
0answers
17 views

How to change stages or LEVELS for Phaser game [duplicate]

From what I've seen in most of Rich's examples he uses this kind of approach to structuring his states. var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: ...
1
vote
0answers
70 views

In Phaser, how should I be managing state? [closed]

I'm quite new to Phaser and JavaScript really confused about state management. Phaser has lots of documentation and info on the net, but everyone seems to be doing it a different way. An example: ...
-1
votes
2answers
99 views

Where to start developing a 2D puzzle game [closed]

I would like to start developing a 2D puzzle games, much like sudoku for example. I would like to publish it on Facebook and on gaming websites, like miniclip, agame, kongregate. The game should have ...
0
votes
2answers
75 views

Collision detection between draggable object and world objects?

I have a game I'm making in Javascript that will involve combining items by dragging and dropping them onto each other. Think Alchemy or similar. So far, so good, but I hit a snag while trying to ...
2
votes
1answer
145 views

How can I create 2D, sprite-based reflections in HTML5 Canvas?

I'm trying to create simple reflections in a 2D, sprite-based game using HTML5. I'm looking to recreate an effect like the one you'd often see in GBA games, such as Pokemon Emerald and Mother 3: ...
0
votes
1answer
88 views

How to “piece together” an image in code, to render later?

I want to make a game in Dart and have decided to use the available port of the JS Phaser game engine. This will be my first time really making a game involving graphics so I guess I'll have a lot to ...
0
votes
1answer
123 views

Rotate arrow on canvas

I need to draw a flow dynamically based on some user choices. In that flow I want to draw the choices (blue circles with number) and the directions of that choices (line and arrow). For example: node ...
2
votes
1answer
94 views

How to implement user friendly screen panning on 3D HTML canvas for RTS game

How can I get RTS map panning like how it was done in C&C red alert (with the mouse at the edge of the screen moves the screen in that direction) with a Babylon.js RTS game in the html canvas? ...
-1
votes
3answers
182 views

Aspiring game dev - Is HTML5 worth it? [closed]

I'm a college student who is fairly familiar with JS & PHP and have made a couple web apps for my previous job. I'm looking into working with Unity for my future game projects, but there is a bit ...
1
vote
0answers
117 views

HTML5 game : Secure way of saving score [duplicate]

I wrote a pretty basic game for colleagues to play : the player shoots on an enemy which has 50 lives while other smaller enemies pop randomly on the screen. The goal is to kill the main enemy as fast ...
0
votes
1answer
120 views

How do I add my phaser.js game to my pre-made web page?

First off, it's my first time doing a little bit of game development, and I have no idea of the normal flow of making a game, let alone a browser game. My game uses the phaser framework of HTML and ...
1
vote
0answers
188 views

Phaser noob: Why is my Phaser game jittery? [closed]

I'm just getting started with HTML5 game development, and I'm very impressed with the quality of Run Pixie Run and bunnymark in both desktop and mobile, so I've started making a game using Phaser ...
0
votes
1answer
65 views

Set a different animation rate for moving player NOT using a sprite

I am trying to start making a simple game using HTML5 with a canvas and some JS. I have a player whose movement I am comfortable with, but the rate at which the player animates when it moves is too ...
1
vote
0answers
124 views

Shadows in html5 canvas game

I'd like to ask for reference. I met an article about how to cast shadows in games. I'm using html5 canvas (currently without webgl) with javascript for my projects. The article mentioned above is ...
0
votes
2answers
80 views

How to access bottom canvas layer in HTML?

I have such html: <div id="main_window"> <canvas id="canvas_hex_logic" width="200" height="100"></canvas> <canvas id="canvas_ground" width="200" height="100"></canvas> ...
0
votes
1answer
74 views

How do I cut off the edge of an image in a 2D JavaScript Array?

OK, I am trying to make a game that is a little bit like SimTower but utilizing HTML5 (particularly the canvas element) and JavaScript with a little CSS. I have ran into a couple of little problems ...
1
vote
0answers
126 views

Simple track method for 2D car game? [closed]

I'm a new programmer and I am trying to make a 2D car game on an html5 canvas with javascript and JQuery. I have got the basic car motion down, check it out here: ...
2
votes
2answers
1k views

Displaying a particular sprite from spritesheet using Phaser

I am trying to make a card game using Phaser, the HTML5 JS framework. Because I'm a terrible artist and can't design my own, I'm using a free spritesheet of playing card images I found online. The ...
2
votes
2answers
256 views

How do I make a scrolling map within an HTML5 canvas?

My project is a 2D tactics game with a square grid. It's all HTML5/Javascript/JQuery. I have been able to draw out the grid and have a system where I can load different maps with tiles where units ...
0
votes
1answer
54 views

How to manipulate browser pixels on different mobile devices

I'm creating a board game using HTML5, CSS3 and JavaScript. It's working fine on Desktop browsers properly. But when i load it on Windows phone it's not behaving properly. The resolutions and the game ...
-1
votes
1answer
110 views

How to deal with extremly big numbers in javascript? [closed]

I am making a idle game like http://www.clickerheroes.com/ . I am doing it using createjs html library(doesnt matter). Anyways what i want to know is how i can deal with extremly large numbers that ...
1
vote
0answers
172 views

RPG game engine HTML5/javscript [closed]

I am planning to build a 2D RPG game (Zelda style). I am looking for a game engine that has the following features: Map editor to create maps (preferably orthographic grid), with solid objects, ...
0
votes
0answers
74 views

Balancing fight script in Text Based Javascript Game

I'm working on a little text based javascript game and I've been using chromes Javascript console for the output. The 'game' works off a series of methods written into an object called Player created ...
0
votes
3answers
416 views

Add a Countdown Timer that increments in JavaScript and resets per level(Resovled)

I am currently developing a Simon says type game using jquery and javascript. I have linked a fully copy of the game on github Github download and unzip to see the game fully ...
0
votes
1answer
47 views

Get speed from vector using box2d and javascript

I need to find the speed of an object in a game. The game is made in HTML5 with jquery and jquery.box2d. For this I can use these methods: GetLinearVelocity().x; GetLinearVelocity().y; I'm then ...
1
vote
1answer
168 views

How do I procedurally create a directional light cone with an HTML canvas?

To create a directional light effect, I want to draw this kind of transparency mask on an HTML canvas (using context2d): I also want to be able to generate such a mask dynamically. I've tried using ...
4
votes
4answers
304 views

How do I prevent receiving data from the network from dropping rendering frames in a multiplayer game?

I'm building an HTML5 massively multiplayer online game. I've been working on this project for awhile, but am having some trouble sorting through a couple of performance issues. Since this is a ...
0
votes
1answer
136 views

What is the speed difference between cross platform HTML5 games and native mobile games? [closed]

Microsoft is advertising and promoting cross platform HTML5 game development. I am thinking of creating a simple 2D side scroller game and I am trying to decide what engine should I use for creating ...
1
vote
0answers
144 views

A problem with collision when a sprite changes size (Phaser framework) [closed]

I have a sprite in my game that changes size at certain points in the game. It changes size via the sprite.body.setSize method. Unfortunately, it seems that the sprite is unaffected by objects that it ...
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 ...
-1
votes
3answers
100 views

What's the best way to build a game with kids? [closed]

I work at a not-for-profit organization and we've been thinking about building a game with the kids we help everyday. We'd use their art, voice and ideas to power a simple enough PC game they can ...
0
votes
1answer
178 views

No sound in android using Phaser [closed]

I have developed a simple game using Phaser. It's work perfect on ios webkit, but on android there is no sound. What causes this problem on one platform but not the other? We are using this code to ...
1
vote
0answers
195 views

Creating Top-Down Race Track From A List Of 2D Points [duplicate]

My final year project for university is based on the idea that a two-dimensional top-down multiplayer racing game can be made using Google Maps to dynamically generate race tracks. The idea is that ...
0
votes
0answers
26 views

Crafty Bind “createView” to viewport - TiledMapBuilder

Is there any way to bind the createView function to the player entity? For Example: I am moving forward and the map is automatically loaded. I call the Map with: Crafty.e("2D, DOM, ...
3
votes
1answer
91 views

CSS Sprite position updates slow due to addition of 'px'?

I'm moving fewer than 10 position: absolute elements around the screen. An enormous amount of CPU time (profiled in Chrome as (program) i.e. native code) is used where I do the following: style.left ...
0
votes
0answers
35 views

how to disable touch in Quintus?

hi i'm new in web games development and trying to build card game using the Quintus game engine i have object called card i can touch and drag it in the screen but i want just to touch and drag it one ...
2
votes
1answer
507 views

How to handle the different frame rate on different devices?

I am not quite sure how frame per second works on a web page. I have a Canvas game that involves in moving an image from point A to B, and measuring the time elapsed. The code can be as simple as: ...
0
votes
0answers
81 views

Drawing a object with Box2D and HTML5 canvas on current mouse position

I'm attempting to create a air hockey type game with HTML5 canvas and JavaScript, using Box2dWeb for the physics calculation. I need a way to draw the puck at the current mouse x and y position every ...
1
vote
1answer
92 views

Algorithms for positioning rectangles evenly spaced with unknown connecting lines

I'm new to game development, but I'm trying to figure out a good algorithm for positioning rectangles (of any width and height) in a given surface area, and connecting them with any variation of ...
0
votes
1answer
521 views

HTML5 Canvas 2D lighting and normal maps [closed]

How using the HTML5 Canvas can I create a 2D game with light sources and also add an extra depth using normal maps. I have never really done lighting in 2D before and I'm not sure where to start. ...
2
votes
1answer
56 views

Mouse input and structure in JS [closed]

I am creating a simple concept where I have a small menu to choose a tool from and then I can click and drag to build. For example, I click on the rails tool and then I can click and move the mouse ...
0
votes
1answer
96 views

animating a spritesheet using crafty.js

this is my jsfiddle : http://jsfiddle.net/seekpunk/ek6ub4u5/1/ i don't understand what i am missing it's been three days now working and trying to do the animation but i am stuck ...
0
votes
3answers
161 views

2D collisions between 2 arrays

I'm trying to do collision detection between bullets and enemies in my game. But it's very unpredictable and sometimes it works, sometimes it doesn't (bullet goes straight through without doing ...
0
votes
1answer
143 views

How to use setInterval and clearInterval

I have a game that I am making and cannot seem to get the setInterval and clearInterval methods to work. When I debug it in the browser console it shows that the method is still being called over and ...
0
votes
1answer
46 views

HTML5 - multiple animations, different fps

I want to create an html5 game which contains multiple sprites. For different elements I want to create an fixed fps. For example: Walk - 10 fps, so 10 sprites will be shown within 1 second Run - ...
-2
votes
1answer
68 views

HTML5 moving image, doesn't move [closed]

Why my image doesn't move? Can you help me ... <script> window.requestAnimFrame = (function(callback) { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || ...
4
votes
4answers
791 views

Why do I need a local server for HTML5 game development?

I'm new to HTML5 game development. I'm trying to make something using Pixi.js, but when I tried to view it in a browser, I saw a blank page. According to the tutorial I'm following, I need to set up a ...
0
votes
1answer
107 views

Phaser/HTML5 - Trying to add five instances to a group and display on the screen!

just started using Phaser today after seeing Thomas Palef's lessmilk series. I completed PhotonStorm's "Make your first Phaser game" tutorial, and grabbed the skeleton, some CSS, and started to throw ...