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

0
votes
1answer
25 views

HTML Canvas Makes Everything Bolder On Right Side

For some strange and sudden reason, my canvas seems to make lines thicker and darker on the right ~1/4-ish. I have tried multiple browsers and different computers and they all have the same rendering ...
0
votes
1answer
315 views

Unity WebGL not loading on chrome

I've made a simple game but when I tried to load this on chrome its not loading. I am building for WebGL (HTML 5). I am getting these errors when the page loads. Unity version - 5.3.1f1 Chrome ...
2
votes
0answers
38 views

Strategies to make it difficult to cheat + easier to identify cheaters in Javascript/HTML5 game [duplicate]

I intend to have a Javascript/HTML5 game with a global leaderboard. I have devised a very simple system for submitting highscores as follow: When the game finishes, the game client makes a POST ...
3
votes
0answers
44 views

Check if a point is touching a user drawn curve in HTML5 canvas

I am having trouble detecting whether a ball is colliding with a red curve. The curve below is an example of what a user may draw on to the canvas. I can't think of any fast ways to detect collision ...
0
votes
2answers
68 views

Progress bar for EXP in javascript

So I am making an incremental game with Javascript, HTML5, and CSS, I need to have this bar that is esentialy a div with a p element in it "fill up" as the player earns more points through sacrifice. ...
1
vote
0answers
31 views

Arrow buttons not functioning properly [closed]

I have been cobbling something together from different examples that I have seen online I would like to know why is it not just showing 1 button per page and instead showing them all and decreasing ...
2
votes
1answer
24 views

Spriter model not touching ground in?

I was attempting to make a game in Construct 2 by using my Spriter Models plugin. However, when I imported the model, rescaled it & changed a few things, I got this: As seen in the picture, the ...
4
votes
1answer
60 views

What do html5 game buyers/sponsors do with the game? [closed]

I understand there are html5 devs who make contracts with companies: they allow them to use their games for payment. My question is how do these companies use these games to their benefit: what ...
6
votes
4answers
325 views

Rotating sprite around another sprite

I am building a pool game, and I want to make the cue rotate around the white ball. Here is the live code: http://199.26.84.223/nocol.html Here is the code for the white ball: balls = ...
3
votes
1answer
77 views

Collision happens even though the objects are not colliding according to what we see

I'm trying to build a pool game as my first phaser project. The biggest challenge today was to make the cue rotate around the white ball. After hours of searching and not finding anything useful ...
3
votes
1answer
221 views

Switching from Arcade to P2 physics in Phaser

so i just started using phaser for test i've followed the tutorial in the phaser website (making-your-first-phaser-game) everything is clear no problem . but since i've making a pool game i need ...
1
vote
1answer
322 views

Building a simple bomberman game with Node.js and Socket.io [closed]

I'm building this game mostly because I want to experiment with Node.js and Socket.io, and the game is more like a proof of concept. To start with, I have a 2D grid system as the game map. ...
2
votes
0answers
60 views

tilting image for mode7 game in HTML5

I'm making a mode7 game like mario-kart and I need to tilt the image before I draw it, I have tried using a buffer canvas to tilt the image then draw it on the games canvas but this makes it laggy ...
5
votes
4answers
192 views

Good algorithm to generate pixels for thick line?

I am not really making some drawing as of picture manipulation but I use line function to calculate "claimed" pixels in my line race game (demo here): The actual rendering is apart from the game ...
1
vote
0answers
51 views

Solitaire game - future strategy [closed]

I recently released my first html game. It's a simple solitaire game that can be played right in the browser on both web and mobile. Web version doesn't use any monetization technique, mobile version ...
1
vote
1answer
126 views

Drawing/adding shape objects with the mouse on html canvas

I've started with the canvas paint tutorial from link which worked fine with a few problems that can be fixed later. I've been checking a lot of posts on drawing shapes on the canvas but they all use ...
2
votes
3answers
57 views

How to handle “game missions/flights” across the world map

Sorry if my title is a little vague, I wasn't entirely certain how to word this specific question. I'm developing a small little MMORTS game, and in this game is the world map which consists of ...
0
votes
1answer
61 views

