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

3
votes
4answers
873 views

Why wouldn't one use Canvas for HTML 5 game development? [closed]

I'm just getting into the HTML 5 game development. I've discovered that some games seem to be created using just JS/CSS/HTML instead of the canvas. Since canvas seems to enjoy good browser ...
2
votes
3answers
282 views

Do larger sprite sheets improve performance in html 5 games?

I know when I did some game development with XNA they recommended that we try to group are sprites into fewer sheets because the graphic card could process it faster. Does this also apply to web based ...
2
votes
1answer
407 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 ...
1
vote
1answer
189 views

HTML5 mobile game storing data

I am developing an mobile application (in HTML5) that will run on multiple platforms and will eventually have both single and multiplayer options. The current issue I have is the best method for ...
2
votes
1answer
124 views

How do I generate paylines and pay dots for a slot game?

I'm working on a HTML5 slot game and am completely stuck on the pay lines and the dots that produce the lines from 1 end to the other. What's the logic behind generating a random number of dots ...
0
votes
1answer
166 views

Approaching syncing between client and server, in a Tower Defense game

I am currently working on a Multiplayer TD, players can join games, and place towers on a map, so far so good. This is how the game works as of today, when a new game is created, the server ...
1
vote
1answer
289 views

Canvas isometric translations to integer coordinates

I'm creating a canvas based game with an isometric playing board. I use the following transformations to get my square tiles to render on the screen: 'applyViewportTransformation' : function() { ...
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 ...
2
votes
1answer
217 views

Optimising out tiles outside of viewport

I am playing around with the HTML5 canvas and have begun implementing a tile engine. However, it's currently very inefficient: I have a 100x100 2D array and my code loops through the whole thing ...
0
votes
2answers
381 views

Increasing speed of circle over time as linear with Box2d

Assume that there is a circle and it can be moved by using keyboard arrows.Is required that increasing speed over time like increasing car speed. For example; max speed is 25 and time to reach max ...
2
votes
2answers
1k views

Receiving keyboard events on a canvas in Javascript

I need to receive keyboard events in a canvas element. Click events are received but key presses aren't. Here is my code which doesn't handle key events: var canvasElm = $('canvas'); ...
3
votes
3answers
653 views

Client Side Logic vs Server Side Logic for HTML5 Game

I'm writing an HTML5 game that takes place in a single screen and does not have any data that would need to be saved (except for a score). I am writing all of my canvas logic on the front end. because ...
0
votes
1answer
286 views

Canvas background from sprite (HTML5)

I am starting to develop my fist bigger game in HTML5 and struggling a bit with sprites. I can cut out single items, but I need to repeat them as well. For example, I have a battle ground that ...
-1
votes
2answers
87 views

When I create more than one boundary, every one but the most recent breaks [closed]

So basically what I have is a function called createBoxBoundary, which, when the player position is within certain limits, sets boundary variables to true. Pretty straightforward. However, when I call ...
5
votes
2answers
696 views

Get timing correct with client side prediction

I believe I've got my head round CSP after reading Gabriel Gambetta's blog, Valve article and buildnewgames.com but having an issue understanding the time execution of everything. So if a player ...
1
vote
2answers
478 views

I would like to build a 2D multiplayer game. Do I need a game engine or not?

I plan to build a very basic 2D game in html5: it's purely a map divided in 2D equal square tiles. A player can click on a tile to see the message "behind" a tile. Once open, other players can't open ...
-1
votes
2answers
520 views

Javascript - create a new bullet instance every time a user event is triggered

