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

4
votes
2answers
418 views

Where and how to promote an HTML5 game engine?

I've recently completed an engine, called Irenic. Now, I was wondering, how could one promote it? The process surely is different than promoting a game, because a game can be played by almost anyone, ...
2
votes
1answer
446 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 ...
5
votes
2answers
869 views

How to implement AI for fighting game

I built a 2D fighter yesterday. The second 'player' does hardly anything. Actually, nothing. To be honest, I have never made a game before that had an opponent like this. So my question is, how ...
7
votes
3answers
4k views

Javascript and PHP for real-time multiplayer?

I'm wondering if combining Javascript clientside with PHP/mysql serverside is a good idea for HTML5 real-time multiplayer (small scale) browser games? My technical knowledge is very limited, and even ...
-2
votes
1answer
974 views

Cocos2D game engine javascript is too slow on mobile

i developed a game using cocos2D javascript that works fine on web browsers but when i run it on mobile ( iPhone 4s , android nexus) the FPS was dropped to 20 - 22 on iPhone (max) how to optimize it ...
4
votes
4answers
4k views

Open source level editor for HTML5 platform game? [closed]

A natty GUI editor is very helpful to create level map. I want to use some open-source choices rather than build my own from scratch. I found Tiled Map Editor but it doesn't work for what I want. ...
5
votes
1answer
950 views

Multiple game frames in construct 2 for new levels?

Hi there I'm new to Construct and have tried out a few platformer tutorials. I'm getting to grips with setting variables and collisions, I'm now at the stage where I want to start adding new levels. ...
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
votes
1answer
438 views

Using Coffescript in HTML5 game development? [closed]

I just stumbled on this library/language called Coffescript, and thought it would do the coding part so much easier. As an example, drawing maps with a for loop would be: map = [0, 0, 0, 0, 0] ...
1
vote
3answers
909 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!
0
votes
2answers
506 views

Platformer movement and collisions

I'm working on a platformer but I'm stuck at the player movement and collisions. Right now I'm not including the grid at all in the movement, but it's time I do it. I've read this article on how to ...
1
vote
1answer
857 views

HTML5 Canvas Depth Sorting

I'm have problem with Isometric. I'm don't know how to name this "problem", but I'm show you some sceen what I get and what I'm need to get. My code now drawing something like: ...
1
vote
1answer
2k 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 ...
0
votes
1answer
103 views

Tilting a platform on its axis?

I'm wondering how I can tilt a platform on it's center/axis. For example, if the player steps on the left of the center, it should tilt to that side like in this picture. Can a platform like this ...
1
vote
1answer
2k views

Crafty.js multiplayer platform game, keeping players in sync

I'm using crafty.js to create a very simple platform game. It doesn't need to stop cheating, it's actually just seeing other players move around, and it doesn't need to have collision detection ...
-1
votes
1answer
335 views

How do I make more bullets shoot in this game code?

I'm having trouble in the "Bullet.prototype.draw = function ()" section of this code below. I'm trying to fix it so that I can shoot more at a time instead of just one bullet like it is now. Thus, ...
8
votes
8answers
3k views

HTML5 game obfuscation

HTML5 games have viewable source code. Is there a way to make them like swf file? How to hide the game algorithm? What do you think of the Firefox JavaScript Deobfuscator Plugin and obfuscation?
0
votes
2answers
231 views

Any social gaming services for JavaScript games?

I'm currently planning on building a HTML5/JavaScript game for the various platforms (Browser, iOS, Android, and WinMo7). I, obviously, would like there to be simple multiplayer (1v1, asynch), ...
4
votes
2answers
791 views

Optimizing isometric drawing function

I need help optimizing my Draw(); function to draw only what is visible in the viewport. Currently I'm drawing the whole Map array in a diamond shape. How can I make my function store only what is ...
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 ...
0
votes
1answer
477 views

Z axis in isometric tilemap

I'm experimenting with isometric tile maps in JavaScript and HTML5 Canvas. I'm storing tile map data in JavaScript 2D array. // 0 - Grass // 1 - Dirt // ... var mapData = [ [0, 0, 0, 0, 0], ...
1
vote
1answer
292 views

Open Source HTML/JS game(s) with license that would allow embedding in my app? [closed]

I'm working on an educational app for kids. At the end of the sign-up process, the kids must wait for a confirmation from their parents in order to gain access to the app. While they wait for this to ...
-3
votes
3answers
256 views

Game getting progressively laggier?

I have a small game in HTML5 that uses socket.io to communicate with a node.js server. Now my problem is that, ever since I did my last update on it it seems to have something "chunk up" in the ...
40
votes
7answers
3k views

Managing text-maps in a 2D array on to be painted on HTML5 Canvas

So, I'm making a HTML5 RPG just for fun. The map is a <canvas> (512px width, 352px height | 16 tiles across, 11 tiles top to bottom). I want to know if there's a more efficient way to paint the ...
0
votes
2answers
1k views

Lighting effects with 2D sprites

I would like to know how to best achieve lighting effects with 2D. I guess the only way is to make sprites of the area to be lit in specific colors? Say I have a streetlamp, and around this place ...
2
votes
2answers
818 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 ...
1
vote
2answers
673 views

Multiple setInterval in a HTML5 Canvas game

I'm trying to achieve multiple animations in a game that I am creating using Canvas (it is a simple ping-pong game). This is my first game and I am new to canvas but have created a few experiments ...
1
vote
1answer
548 views

How do I go from a simple html5 tic tac toe game to an online 2 player game?

