Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [html5]

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

0
votes
1answer
32 views

Can a .exe file ported from a program like NW.js or Electron be put console stores?

I'm early in development working on a game in HTML5/JavaScript canvas, and I wondering if porting the game with some HTML/JS to .EXE converter would allowed it to be posted on consoles? I think it ...
1
vote
1answer
36 views

Is there a way to automatically group tiles in a A* pathfinding grid to find the largest areas?

I'm making an RTS game using html canvas. I've made a program that randomly generates levels in order to test my pathfinding script. it divides the pathable blocks into squares so that you can apply A*...
2
votes
0answers
78 views

How to port an html5 canvas game to sell on PC / Console?

I am trying to make a 2D platformer, but I want to use html5 canvas since I find it much easier to create 2D games with it than with Unity. I am wondering if there is some way I can bundle my game so ...
0
votes
1answer
36 views

Canvas Infinite Map: How to have reappearing objects at static X,Y even when looping

I made a html canvas example of an infinite scrolling map with objects in static places. As you can see in the Fiddle below, when you move left with the Arrow Keys, you can see that the map does not ...
0
votes
0answers
9 views

Crossword puzzle [duplicate]

How do you make the keyboard arrow keys interactive so that when the user presses one of these it will move the cursor in that direction; I am working in html. Thanks Angela Jackson
1
vote
1answer
82 views

What should i use as a board for my game? [closed]

I'm a beginning programmer and i need to make a game. The rough idea revolves around fleets fighting in turn based battles while you control your factions resources and manpower. The original concept ...
2
votes
1answer
80 views

Why are my animations flickering?

My animation is supposed to be used in my physics project I am making. I am using 10 millisecond setInterval() and setTimeout() ...
1
vote
4answers
126 views

How to improve load times of audio files without loosing too much quality for HTML5 game?

I'm creating an HTML5 game. We have high fidelity composed music, in the format of wavs and mp3s— some ...
1
vote
1answer
65 views

HTML5 game pases when you go to another tab

I'm making a simple game and I use requestAnimationFrame. Now the problem is that each I change to another tab the game pauses and when I return the game continues. ...
3
votes
2answers
116 views

Implementing multiplayer aspect of a simple HTML5 game

I've been thinking about this a lot. I am trying to implement a simple multiplayer game but I have difficulty figuring out how to "share the scene". For example, there are non-player entities like ...
0
votes
1answer
46 views

Why can't I load images in processing.js and let them be dynamic?

I can't easily load images. I can only render an image once unless I put this: <img src="images/papermario.png" hidden></img> in my html. I also still ...
1
vote
2answers
5k views

HTML5 games: play() failed because the user didn't interact with the document first

I'm creating an HTML5 game using MelonJS game engine. Before I load the game, I have a simple pre-login page with a Splash and background music. This page has no need to load the game engine or game ...
0
votes
1answer
72 views

online game, NPC monster death and hit detection to gain experience points

