2
votes
0answers
18 views

Presentation / input layer that communicates with server

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 ...
0
votes
1answer
56 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 ...
1
vote
1answer
133 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
34 views

setting a time delay between two frame when animation a sprite sheet

this is my jsfiddle :http://jsfiddle.net/Z7a5h/ As you can see the animation of the sprite sheet when the player is not moving is too fast so i was trying to make it slow by declaring two variable ...
1
vote
0answers
35 views

Maintaining relative location of objects across different screen resolutions

I'm developing a very simple interactive HTML5 game, in which I need to show a room having multiple objects like cupboard, table, fan etc. How can I bind all of the objects together, so that they ...
0
votes
0answers
34 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 += ...
2
votes
1answer
183 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
50 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
1answer
147 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 ...
2
votes
0answers
323 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
117 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
117 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
47 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 ...
1
vote
2answers
82 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
70 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 ...
2
votes
3answers
145 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 ...
0
votes
1answer
106 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
93 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 = ...
1
vote
1answer
91 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
204 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
54 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 ...
0
votes
1answer
91 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 ...
1
vote
1answer
231 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
162 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 ...
2
votes
2answers
150 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 ...
0
votes
1answer
135 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 ...
6
votes
1answer
207 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 ...
0
votes
2answers
189 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
165 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
308 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 ...
0
votes
0answers
105 views

Impact js Multibody entities with animations

I have a simple impactjs project working with box2d. just a "car" that can run over some rough terrain. I would like to have the wheels spin though. I know I could accomplish this with a sprite sheet ...
2
votes
2answers
1k views

ImpactJS and Construct 2

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
401 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 ...
0
votes
1answer
189 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 ...
2
votes
4answers
524 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
474 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
198 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 ...
2
votes
3answers
448 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 ...
0
votes
1answer
2k views

Javascript game to Phonegap for android game?

me and a friend of mine are in the process of building a javascrip/HTML5 game and I'm running into a few questions about the process of using converting it to an android game. I plan on using Phone ...
3
votes
1answer
281 views

Multilayer game HTML5 canvas

I've have a problem with HTML5 canvas and using multiple layers. I'm using 3 layers. The first layer is where the player and the collision base objects are. And the second and the third layer have ...
2
votes
1answer
266 views

Box2D: Asteroids-Like Spaceship Physics

I'm new to Box2D (JavaScript) (and the world of physics/mathematics) so I'm having a hard time working out the methods I need to use to make a spaceship act like it does in the classic arcade game ...
5
votes
2answers
429 views

Is using multiple canvas objects a good practice?

We're developing a jump and run game with HTML5 and JavaScript and have to build an own game framework for this. Here we have some difficulties and would like to ask you for some advice: We have a ...
0
votes
1answer
496 views

Character movement on a 2D tile map

I'm working at making a HTML5 game. Top down, closest thing I can equate it to is the gameboy zeldas, but open world and no rooms. What I have so far is a procedurally generated map in a multi ...
0
votes
1answer
635 views

Can't Build Cocos2Dx emscripten project

I need to port a Cocos2D-x project to Web (JS+HTML5). I'm trying to compile cocos2D-x samples using the emscripten project for cocos2d-x, and I've followed this tutorial ...
1
vote
1answer
644 views

animating roulette ball

I'm trying to achieve something like netent's roulette (which is a great product in my opinion). It's going to be implemented in html5. I wonder which path should I take to have such a great ...
3
votes
1answer
423 views

How can I place my Enchant.js game into a DIV in a fully-designed web site?

Following the Enchant.js tutorial I cannot find a way to define the place the game is rendered in the page. It either takes the maximum possible area or limits itself to the given size (using ...
6
votes
3answers
907 views

How can I deploy a JavaScript game into the iOS app store?

Unfortunately, I don't have a Mac, so I can't develop for iOS. I understand that HTML5 apps run in the browser, but is there a way to make an HTML5 app (e.g. a JavaScript game) and get it deployed ...
2
votes
1answer
368 views

JavaScript - 2D Top-down Tile Collision Detection

I am developing a small Top-down Game (Much like the old Zelda Games) and I'm having an issue in terms of Collision detection (The actual theory itself rather than assigning Tiles as solid, etc.) I ...
0
votes
1answer
1k views

Simple javascript HTML5 canvas start menu

I'm currently looking for a simple and basic start screen for a game using javascript, so basically its the first function that is called and then press play which then goes into the game. Looked ...