How do I combine two HTML levels? [closed]

If I have two levels that I have made separate in HTML5 how may I combine them so one comes after another?.
1
vote
1answer
109 views

How should browser based muiltiplayer game state be syncronized using WebSockets and a Node.js backend?

I'm in the process of learning how to create browser based html5 games. I'd like to eventually be able to achieve a game with mechanics very similar to that of the game agar.io. I've been observing ...
1
vote
2answers
116 views

2d mmo open world connection and reconnection

I am trying to create an 2d html5 open word (the sprite does not have any fancy flare, just shapes around) with only maximum of 10 player at once. My question is how to create a seamless join for new ...
1
vote
2answers
139 views

Why does player still leave map?

I'm making a simple HTML5 RPG in pure JavaScript likened after Nox, Diablo or Titan Quest, with the character centered on the screen and the map moving around it. TL;DR: My character, when colliding ...
-3
votes
1answer
131 views

handling wars in multiplayer browser game [closed]

I'm building a browser game about countries, cities, the user control his city, building it upgrading it, can fight other cities in the same country, elections and war between countries, peace, trade ...
2
votes
1answer
79 views

Tiled - move all tiles

I'm making a map in Tiled. I quickly ran out of room in the north of my map and would like to "shift" the tiles down. I'd prefer not to have to redo each of the tile layers. Is this possible? This ...
1
vote
0answers
128 views

touch mouseOver in createjs - DispatchEvent() not working in iPhone/iOS

I have recently developed an html5 game using createjs and I am currently in the testing phase. The game seems to work fine in all the devices except for the iPhone. After careful analysis I have come ...
1
vote
1answer
45 views

Why can't CSS Sprites handle vectors?

Almost all the documentation available either says that "sprites are bitmaps" or that "css sprites must be bitmaps". Is there a specific reason for this? Is it, in fact possible to create a css sprite ...
4
votes
1answer
252 views

Roguelike 2D Collision Detection

I'm just a normal guy trying to do some basic collision detection but I suck at it. I either get stuck in a wall or I go in reverse in the wrong direction trying to update the player position to a non ...
-1
votes
1answer
37 views

Java-script map/array “undefined” [closed]

