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

4
votes
2answers
188 views

What's the current preferred method for serving/storing game data on html5 games

Given all the recent improvements on web platform (webgl, websockets, etc.), it should be now possible to see great games on web. However my biggest concern so far has been around serving and storing ...
0
votes
3answers
432 views

Is there a way to create multi-resolution graphics for game with createjs?

I'm on a advanced development for a game made with createjs framework. However it's time to export it to some platforms. The graphics are made for the iPad 3 resolution. I would like to export them ...
0
votes
1answer
242 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 ...
1
vote
1answer
406 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 ...
2
votes
4answers
1k 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
744 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
226 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 ...
0
votes
1answer
141 views

Is my social game technical solution viable?

I'm currently working on a board social game using HTML5 (canvas) & Asp.net MVC 4, Azure, Sql server, EF. I'd like to do a server side realtime validation (using Ajax) of a player moves (not more ...
2
votes
3answers
505 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 ...
1
vote
2answers
253 views

How do you capture keyboard and mouse input for an HTML5 game?

Is there an accepted method for capturing player input in HTML5 games? I have seen several methods, and the browsers seem to be in varying states of implementation; On MDN they tell you not to use ...
0
votes
1answer
3k 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
342 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
390 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 ...
1
vote
0answers
56 views

Improving performance on older Androids

I'm learning to build html5 games for mobile. I'm worried about the FPS animation on older model Android... as I use a lot of setTimeouts to update certain aspects and would like some suggestions on ...
6
votes
2answers
1k 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
621 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 ...
1
vote
1answer
88 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 ...
2
votes
3answers
87 views

HTML5 tags on my website? [closed]

I'm not here to ask about the merits of HTML 5, CSS 3, Javascript, etc. as game development tools. Lord knows how many people have asked about that already. No, what I'm curious about is what kind ...
0
votes
1answer
943 views

Can't Build Cocos2Dx emscripten project [closed]

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
1k 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 ...
-4
votes
2answers
263 views

Moving Character Based on background [closed]

I want to know how can i move the following character just in predefined areas as shown in the bg.jpg file character http://s7.postimg.org/ezyaclrrb/walking.gif bg ...
-4
votes
1answer
419 views

Can I make a downloadable .exe app for my game if I make it in HTML5?

I was going to make a MMORPG in HTML5 and javascript but I think I'm going to make a singelplayer first after all.. It would be nice to make the game in html5 anyway so the transition to making an ...
3
votes
1answer
667 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
2k 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 ...
3
votes
4answers
914 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
295 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
440 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
207 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
133 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
181 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
301 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
225 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
424 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
2answers
724 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
301 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
757 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
511 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
595 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
512 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
399 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
182 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
315 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
5k 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
307 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 ...
-2
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
910 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?