Questions tagged [html5]

HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags.

44 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
2 answers
1k 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 ...
  • 81
6 votes
0 answers
267 views

How can I call a native mobile API in Construct 2?

How can I use mobile API features in a Construct 2 game (HTML 5/JavaScrit engine)? I didn't find anything about that on the net, unlike other game frameworks like Corona Enterprise or Cocos2d.
  • 161
4 votes
1 answer
942 views

HTML5 Canvas - Drawing with Floats

I'm trying to implement a game where you have car moving along a line in HTML5 Canvas. Using a little bit of trigonometrie I managed to get the right x and y coordinates to add to the coordinates of ...
  • 41
3 votes
0 answers
266 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 ...
2 votes
0 answers
556 views

Persistent realtime game authentication (JWT, Passport)

Context I am building a MMO game in HTML5 with canvas. I use NodeJS on server & JS from scratch on client. I also use socket.io to manage realtime. The game is persistent & each player keep ...
2 votes
0 answers
2k 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 ...
  • 121
2 votes
0 answers
60 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: http://martindrapeau.github.io/cocoon-...
2 votes
0 answers
1k views

Converting coordinate systems to/from an isometric game world

I have tried searching and reading for an answer, but the information I could dig up either didn't fit what I need or was in the form akin to "Just multiply the vectors with the inverse matrix of.." ...
1 vote
0 answers
155 views

How to play multiple sounds at once without reloading data?

I am making an HTML5 game, which involves one audio being played multiple times at once. I searched this issue up and found this: https://stackoverflow.com/questions/25654558/html5-js-play-same-sound-...
1 vote
0 answers
279 views

Godot speed up mobile HTML5 Export GLES2 load time

I got a small Godot project that should be played on mobile devices, however the load time of a GLES2/ HTML5 export project of Godot takes 20+ seconds to load from the server. To decrease the load ...
  • 126
1 vote
1 answer
581 views

Unity Help solving Uncaught Abort on HTML5 Build

For some reason there is a Invoke that is triggered when a button is clicked that causes my game to crash. Any idea how I can sort this out? I have plenty other Invokes and none has given problems. I ...
  • 145
1 vote
2 answers
119 views

Select Neighboring X or Y Tiles

I have a randomly generated set of tiles, and I am trying to select neighboring x or y tiles to perform functions on them based on if they are a certain value of tile, like so: ...
  • 11
1 vote
0 answers
362 views

Converting 2d cartesian coordinate-based map editor to rendering isometric view

I have been working on a 2d html5 canvas map editor. It is tile based, and originally it was just a top-down view on a grid of tiles (or empty spaces). I decided I wanted to convert it to render the ...
1 vote
0 answers
27 views

How do I fix these touch events? Events respond if there are 2 fingers but not 1

I am making a simple game of mine mobile-friendly. The goal is to: Make character walk if a touchstart event is sensed on right half of screen. Stop character if a touchend event is sensed on the ...
  • 11
1 vote
0 answers
134 views

Libgdx animation for HTML5

I'm working on my first html5 game with libgdx, it's a platform android game that I made a while back that I now want to host on my website. Everything has been going okay till I got to animating the ...
1 vote
0 answers
247 views

Image looks GOOD on the editor but BAD (blurry) on the HTML5 export

I have a red bar that looks good inside Unity editor, but when I export the build it looks very strange. Any idea on how to fix this? The image on the left is the one with the strange/bad looking red ...
1 vote
1 answer
697 views

Phaser Tiled map importing

How can I be sure that the tileset used in making a Tiled map remains as a multiple of 2, since this is a requirement of phaser when loading JSON tiled maps? I have tileset images which I got for free ...
  • 205
1 vote
0 answers
865 views

Accuracy timer for html5 gaming (even with inactive tab) how?

I've implemented Timer class for high accuracy timing (for example for update logic/game-loop, sending ping each 15 seconds by WebRTC etc.) setTimeout/setInterval ...
  • 113
1 vote
0 answers
59 views

Where to put Tweening effect codes in HTML5 Canvas game?

I am building a javascript HTML5 canvas game and I need to scale the map. However whenever I scale my map the screen stutters very obviously. To scale smoothly without player noticing I add Tween ...
  • 255
1 vote
0 answers
873 views

Creating an Isometric tile map with HTML5

I'm trying to create an isometric tile map using HTML5 Canvas. Everything I've found online points me towards using a pre-built engine. I'd like to learn how to do this without using an engine. Is ...
  • 594
1 vote
0 answers
232 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 ...
  • 255
1 vote
0 answers
289 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, ...
1 vote
0 answers
617 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 ...
  • 11
1 vote
0 answers
439 views