Hi when I call the the function below in the chrome console it tells me "Type error cannot read property '2' of undefined" why?. defining the map: var map = { FALL:[ [0, 0, 0, 0, 0, 0, 0, 0, 0, ...
3
votes
0answers
232 views

Card Masking in Phaser

Good Day, I'm new to Phaser and still learning about it to. I am challenging my self to create a simple animation of a card flip somewhat realistic rather that making use of a scale. This is ...
1
vote
2answers
93 views

HTML Multiplayer and Hiding Information

I'm in the process of conceiving a multiplayer web-based game of sorts and was looking into different ways of achieving this. Instead of using PHP/MySQL/AJAX like I'm used to, a lot of sites are ...
3
votes
1answer
78 views

Call a native mobile API in Construct 2?

It is possible to use mobile api features in a Construct 2 game (html 5 / js engine) ? I didn't find anything about that on the net, unlike anothers game frameworks like Corona Entreprise or ...
1
vote
0answers
25 views

CocoonJS draws shadow around tiles

I am using CocoonJS launcher on iOS for a simple tiled game. Calling canvas drawImage for tiles adds a shadow or ghost border around tiles. See this screenshot: ...
1
vote
1answer
99 views

How are CSS and WebGL coordinates related? [closed]

I'd like to build a simple framework which rendering combines web page DOM elements with WebGL, such that they're manipulable in the same coordinate space. How does the plain CSS coordinate system ...
2
votes
1answer
135 views

Centering camera on player div

I've been making a roguelike-style game in HTML5 without using canvas (only divs) with pure JS (fiddle!). I've been trying to enlarge the tile size (font size) while keeping the player centered within ...
1
vote
0answers
229 views

In Phaser, how should I be managing state? [closed]

I'm quite new to Phaser and JavaScript really confused about state management. Phaser has lots of documentation and info on the net, but everyone seems to be doing it a different way. An example: ...
-1
votes
2answers
363 views

Where to start developing a 2D puzzle game [closed]

I would like to start developing a 2D puzzle games, much like sudoku for example. I would like to publish it on Facebook and on gaming websites, like miniclip, agame, kongregate. The game should have ...
3
votes
2answers
376 views

Collision detection between draggable object and world objects?

I have a game I'm making in Javascript that will involve combining items by dragging and dropping them onto each other. Think Alchemy or similar. So far, so good, but I hit a snag while trying to ...
3
votes
1answer
302 views

How can I create 2D, sprite-based reflections in HTML5 Canvas?

I'm trying to create simple reflections in a 2D, sprite-based game using HTML5. I'm looking to recreate an effect like the one you'd often see in GBA games, such as Pokemon Emerald and Mother 3: ...
2
votes
1answer
134 views

How to “piece together” an image in code, to render later?

I want to make a game in Dart and have decided to use the available port of the JS Phaser game engine. This will be my first time really making a game involving graphics so I guess I'll have a lot to ...
1
vote
1answer
885 views

Rotate arrow on canvas

I need to draw a flow dynamically based on some user choices. In that flow I want to draw the choices (blue circles with number) and the directions of that choices (line and arrow). For example: node ...
3
votes
1answer
215 views

How to implement user friendly screen panning on 3D HTML canvas for RTS game

How can I get RTS map panning like how it was done in C&C red alert (with the mouse at the edge of the screen moves the screen in that direction) with a Babylon.js RTS game in the html canvas? ...
1
vote
0answers
126 views

HTML5 game : Secure way of saving score [duplicate]

I wrote a pretty basic game for colleagues to play : the player shoots on an enemy which has 50 lives while other smaller enemies pop randomly on the screen. The goal is to kill the main enemy as fast ...
1
vote
1answer
534 views

How do I add my phaser.js game to my pre-made web page?

First off, it's my first time doing a little bit of game development, and I have no idea of the normal flow of making a game, let alone a browser game. My game uses the phaser framework of HTML and ...
1
vote
0answers
318 views

Phaser noob: Why is my Phaser game jittery? [closed]

I'm just getting started with HTML5 game development, and I'm very impressed with the quality of Run Pixie Run and bunnymark in both desktop and mobile, so I've started making a game using Phaser ...
1
vote
1answer
129 views

Set a different animation rate for moving player NOT using a sprite

I am trying to start making a simple game using HTML5 with a canvas and some JS. I have a player whose movement I am comfortable with, but the rate at which the player animates when it moves is too ...
3
votes
1answer
298 views

Shadows in html5 canvas game

I'd like to ask for reference. I met an article about how to cast shadows in games. I'm using html5 canvas (currently without webgl) with javascript for my projects. The article mentioned above is ...
1
vote
2answers
191 views

How to access bottom canvas layer in HTML?

I have such html: <div id="main_window"> <canvas id="canvas_hex_logic" width="200" height="100"></canvas> <canvas id="canvas_ground" width="200" height="100"></canvas> ...
1
vote
1answer
189 views

How do I cut off the edge of an image in a 2D JavaScript Array?

OK, I am trying to make a game that is a little bit like SimTower but utilizing HTML5 (particularly the canvas element) and JavaScript with a little CSS. I have ran into a couple of little problems ...
1
vote
0answers
436 views

Simple track method for 2D car game? [closed]

I'm a new programmer and I am trying to make a 2D car game on an html5 canvas with javascript and JQuery. I have got the basic car motion down, check it out here: ...
9
votes
2answers
4k views

Displaying a particular sprite from spritesheet using Phaser

I am trying to make a card game using Phaser, the HTML5 JS framework. Because I'm a terrible artist and can't design my own, I'm using a free spritesheet of playing card images I found online. The ...
4
votes
2answers
636 views

How do I make a scrolling map within an HTML5 canvas?

My project is a 2D tactics game with a square grid. It's all HTML5/Javascript/JQuery. I have been able to draw out the grid and have a system where I can load different maps with tiles where units ...