Basically I have a function that I need to create an object of every time the user presses space(event listeners not shown here). function arrow(){ this.x = playerXPos + 40; this.y = ...
1
vote
2answers
464 views

PHP and Javascript/HTML5 Collaboration [closed]

I've recently been working on a fairly complicated game. I've stored information with local storage, but that allows the player to edit it, and does not transfer from computer to computer. The two ...
1
vote
2answers
378 views

How can I move an object over a drawn tile map in HTML 5 without constant buffering?

I've been messing around with HTML5 for quite some time now but this is something that I guess I haven't figured out how to handle well yet. I'm sure there's an extremely easy solution and I just ...
2
votes
3answers
181 views

Instantiate objects that share same variable

I'm just wondering how to instantiate the same objects that all share the same variables, except their positions. I'm basically working on the scene of my HTML5 game, and I've build a streetlamp post ...
0
votes
1answer
277 views

Saving Scores Using Cookies

I've recently created a small galiga like game recently using JavaScript and HTML5. I've run into a bit of trouble saving cookies, the cookie saves, but then resets itself when the page is refreshed, ...
1
vote
2answers
1k views

How to make an infinite map

I was wondering if someone could explain to me how to implement a seemingly dynamic infinite map like the one at http://wordsquared.com/ My main issue is really generating new tiles in any direction ...
7
votes
5answers
4k views

Best technique for drawing isometric tiles

I'm thinking about making a simple isometric game with HTML5 Canvas, and wondering what's the fastest way to render the tiles. Since the tiles are diamond shaped, but drawImage draws rectangles, I ...
2
votes
1answer
273 views

mat3x4 in webGL shaders

I am porting the IQM bone animation format to Javascript and have run into a problem... The vertex shader is failing to compile and the only error message I get out is 'mat3x4' : syntax error on the ...
-1
votes
1answer
3k views

How to make background to stage in kineticjs

var stage = new Kinetic.Stage({ container: 'container', width: 490, height: 300, }); var layer = new Kinetic.Layer(); I want to make a default image to a stage to be the ...
10
votes
0answers
908 views

How to create 2D shadows [duplicate]

I'd like to create lights and shadows in a 2D environment, like in the image below: I did several searches but got no results. Do you have any hint?
5
votes
3answers
905 views

How should I implement parallax scrolling with pan and zoom in HTML5?

I'm writing a planetary motion simulator with the HTML5 canvas element and I want to put one or more layers of stars in the background. The user can click and drag the screen to navigate around the ...
1
vote
3answers
733 views

Need Guidance Making HTML5 Canvas Game Engine

So I have some free time this winter break and want to build a simple 2d HTML5 canvas game engine. Mostly a physics engine that will dictate the way objects move and interact(collisions, etc). I made ...
-1
votes
1answer
318 views

Drawing polygons in 3D

I have recently been working on a 3D engine from scratch, using JavaScript and HTML5. I've successfully created lines (although slightly buggy) and points, but I can't figure out faces. My current ...
-1
votes
3answers
1k views

2D engine for both Android & iOS engine? [closed]

I want to make a simple 2d game that would run on both Android and iPhone. Since coding it separately for each platform would take some time, I thought of using an engine, that would be able to port ...
-1
votes
2answers
208 views

Ebooks for building game framework in HTML5 [closed]

I begin to develop game but I don't know best ebooks for build simple game framework in HTML5 . Can anyone suggest ebooks for me and where to get free image resources for build map in game like as ...
3
votes
2answers
948 views

HTML5/JS - Choppy Game Loop

I have been experimenting with HTML5/JS, trying to create a simple game when I hit a wall. My choice of game loop is too choppy to be actually of any use in a game. I'm trying for a fixed time step ...
-1
votes
2answers
325 views

Remove enemy when bullet hits enemy

For my education I have to make a basic game in HTML5 canvas. The game is a shooter game. When you can move left -> right and space is shoot. When I shoot the bullets will move up. The enemy moves ...
2
votes
2answers
1k views

Efficient collision detection - tile based HTML5/Javascript game

I'm building a basic RPG game and I'm looking at collisions/pickups etc now. It's tile based and I'm using HTML5 and Javascript. I use a 2D array to create my tilemap. I'm currently using a switch ...
0
votes
1answer
813 views

HTML5 platformer collision detection problem

I'm working on a 2D platformer game, and I'm having a lot of trouble with collision detection. I've looked trough some tutorials, questions asked here and Stackoverflow, but I guess I'm just too dumb ...
3
votes
2answers
918 views

HTML5 - Does it have the power to handle a large 2D game with a huge world? [closed]

I have been using XNA game studio, but due to private reasons (as well as the ability to publish anywhere & my heavy interest in isogenic engine), I would like to switch to HTML5. However, I have ...
1
vote
1answer
412 views

Architectural advice - websockets javascript/php integration

Myself and a friend have started making a game, he's likely to be using impact.js for the user interaction etc, but we need multiplayer functionality so some form of websockets for TCP connections ...
0
votes
2answers
545 views

Animating sprites in HTML5 canvas

I'm creating a 2D platformer game with HTML5 canvas and javascript. I'm having a bit of a struggle with animations. Currently I animate by getting preloaded images from an array, and the code is ...
3
votes
1answer
592 views

Is it possible to load local html pages into Gamemaker games?

I was just wondering if it would be possible somehow to load locally saved web pages into a game. My primary use for them would be as menus, helping to navigate between rooms. I know about the built ...
-2
votes
1answer
161 views

How do I set an event off when player is on certain tile?

Here is the code I use to create and print my map to the canvas: var board = []; function loadMap(map) { if (map == 1) { return [ ...
2
votes
2answers
250 views

Stop a rotating object at a specified angle?

I'm working in JavaScript with HTML5 and the canvas. I have an object which is rotating at a certain speed, and I need the object's rotation to slow down gradually and the front of the object to stop ...
2
votes
3answers
634 views

Issues with shooting in a HTML5 platformer game

I'm coding a 2D sidescroller using only JavaScript and HTML5 canvas, and in my game I have two problems with shooting: 1) Player shoots continous stream of bullets. I want that player can shoot only ...
2
votes
2answers
402 views

Help w/ iPad 1 performance for tile-based DOM Javascript game

I've made a 2D tile-based game with DOM/Javascript. For each level, the map data is loaded and parsed, then lots of tiles ( elements) are drawn onto a larger "map" element. The map is inside of a ...
0
votes
2answers
309 views

HTML5 as application for tablets?

I'm looking at creating a tablet application (iPad, Nexus, Surface...). I've heard it's possible to create it using HTML5 canvas. I was wondering if it was limited to canvas, if div/input/table can ...
0
votes
1answer
341 views

how to devise a scoring algorithm based on elapsed time and number of moves [closed]

I want to devise an score algo for my game. I want to award high scores to players who achieve the goal in minimum time and least number of moves. I did this but its not going correctly: var score = ...
7
votes
1answer
706 views

Jump handling and gravity

I'm new to game development and am looking for some help on improving my jump handling for a simple side scrolling game I've made. I would like to make the jump last longer if the key is held down ...
1
vote
1answer
155 views

Looking for a library to create a grid based first person game online

Before I go and build it myself, I have been looking for a library that may help making a grid based first person view similar to: https://www.youtube.com/watch?v=GwmZoCFd4Us I plan to make a web ...
3
votes
0answers
129 views

Converting obj data to CSS3D

I found a ton of formulae and what not, but 3D isn't my forte so I'm at a loss of what specifically to use. My goal is to convert the data in an 3D .obj file (vertices, normals, faces) to CSS3D ...
2
votes
1answer
790 views

Making a Photo Hunt Game using Javascript and HTML5 [closed]

I am looking for a way to make a photo hunt game using HTML5 and Javascript. Where should I start after the images. And How would I make clickable areas on the image, using javascript? If you know of ...
4
votes
5answers
2k views

What would be a good way to implement/render a 2D tiled map for a browser game?

I coded a a little RPG in ruby and I used an array to contain the map squares. The elements of the array (which defines the X coordinates) are arrays themselves whose elements defines the Y ...