Balancing fight script in Text Based Javascript Game

I'm working on a little text based javascript game and I've been using chromes Javascript console for the output. The 'game' works off a series of methods written into an object called ...
1 vote
0 answers
61 views

Maintaining relative location of objects across different screen resolutions

I'm developing a very simple interactive HTML5 game, in which I need to show a room having multiple objects like a cupboard, table, fan etc. How can I display all of the objects together, so that ...
1 vote
0 answers
102 views

HTML5 Canvas: Get rect coords after rotation (relative to screen)

...
  • 141
1 vote
0 answers
66 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 ...
  • 121
1 vote
0 answers
2k views

How to turn a 3d camera (in HTML5 2D Canvas)

A few years back I started experimenting with 3d in canvas. Everything went pretty well untill I had to to turn the camera, I couldn't get it done. A few days back I just happened to stumble upon ...
  • 133
0 votes
1 answer
29 views

using javascript canvas.context.scale resets custom font

I am making a HTML5 game using javascript with canvas. I am implementing a custom font adding @font-face style tag to header in the .html file, then if I set ...
0 votes
0 answers
23 views

CloneNode or Audio Pool?

I have a game, but I have to make a decision about audio. Should I preload an audio pool, or create cloneNode when played? Which is better in terms of best loading and better performance?
0 votes
0 answers
159 views

Testing my game in the engine works fine, I export to HTML5 and try but all the tiles in tilemap have disappeared

Here is a link to the live game: https://44351-w21.github.io/one-screen-platformer-francescainfranca/ As the title says all the platforms in the tilemap do not appear when you run the game on the ...
  • 1
0 votes
1 answer
95 views

How do you make html elements not blurry

I was making a html game and all the elements are blurry is there a fix to this? I use css but it makes it blurry Code ...
0 votes
0 answers
533 views

html5 canvas isometric tile map

i need a help i have an Isometric Staggered tile map in Tiled (mapeditor.org). 100x100 tiles, 94x54px, 9447x2727px. total. How can i make this in html5 canvas ? var context = document....
  • 1
0 votes
0 answers
55 views

Abstraction for dialogue and quests in web game

I'm not very experienced with web languages, but I know a little bit of JavaScript. I'm working on creating a text-based rpg in HTML and need a way to modify dialogues for main story or quest ...
  • 1
0 votes
0 answers
75 views

object position handling for multiplayer a game

I am creating a multiplayer HTML game which focuses on manipulating planet trajectories with gravity points. I am creating bunch of planets with random initial velocity and random direction and i am ...
0 votes
0 answers
589 views

Moving player one tile at a time (Javascript)

I've been watching this tutorial and found the code works flawlessly. Although, there is something he doesn't cover in the video. How to move the player one tile at a time. Every tutorial I've found (...
0 votes
0 answers
140 views

Using dom elements for game interaction - slow performance

I have a need for my html5 game (using melonjs) to allow users to click tile areas on the map. The idea is it will show a css styled hover area. The browser tested is chrome. I could do this natively ...
  • 1,035
0 votes
0 answers
212 views

libGDX/HTML5 game sounds doesn't work on iPhone

I have a libGDX/HTML5 project that works well on desktop browsers, but on mobile browsers it has problems. I can have some sounds on Android browsers (not perfect) but on iPhone browsers it doesn't ...
0 votes
0 answers
167 views

HTML 5 multiplayer game with java server logic code duplication?

I want to make a browser multiplayer game with java server. I'm still in the design stage and i'm deciding what technologies to use. But i stumble upon the problem when the client need the same logic ...
  • 147
0 votes
0 answers
69 views

Choosing a data structure for a group of static (almost) thousands of objects on HTML5 canvas

I have this requirement to implement a data structure for a group of thousands of displayable objects, on HTML5 canvas. Something like a particle system. The objects are randomly spread on the map. ...
  • 255
0 votes
0 answers
412 views

Adding multiple animated sprites on canvas make the game FPS drop sharply

I am using PIXI.js to build a html5 canvas game. Although this is PIXI.js specific question I think this may happen very often in HTML5 canvas games. I have placed hundreds of static sprites in my ...
  • 255
0 votes
0 answers
288 views

Drawing a object with Box2D and HTML5 canvas on current mouse position

I'm attempting to create a air hockey type game with HTML5 canvas and JavaScript, using Box2dWeb for the physics calculation. I need a way to draw the puck at the current mouse x and y position every ...
  • 101
-1 votes
1 answer
81 views

Test your Mobile App's Code

I am new to game development in HTML5, and I would like to know how I can test my code out to see what I made with an IDE or something. Thanks!
-4 votes
1 answer
2k 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 ...
  • 7