I'm doing a simple idle game, HTML5 client and Node.js server, but I'm making it online, where the client talks to the server (websockets) and all the logic is in the server (I want to prevent ...
0
votes
1answer
216 views

Javascript-How to create a moving bullet animation from canvas

the bullet cant see to move at all ...
1
vote
3answers
91 views

Draw the HUD just once on the canvas

I am not able to draw only one HUD of my game on a separate canvas, so I do not have to redraw it to each frame, I have four functions, init(), render(), loop() and drawHUD(): init() is my function ...
1
vote
0answers
95 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
1answer
268 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 ...
0
votes
0answers
42 views

Can I edit a game made in construct 2 without having this program?

I'm thinking of buying the license of this game, but I do not have construct 2. Can I edit this game directly in the JS code? If I download the free version of construct 2 can I edit the game? The ...
1
vote
1answer
163 views

Javascript/HTML5 canvas: Integrate scrolling tilemap with map server

I am playing around adapting the example code at Mozilla Dev Network: Square tilemaps implementation: Scrolling maps to fit with a server I wrote myself. There's a link to the original source code at ...
0
votes
0answers
16 views

managing game dialog styling / actions using custom markdown

I want to provide my dialog writers with the ability to emphasize certain portions of the dialog. Some notes: The effect I'm using is a typewriter effect for RPG dialog. Dialog is stored by ID in ...
1
vote
0answers
10 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 ...
0
votes
0answers
17 views

Audio and Game play synchronisation techniques

I'm trying to develop an audio rhythm based 2d html5 game and need some advice. I'm trying to develop the logic to sync the audio with the games animation. I do not need a constant animated sequence ...
0
votes
0answers
831 views

Cannot read property add of undefined Phaser.js

There is a problem with game.state.add() function.For some reason game is undefined Uncaught TypeError: Cannot read property 'add' of undefined at Object.init (main.js:51) at main.js:58 <...
0
votes
1answer
241 views

How does the double-buffered canvas know when to swap the buffer?

How does the HTML5 canvas know that all the drawing operations are complete and it's time to swap the buffer ? Program can have multiple draw calls at different places so how will it know when is the ...
1
vote
0answers
75 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
1answer
369 views

WEBGL antialias false to pixel art low resolution

I know this issue maybe repeated and seems to be very common but I searched first and did not find anything concrete. I am doing some test and playing around with pixijs. I created an stage 320x180 ...
0
votes
1answer
140 views

Mobile screen resolution and canvas size

I'm making a HTML5 game using the canvas. I was building it for my iPhone 6 which state a resolution of 1334x750 pixels but also a resolution of 667x375 points. I notice that my canvas need to match ...
0
votes
0answers
49 views

HTML5 Canvas drawing a line & colliding with it

I'm somewhat new to building games using the Canvas without any framework wrapped around. For my current project I try to build a snake like game where you can turn left and right (you always move ...
3
votes
5answers
64 views

Turning a simple HTML5/JS single-player game into a multi-player one

CONTEXT: I am currently developing the front-end/ client of a simple browser game using HTML5 Canvas/JavaScript. In the future, I would like to add a multi-player dimension to it, most likely using ...
1
vote
2answers
331 views

Detecting overlap with Phaser P2 physics

In a 2D platformer, I'd like to implement a ladder. I have collision working between the player and ground tiles. Now I would like to be able to detect when the player walks through a ladder tile (...
0
votes
2answers
81 views

How to access files in Chrome

So, I am making a game-like html file that needs to load a few assets. I have a loading animation which uses the timing of the loading files to create a progress bar. This all goes fine. The files all ...
2
votes
0answers
255 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 ...
3
votes
1answer
212 views

DrawImage problem adjacent sprite?

Context I'm building a 2D game from scratch in JS. I'm drawing the map by using rpgmxp tilesets for the moment just to have some resources : Each tile is 32*32 pixels. I'm using canvas API with <...
1
vote
1answer
1k views

unity webgl scale page on different sizes of internet browsers on pc or phone

unity only has a fixed resolution for building webgl. how can I make it changebale on users browser size change. there are some tutorials on the internet that doesn't match. there is only ...
1
vote
1answer
254 views

Implement resolution scaling HTML5 canvas

I'm building an hmtl5 real time game using socket.IO and node.js. If you've heard of the classic game "pong", I'm going for that. When you consider the gameplay for this game, it becomes apparent that ...
0
votes
1answer
255 views

WWW request does not connect using webgl platform

I use request like code below: ...
1
vote
0answers
120 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 ...
0
votes
1answer
144 views

Animation with drawImage vs canvas

I have a canvas that draws the letter 'a' with a box: ...
-1
votes
1answer
45 views

Phaser problem with .damage oneshots

I am trying to damage player or enemy when they collide.(enemy will be damaged when collided with bullet and player will be damaged when collided with monster) ...
1
vote
1answer
94 views

What audio method works across all web browsers and mobile for HTML5/JavaScript?

I have looked at a number of ways to trigger audio in HTML5/JavaScript, but each time I find something that might be workable, I find web browsers and mobile devices it doesn't work on at all. What ...
0
votes
0answers
123 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 ...
0
votes
0answers
14 views

User experience on mobile for Canvas set to HD rsolution

i got about 25 years of software dev experience on my shoulders but i am just getting my feet wet about game development. i got few pre-made game engines from a market place and i am enhancing the ...
3
votes
1answer
4k views

How can I use vibration of an iPhone for my HTML / Javascript game?

I'm building a web game. I'm trying to use the iPhone's vibration functionality. How would I go about doing this seeing I want to package and deploy this game to the App Store. Is there a secured way ...
0
votes
2answers
349 views

How to Structure my Database for a HTML turn-based strategy game?

I'm making simple HTML socket game that I want to record over time. It's a "risk" type game where individual tiles can be conquered, and the team with the most tiles is winning. As of right now, I'...
0
votes
1answer
98 views

HTML5 Multiplayer movement

I'm making a 2d multiplayer html5 game that needs client-side movement, collision etc. Client sends active cursors to the server (w,a,s,d), server updates cursors on all clients and clients handles ...
5
votes
1answer
139 views

Security concerns related to HTML 5 games

I would like to know if people could modify an HTML 5 game's code to harm either the server or other players whom visit the page. More specifically, whether someone could modify a simple game that ...
0
votes
1answer
17 views

How to make the image move forward properly when rotated in my HTML5 game?

I am just trying to make a simple 2D racing game using canvas. It uses the W,S,A, D keys to move the car. The W key should take me forward and the A and D keys will turn each way. I want the car to ...
1
vote
1answer
64 views
1
vote
1answer
69 views

requestAnimationFrame handles game ticks weird when tab isn't viewed

So i have the game logic and render in the callback for requestAnimationFrame, and somehow the ticks run very weird. In fact, the rendering happens alright. But the ticks seem to skip an ...
0
votes
0answers
394 views

How to make the car move in my path in canvas

I have developed a game where currently I move a car towards a human in a diagonal path.Now I wanted the car to follow a route.So I followed some tutorials on pathfinding.So my initial step is to ...