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
514 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 ...
1
vote
2answers
547 views

HTML5 Quintus button click doesn't work in local

If you try to run this example http://html5quintus.com/docs/ui.html, you'll be able to click the buttons, but you won't if you download a local copy of the example and click the index file (without ...
3
votes
1answer
171 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
37 views

Resizing the map in HTML5 canvas

Say I have a big map for my HTML5 game. And it is drawn with an image repeatedly. I want my map to be able to resize and respond to player's behaviors. Now I can resize my map, I just multiply a ...
1
vote
1answer
62 views

Bouncing from any object after collision JavaScript

I'm trying to make a ball bounce off some obstacles after a bounding box + pixel by pixel collision. Somehow, sometimes the ball is not going in the direction it is supposed to be. If the ball is ...
1
vote
1answer
21 views

How to FIX Phaser Idle Clicker Game Images?

I'm new in game development Phaser.. I'm trying out a code tutorial for a clicker game I browsed from Zenva and did a few adjustments with the images (along with the codes) but I can't help to notice ...
1
vote
1answer
46 views

How add a PIXI container into a Phaser Game?

How add a PIXI container into a Phaser Game? I have a game made ONLY with PIXI. but now i would like to port it to a Phaser. All my game content happens inside a pixi container "screenContainer". ...
0
votes
1answer
28 views

Updating bots/AI behavior after a fixed elapsed timestamp in game loop?

I am developing a HTML5 game in javascript. Now I have created a few bots and they should be able to change their orientation after a few seconds/a fixed timestamp in the game loop. Suppose my game ...
3
votes
2answers
442 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
1answer
180 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 ...
1
vote
2answers
45 views

Updating code to include states

The Problem I am having a problem in that I am finding it hard to understand how to update my current code so that it uses states. I am creating a game, the game has a menu, each page in the game ...
3
votes
1answer
100 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 Cocos2d....
1
vote
0answers
19 views

How to communicate with LibGDX HTML5 app?

I'd like to have a HTML form send data to a LibGDX game deployed as HTML5. Ideally as a form in HTML as part of the same page that contains the LibGDX div/canvas, and use the form to set up some data ...
1
vote
0answers
5 views

Detecting collision between browser window middle point and other sprites visible in the window

In HTML5 canvas, I have an object which is always in the middle point. On the big map there are other moving objects. I want to detect if the middle point of the window hit any shape we see on the ...
1
vote
1answer
79 views

Fastest way to render isometric world with moving entities?

I've got an isometric diamond-shaped world. The world consists of isometric planes like rooms. The walls and floors of the rooms and all obstacles and items in the rooms are isometric entities. So I ...
-1
votes
1answer
50 views

What does this code mean? [closed]

I got some code from here http://www.williammalone.com/articles/create-html5-canvas-javascript-game-character/1/ Everything is quite understandable, everything working well. However, I don't ...
0
votes
2answers
921 views

How to move an image back and forth with javascript

I currently am trying to make a baseball game and have this code here: http://jsfiddle.net/769BK/ I have the baseballX set to a decrement, and then I try increasing the value using baseballX++; but it ...
0
votes
0answers
40 views

Floor casting in a Raycasting engine

I'm trying to create a pseudo 3D, raycasting engine with plain JavaScript rendered on the HTML5 canvas. In short: a Wolfenstein 3D clone. So far I have gained inspiration from the following guides: ...
0
votes
1answer
80 views

How to avoid 2d enemy using trigonometry?

I'm making a game in Javascript & HTML5. I have a "bullet" (let's call it so) that needs to reach the enemy (at fixed position) and that need to avoid the enemy's "bullet". To make the bullet ...
0
votes
2answers
2k 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 ...
0
votes
0answers
37 views

Detecting collision of multiple moving objects

I have wrote a simple game that has a 100 balls bouncing off the borders of the canvas. Each ball is an instance of ball class function that has the following definition: var cnv = document....
0
votes
0answers
53 views

Collision detection not working for JavaScript Game

I'm working on a JavaScript game called Spacecraft which is minecraft 2d style. The problem is that my collision detection is not working. It works for a all the divs but the ones with the class of ...
0
votes
1answer
43 views

js canvas tiled map - for loop, while, or matrix

I am making a top-down view tiled map in canvas, where player is always in the middle of the screen, and map scrolls depending on where you go, like in moba games. I also want it to loop infinitely in ...
4
votes
2answers
488 views

Where and how to promote an HTML5 game engine? [closed]

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, ...
0
votes
0answers
25 views

libGDX GWT compile with “-style DETAILED”

So basicly my libgdx HTML5-gradle build doesn't work. When switching from state it gives the following error: __gwt$exception: <skipped>: Cannot read property 'tM' of null Of course I want to ...
0
votes
0answers
23 views