I've been working on an online 2 player Tic Tac Toe solution for blackberries. both old and new. And so far I have html5 code that has a 3 x 3 layout that switches between x and o for the game ...
1
vote
1answer
417 views

A* Start path finding in HTML5 Canvas

I'm trying implement A* Start path finding in my games(which are written with JavaScript, HTML5 Canvas). Library for A* Start found this - ...
7
votes
2answers
304 views

What is the standard way of delivering HTML5 games to portals and such?

Let me explain what I mean by "standard way of delivering"... Think about Flash games sites. Flash games can be delivered as a single file, either hosted by the site, or, I guess, provided by someone ...
1
vote
1answer
201 views

Calculate travel time on road map with semaphores

I have a road map with intersections. At intersections there are semaphores. For each semaphore I generate a red light time and green light time which are represented with syntax [R:T1, G:T2], for ...
4
votes
6answers
697 views

Should I refer to browser-based games as HTML5 games or Javascript games?

First of all, I know that there are alternatives to both HTML5 and Javascript, but I worded the question so generally ("browser-based") because if I had said "HTML5" or "Javascript" games that would ...
1
vote
1answer
175 views

Manually updating HTML5 local storage?

I'm just starting out HTML5 game developement (and game dev in general) and watching all the videos and tutorials available something has crossed my mind. Everyone keep saying I should set the ...
6
votes
2answers
1k views

Is there an ideal width to height ratio?

I would like to know if there is any "ideal" width to height ratio when creating games for the web. My canvas is fluid, and resizes according to the browser width and height. But with all the devices ...
2
votes
3answers
4k views

How do I structure a 2D platform level?

I'm doing a 2D platformer but I don't know how they are usually built. The approach I'm looking at is making it tilebased, with ground tiles on bottom row, then platforms on some places in "mid-air" ...
1
vote
1answer
234 views

How to perform efficient 2D picking in HTML5?

I'm currently using an R-Tree for both picking and collision testing. Each entity on screen has a bounding box for collisions and a separate one for picking. Since entities may change position very ...
3
votes
2answers
1k views

Essential 2D engine features [closed]

I have decided to make a simple engine for a new game I'm working on, and now, I'm wondering: what are the essential features of a 2D game engine? Or, a game engine in general?
0
votes
1answer
643 views

How to handle animations?

I am coding a simple 2D engine to be used with HTML5. I already have classes such as Picture, Scene, Camera and Renderer, but now I need to work on Animations. Picture is basocally a wrapper for a ...
0
votes
2answers
173 views

DrawImage doubt

What is the best option for animation in a game (HTML5 Javascript)? Put all the images in one png and change the background. Or create each image separately and draw with DrawImage?
6
votes
1answer
544 views

What is this JavaScript gibberish?

I am studying how to make a 2D game with JavaScript by reading open source JavaScript games and I came across this gibberish... aSpriteData = [ "}\"¹-º\"À+º\"À+º\"À+º\"¿¤À ~C_ ...
0
votes
2answers
456 views

how do i make the JS/jquery tic tac toe squares only clickable once?

As i have it now my script makes the 3x3 grid clickable, and I dont know exactly how to turn on the click once it has been clicked. This is using jQuery and a simple if else statement to switch ...
6
votes
4answers
2k views

Which image format to use for sprites in an HTML5 game?

In a 2D HTML5 game, what is the best image format to use and why? Should I use different formats in different situations? For example, .png for the background image, .jpeg for the animation frames and ...
0
votes
1answer
1k views

HTML5 Canvas Tileset Animation

How to do in HTML5 canvas Image animating? I am have this code now: http://jsfiddle.net/WnjB6/1/ In here I am can add animations something like -> Animation.add('stand', [0, 1, 2, 3, 4, 5]); But ...
2
votes
1answer
400 views

Customize Colors for Sprites in Web Game

So I'm working on an html5/javascript/css3-based game. Without going into too much detail, I'm thinking of having the characters be simple 8 or 16-bit style sprites, but I'd like to allow the user to ...
5
votes
4answers
1k views

Defining the track in a 2D racing game

I am designing a top-down racing game using canvas (html5) which takes a lot of inspiration from Micro Machines. In MM, cars can move off the track, but they are reset/destroyed if they go too far. ...
3
votes
3answers
1k views

HTML5 Canvas Game Timer

How to create good timer for HTML5 Canvas games? I am using RequestAnimationFrame( http://paulirish.com/2011/requestanimationframe-for-smart-animating/ ) But object's move too fast. Something like ...
1
vote
2answers
432 views

Frustum Culling/Only rendering what's viewed by the Camera in HTML5 Canvas?

I coded up a simple 2D Camera for my HTML5 Canvas-Based Game Engine but I noticed the performance wasn't very good. So a lot of people suggested only rendering things that are shown by the camera but ...
3
votes
1answer
687 views

HTML5 Canvas fillStyle as numbers not text

When drawing vector graphics in the canvas you set the fillStyle using an rgba string like this... context.fillStyle = "rgba(255, 223, 191, 1)"; Is it possible to feed in a javascript object ...
4
votes
2answers
1k views

canvas ball physics animation

I want to animate ball in html canvas like this. ctx.beginPath(); ctx.arc(75, 75, 10, 0, Math.PI*2, true); ctx.closePath(); ctx.fill(); start position is left top corner and ball's maximum ...
-5
votes
2answers
1k views

HTML5 Canvas game viewport

How to create in HTML5 canvas viewport? something like for tile maps.