Questions tagged [html5]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
36 views

How to make sure that I get the same result in a multiplayer game if the server is not authoritative?

I am making a simple 2 player browser game, where there's a rotating entity which jumps from one square to another on mouse click. Server is on NodeJS. To determine which square to jump into, I used ...
0
votes
1answer
75 views

How to rotate an image around its center point in a JavaScript canvas?

I have this function to get the rotation angle from my sprite and a target: ...
0
votes
0answers
5 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 .html file, then if i set ...
0
votes
1answer
41 views

Tween a pop-up containing several buttons

I am developing a small game with Phaser 3. I want to make a container with several buttons, representing a pop-up dialog. The container needs to pop up on completing a task. When container pops up, I ...
0
votes
0answers
16 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?
1
vote
0answers
51 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-...
0
votes
0answers
57 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 ...
0
votes
0answers
38 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
1answer
38 views

How do I add a roof to a Html Game

I kind of new to making games been doing it for a few months and want to make games in a browser so I took the w3schools game example and I'm trying to add on to the game until I make a recreation of ...
0
votes
0answers
25 views

Customizing Unity WebGL index.html

Hey everyone just some css and styling tips needed! i want to use a game as a 404 page. so i would need on top to be either text or a contact form then some spacing and then the actual game window. ...
0
votes
0answers
19 views

Discrepancy in Box2D Flash applied impulse

I have two clients. Player A, and Player B. What Player B sees in his screen is a mirrored version of what Player A sees. This is a carrom game, hence the mirroring. Does anyone know why even if I ...
0
votes
1answer
68 views

Timers: check in game loop, or run independently?

Specifically talking in the context of JavaScript game development. For example, I can use the language specific timeout mechanism: ...
0
votes
1answer
218 views

How can I turn a Unity game into an MRAID-compliant playable ad?

I need to create a mini-game, one really simple scene, and export it as a playable that comply with the MRAID requirements. Basically, I can export a WebGL. The question is which adaptations the code ...
0
votes
1answer
79 views

How can I load assets dynamically on user's input in LibGDX HTML?

I am working with LibGDX and GWT and I am trying to publish my app as a HTML webapp, it has many assets with around hundred of folders, now I want to load them dynamically (user input is sent to JSNI, ...
0
votes
1answer
127 views

Why does my godot game not take input in the browser?

My game works perfectly fine in godot and as a widows executable but when exported to html5, I can't move my character. The game is publicly available at https://ashir-rashid.itch.io/export-experiment ...
1
vote
1answer
54 views

In regards to real time turn based games, where should the turn handler be?

I'm currently developing a pool-like browser game. I'm stuck on where should I handle the turn changing, timer, etc. Currently, turn timer (i.e. 15 seconds left to do action, then turn will change) is ...
1
vote
1answer
261 views

My HTML Canvas went blank

I tried to draw Mario Sprites in my HTML Canvas, but it always went blank. Anybody knows why? ...
0
votes
1answer
35 views

I can't clear the paint image in my Canvas

I'm trying to make the Mario move, but somehow it leaves traces behind, can anybody help??? ...
0
votes
0answers
207 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....
0
votes
1answer
84 views

Web Game Security - AntiBot

I'm going to develop a real-time browser game using NodeJS in backend for a fast WebSocket, but I'll both prevent bots and other cheats, so my frontend JS might be very advanced. I'm experienced with ...
2
votes
1answer
164 views

How can I convert an html5 web game to an android app?

I have already made an html5 game and it is in service. I want to service this at Android app too. I know little about Java or Kotlin, so I think the least risky way is to use a webview. There is ...
2
votes
1answer
42 views

Procedural vs Event Driven Paradigm Clash in HTML5

I've been writing some console-based games in python and got in the habit of having a "mainloop" that looks something like this (if it were ...
0
votes
1answer
104 views

How to get the address of a nearby square on a chess board?

I'm making a chess game from scratch and I got stuck. So far I have all my figures placed, I have the positions set, I've already done the collision detection and everything. When I click the figure ...
2
votes
0answers
24 views

Javascript: Eventlistener 'keydown' not registering all keys pressed when holding down other keys [duplicate]

Sollution provided in the comments. The issue is that my keyboard has what is called ghosting issues, this means it doesn't support some key combinations when pressed together. When the user holds 's'...
1
vote
0answers
222 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 ...
0
votes
0answers
47 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
vote
1answer
306 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 ...
0
votes
0answers
47 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
0answers
395 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 (...
1
vote
1answer
74 views

Using a setTimeout to Jump

I am trying to make a jump function. I am making a game in html5 canvas with Javascript. I have gotten the player to move. When making the jump function I decided to use a timeout to reverse the ...
1
vote
2answers
97 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: ...
0
votes
2answers
478 views

How to get projectile direction vector in a 2d grid?

I am having trouble figuring out how to trace the path of my projectiles in an Asteroids clone. Currently the ship is locked to the center of the screen and can be rotated a full 360 degrees. I know ...
3
votes
1answer
426 views

How do I rotate individual shapes on an html5 canvas?

So I am doing a basic Asteroids clone as an intro to HTML5 canvas. I want to be able to rotate the main player while leaving the other objects on screen alone. Currently I am using transform and ...
0
votes
0answers
108 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 ...
0
votes
0answers
158 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 ...
2
votes
2answers
1k views

How to Play YouTube Videos Within Asset Store for Unity

On every computer I've ever tried to use Unity, the Asset Store seems incapable of showing the YouTube video previews of assets. It always claims my "browser" does not currently recognize any of the ...
0
votes
1answer
98 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
63 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*...
0
votes
1answer
59 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 ...
1
vote
1answer
92 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
2k 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
893 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
406 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. ...
4
votes
2answers
138 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
271 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 ...
4
votes
2answers
54k 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
98 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
2k views

Javascript-How to create a moving bullet animation from canvas

the bullet cant see to move at all ...
1
vote
3answers
355 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
286 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
2 3 4 5
11