HTML5 game - Difference in layouts in webview of app and webpage

I have created a working prototype of an HTML5 game and tried to convert it into an android app using PhoneGap. My issue is that the layout of the screen is bigger in case of the webview of the app. ...
0
votes
0answers
50 views

Errors in code examples from the book “Advanced Game Design with HTML5 and JavaScript”

I have purchased Advanced Game Design with HTML5 and JavaScript and have started going through the chapters. I notice that after chapter 2 I get code errors and the source code from the downloads ...
1
vote
2answers
59 views

Maths ? coordinates rotating around coordinates

could you geave me a tip please, a redirection to what is the "simple" math I need to learn and understand for the rotation of an object (its coordinate x, y) around an other object (an other x, y), I ...
1
vote
0answers
78 views

Pixel by pixel collision detection pinball

I'm currently working on a Pinball game using the HTML5 Canvas and JavaScript. Right now I'm getting a hard time with the pixel by pixel collision, which is fundamental because of the flippers. Right ...
2
votes
1answer
92 views

How to implement map scrolling inertia formulae

I'm looking for a mathematical formulae to calculate map scrolling inertia. Basically I have an HTML5 Canvas displaying part of a map and I capture the mousedown / mousemove / mouseup to calculate my ...
1
vote
2answers
156 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
0answers
19 views

Using GLFX.js on a full HTML page

I have a friend who is developing a game for HTML, and wants me to implement GLFX into the site page. The problem is GLFX was designed specifically for use with the HTML5 Canvas, which he isn't using, ...
0
votes
0answers
48 views

Chrome Canvas bug on Mac OS X when switching spaces?

I have a simple Breakout clone created using the <canvas> element and the 2d context. Whilst playing the game in Google Chrome (version: 49.0.2623.87 (64-bit)) if I switch spaces within Mac OS ...
0
votes
2answers
796 views

How legal would it be to use some elements of the Half Life universe in my non comercial, indie game?

I'm planning to make a simple, HTML5 game, that would use some elements of the Half Life universe. Basically, it would be a 2D Portal clone, but it would have it's own story, and portals would be ...
0
votes
0answers
87 views

UE4 -> HTML packaging not working

In the UE4 editor, if I try to package a project via File -> Package Project -> HTML5 option it creates the package, but doesn't work. A black screen shows up when I try to run the project's HTML file ...
0
votes
0answers
106 views

Unreal Engine - Why is the size of even the most minimal HTML5 project ~ 155 MB?

I created a new project in UE4 (ver 4.10.4) with "no starter content" and "scalable to 2D/3D" settings. Essentially, there are a total of 5 assets in the project 1) floor, 2) light source, 3) sky ...
1
vote
1answer
45 views

Does pausing the canvas draw restores the FPS to higher value in a HTML5 game?

I set Frame Per Second of 60 for my game. But after 1 minute it gets to a significantly lower value - around 8 FPS. Does pausing the canvas drawing restores the FPS to higher value? If it does, how ...
1
vote
1answer
91 views

How should I efficiently clear and redraw my canvas with lots of animated sprites?

My current solution is to clear the entire canvas and redraw all sprites on every requestFrame(). This works but feels inefficient: I only need to clear the part of the canvas made invalid by ...
1
vote
3answers
1k views

Where to start, to develop an online Backgammon game? [closed]

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 ...
0
votes
0answers
30 views

Adding rhythmic combat in Construct 2?

Just a simple question here: Is there any way to integrate counter-attacking, stun and punch rhythmic combat mechanics seen in the Batman: Arkham franchise and Shadow of Mordor? I know that Construct ...
-1
votes
1answer
66 views

What JavaScript and or Html should engine I should use? [closed]

I took some classes on JavaScript and I know some html5. I took these classes so I can Learn Game Development!! I want to use JavaScript and not C# or C++ because I want easy cross platform with the ...
0
votes
1answer
46 views

Why are my canvas drawings larger than the actual image?

For the following page source, I've finally gotten a grip on rendering the cards. I'm puzzled why they appear about 2.5x larger on the canvas. <html> <head> <style> ...
1
vote
1answer
208 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 ...
0
votes
1answer
32 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 ...
4
votes
2answers
12k views

Is it possible to rotate an image on an HTML5 canvas, without rotating the whole canvas?

So I basically want to rotate single sprites on the canvas without rotating the whole canvas, is that someway possible. I also don't want to create a new canvas for each object I have. Also, it ...
0
votes
1answer
2k 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
41 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 ...
0
votes
2answers
102 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. ...
3
votes
0answers
71 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 ...
1
vote
0answers
33 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 ...