Tagged Questions

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
1answer
40 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
49 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
59 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
26 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
59 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
20 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
78 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
263 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
79 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
43 views

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

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
81 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
0answers
20 views

No sound in android using phaser

I have developed a simple game using phaser its work perfect on ios webkit but on android there is no sound is there any way to resolve it we are using this code to load audio in phaser ...
1
vote
0answers
70 views

Extracting Top-Down Race Track From Google Maps

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
14 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
58 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
25 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
93 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
42 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
0answers
33 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
200 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
44 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
53 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
116 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
57 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
36 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
50 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
369 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
68 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 ...
0
votes
0answers
41 views

How do I repeat parts of some images in 2D Array in JavaScript but not all of them?

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 progressed pretty far in the past week ...
0
votes
2answers
181 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
1answer
395 views

Is HTML5/WebGL performance unreliable on low-end Android tablets and phones?

I've developed a couple of WebGL games, and am trying them out on Android. I found that they run very slowly on my tablet, however. For example, a game with 10 sprites or so runs as 5fps. I tried ...
2
votes
0answers
160 views

Any open source editor to make video games online without programming knowledge? [closed]

With Scratch we can create video games online, from its web platform, and publish them on the same web. I could download its source code and use it, as many others already did (see Scratch ...
0
votes
1answer
140 views

Is there a way to earn money from non-mobile HTML5 game? [closed]

I'm just a hobbyist, who has some ideas, that would not fit on a mobile screen. I have searched for some method, to make a bit of money from them, but I've found just for mobile-optimized games. So ...
0
votes
2answers
181 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"); ...
1
vote
1answer
224 views

html5 libgdx project: war to be deployed in a servlet container or only part of the contents to a web server

I am new to compiling games with libgdx to be played on the web and I have some doubts perhaps someone can point me in the right direction: Using the new gradle setup I wrote a simple game to learn ...
0
votes
1answer
87 views

Check legal movement on grid map

i'm trying to develop a simple multiplayer turn base game, i'm start creating the grid map, i have already write the javascript script to display the range movement for the specific unit, but my ...
0
votes
0answers
36 views

Box2d not showing consistent behaviour with sprites

Box2D newbb here. My question is in regards to this create js project:http://mboyeman.com/dashingdog/ (runs best in IE...:3) I wrote a function(assignBlockBodies) to give 2D Edges to sprites based on ...
-2
votes
1answer
66 views

How do I make other players see one player's die rolls? [closed]

I'm new to PHP and making a simple dice game. It works well in single-player, but in multi-player, I don't know how to show the results of one player's rand(1,6) dice roll to the others using a web ...
1
vote
1answer
191 views

Can't create “hero walking” animation

I'm creating a Fez-based HTML5 Canvas game and animating my hero image using sprite sheets. The problem is that I can't create the animation of the hero walking, don't matter how much I try, the ...
0
votes
0answers
65 views

EaselJS SpriteSheet isn't responding to gotoAndPlay

I'm developing a Fez-based HTML5 Canvas game using EaselJS and I've found a problem, that I can't solve myself, while trying to implement SpriteSheets to the hero. The problem is that I've defined ...
2
votes
2answers
91 views

How do I detect when an HTML 5 game has ended?

I'd like to embed HTML5 games in a website, but I need to be able to detect when the game has ended so I can run some of my own JavaScript. Looking at the output of some game engines (Construct 2, ...
-1
votes
1answer
98 views

creating an html5 game [closed]

I am working on a really simple online version of the parachute shooters game that was preprogrammed on old iPods. I'm pretty new to game development and so at first I tried to build the whole game ...
2
votes
0answers
34 views

Presentation / input layer that communicates with server [closed]

I want to learn more abot how to use some kind of presentation/input layer that communicates with server for HTML5 games. Instead of sending all the code to the clients browser, I would like to just ...
2
votes
1answer
95 views

How do I use createPattern with a spritesheet? [closed]

Say that I have a spritesheet like this And I want to use the dirt tile at (1, 1). I know that I can repeat an entire image using createPattern but how do I create the pattern from just the tile ...
2
votes
1answer
60 views

Forcing Non-Pitch Preserving Audio in HTML5, Construct 2

I'm working on a simple game built in HTML5 using Construct 2, in which a circle eats other circles; nothing fancy. The idea is that a song plays during the game, starting at a low pitch, and rising ...
-2
votes
2answers
120 views

collision detection algorithm issue

here is the jsfiddle i am working on so far : http://jsfiddle.net/TLYZS/ if you debug the code and check the collision function you can see that the collision is working fine when the user overlap ...
4
votes
1answer
976 views

How can I run a Phaser engine game without a window?

I'm currently creating a multiplayer game using the HTML5 framework Phaser. It's a game where zombies spawn on the map and players have to shoot them to kill them. The zombies target players that are ...
1
vote
1answer
284 views

Should game logic update per second or per frame?

I'm trying to wrap my head around how and when to update an entities position. My game loop updates logic at 25 FPS and renders at 50-60 (Depending on the computer hardware). So lets say I'm moving ...
1
vote
2answers
715 views

Dealing with multiple animation state in one sprite sheet image using html5 canvas

I am recently creating a Game using html5 canvas .The player have multiple state it can walk jump kick and push and multiple other states my question is simple but after some deep research i couldn't ...