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

2
votes
2answers
407 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 ...
2
votes
1answer
158 views

How can I clear explosions in my function?

Hi I have a function to place bombs, and a for loop that places explosions on the tiles where possible. My problem is that I can't remove the explosions after a while. I've tried everything I can ...
2
votes
2answers
1k views

Drawing isometric map in canvas / javascript

I have a problem with my map design for my tiles. I set player position which is meant to be the middle tile that the canvas is looking at. How ever the calculation to put them in x:y pixel location ...
2
votes
3answers
763 views

Is there a HTML/JS game engine/library that deals with things (HUD, menus, accounts, etc) other than the core gameplay?

I've been looking through the many HTML/Javascript game engines/libraries out there (many of which are found here https://github.com/bebraw/jswiki/wiki/Game-Engines). Most of them seem fairly ...
2
votes
2answers
2k views

Resource loader for an HTML5 and Javascript game

I have made a type to shoot game using HTML5, Javascript and Ruby on Rails. Here is the link for the game Tweetraitor I wanted to make a loader for resources (sounds, images) when the game starts. ...
2
votes
4answers
1k views

Serverside libs/examples for html5 WebSocket in .net?

Hey guys, I wanted to know what libraries or examples exist for WebSockets in .NET
2
votes
1answer
92 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
2answers
176 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 ...
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 ...
2
votes
1answer
130 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 ...
2
votes
1answer
307 views

Is there a way to use scala with html5?

I want to create a very simple 2d multiplayer browsergame in html5. Something like Scalatron I mainly want to do this to improve my scala skills, the problem is I would have to code the clientside ...
2
votes
2answers
795 views

Architecture for html5 multiplayer game?

Hello I want to write a HTML5 multiplayer game in which there are rooms with two players answering a series of questions with 3 possible answers, 10sec/question, which are being downloaded from a ...
2
votes
1answer
1k views

Shoot a bullet towards cursor - top down 2d

I am making a 2D topdown shooter game, in which the player's movement is controlled with WASD and gun with the mouse. I'm having a hard time figuring out how to update the position of the bullet as it ...
2
votes
1answer
1k views

SDL (or OpenGL), HTML5, Gecko and vector movies

I'm writing a platform game which uses SDL for the main graphics code. There is a chance that I may be using OpenGL for the rendering at a later stage, so answers could relate to either. I'm needing ...
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 ...
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
1answer
368 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: [ [ ...
2
votes
1answer
425 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 ...
2
votes
1answer
415 views

Detect mouse click on a bezier curve's neighborhood

I'm developing a game in HTML5 and JavaScript using Canvas API for drawing graphics. I want to detect if the user has clicked on a bezier curve which has the line width of 20 pixels (something like ...
2
votes
2answers
1k views

Javascript Isometric draw optimization

I'm having trouble with isometric tiles drawing. At the moment I got an array with the tiles i want to draw. And it all works fine until i increase the size of the array. Since I draw ALL tiles on ...
2
votes
4answers
842 views

Best platform for puzzle game development on the iPad

I have a series of hidden object and puzzle games mapped out that I want to develop for the iPad and although I have written programs before, it's been a while. I've been trying to find the best ...
2
votes
2answers
1k views

Javascript/html5 2d Canvas Context - Getting X, Y relative to canvas (opposed to transformed object)

I have scenario where there are several items on a the context stack and I need to get an x, y coordinate relative to the canvas itself. The situation is I am writing a 2D game in HTML5 and I want ...
2
votes
1answer
285 views

What client front-end options can I use to make a Facebook game?

I have been requested to make a port of an iOS game for Facebook. The game itself is fairly simple, it is a puzzle game using a 2d array for a grid with XML passed from a server for loading objects ...
2
votes
2answers
908 views

How do I employ an arcball to allow the user to look around the screen?

How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d WebGL framework? This sample uses the arcball for rotating the ...
2
votes
0answers
158 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 ...
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
853 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 ...
2
votes
1answer
253 views

How can I repeat only a portion of an image in Javascript?

So I'm trying to repeat a portion of my spritesheet as a background. So far, I have attempted this: var canvas = $("#board")[0], ctx = canvas.getContext("2d"), sprite = new Image(); ...
2
votes
0answers
253 views

Independent HTML5 Physics Game: Any Feedback? [closed]

I've been independently developing a physics-based HTML5 game. I haven't used any libraries or engines; all the code, including the physics, is my own. It is free for a while on the Chrome Web Store ...
1
vote
3answers
1k views

2D maps, how to structure?

I'm new to this. And I don't really understand 2D tile maps. The tutorials I've read use arrays, but doesn't this get really difficult to manage when they get big? And what if I want different ...
1
vote
1answer
189 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 ...
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 ...
1
vote
3answers
758 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
vote
3answers
1k views

Where to start, to develop an online Backgammon game?

I would like to develop a backgammon game to play against other players online, as a way of learning more Javascript/jQuery and a little game development. I'm a web developer and most of my experience ...
1
vote
4answers
209 views

Protecting the integrity of a game state while minimizing amount of data sent

I'm developing a multiplayer game in PHP/jQuery, and naturally have to be wary of any sort of data coming from the client. At present, I have tables of data representing the map (2D roguelike), ...
1
vote
2answers
501 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
3answers
888 views

What Javascript game engines are out there, other than Impact? [closed]

Does anybody know of a decent (meaning preferably free ;)) alternative to Impact? Any suggestions are very much appreciated!
1
vote
2answers
986 views

How to draw a tileset using HTML5 canvas?

I have a tileset something like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 My tileset draw code looks like this: var image = new Image(); image.src = ...
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 ...
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 ...
1
vote
2answers
392 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 ...
1
vote
1answer
1k views

JavaScript rendering: Canvas or DIV?

I am planning on developing a multiplayer RPG (kinda like RuneScape, but don't worry, with a different gameplay) and i want to do this in the browser. Now before saying things like "A MMORPG is hard ...
1
vote
1answer
1k views

Easy way to do gravity in a simple game?

I'm looking for an easy, beginner friendly way to do gravity in a platformer. I've looked into Box2D tutorials, but they all seem very complicated. All I want is a class that takes into account if my ...
1
vote
2answers
247 views

How can I center a circle around a point on an HTML canvas?

I've got a job to make an engine and light game for canvas in HTML5. I like the things I make to be centered on the x,y positions I give it, I don't know why, it just helps me think about them ...
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 = ...
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
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 ...
1
vote
1answer
87 views

Playing part of a sfx audio file in HTML5 using WebAudio

I have compiled all of my sound effects into one sequenced .ogg file. I have the start and stop times for each sound effect. How do I play the individual effects? That is, how do I play part of an ...
1
vote
4answers
2k views

How can I use WebGL to create a tile-based multi-layer scrolling platform game?

I've found WebGL (based on OpenGL) to be a fiendish and unforgiving framework for those learning to write HTML5-based games. Despite the presence of many examples on how to get started, I'm really ...
1
vote
1answer
623 views

How do I deploy my JavaScript/HTML 5 to desktop and smartphone?

I'm looking for framework that will let me code on JS for HTML5 canvas and then will let me deploy to desktop and Android. I'm not looking to learn new stuff like Haxe or Lua. I want to do it in plain ...