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
0 answers
18 views

How to use elapsed time to code a function to manipulate DOM

I'm a new software engineering student. I have a problem that I can't seem to get my head around. I am currently making a basic rhythm game like Guitar Hero using HTML, CSS, and JavaScript. I managed ...
8bitNostalgia's user avatar
0 votes
1 answer
101 views

Camera movement with player

I'm developing a game using the html5 canvas, but I've never used it before and I'm having difficulty creating a camera. The intention is that it is the same as agar.io, where the player is centered ...
Jhon's user avatar
  • 1
0 votes
0 answers
97 views

Google Ads in HTML5 Godot 4 game that is embedded Electron chromium browser and that runs on localhost http server

Hi Google Ads shows ads on domain not localhost. But my game that is embedded in Electron browser and runs on htpp server on loaclhost (local html file). I want to show ads from localhost server. But ...
1 JustOnly 1's user avatar
0 votes
0 answers
54 views

I'm experiencing mesh pop-in on Godot 4.0.3 web export; how do I fix this?

I'm working on a game jam using Godot 4.0.3, and I'm intending to export to HTML5. The game works perfectly on native, but on a browser, meshes tend to pop-in when they're closer to the player than I ...
Michael Macha's user avatar
0 votes
0 answers
56 views

Why my game is rejected by Crazy Games? [duplicate]

I crated this game: https://muhomorgames.itch.io/bean-legacy I uploaded it on crazy games I hane no idea why it's been rejected can anyone help me?
frod wii's user avatar
0 votes
0 answers
52 views

Handle roads following in a javascript game

In a browser game made in HTML5/Javascript, I would like to handle the move of units in real-time. But units would have to follow some predefined roads... Canvas seems better than svg to handle ...
Charles Dexter Ward's user avatar
0 votes
2 answers
167 views

What is the best way to store level data in HTML5

I am currently making a game in HTML5 using canvas, and it is currently just 1 js script and HTML file with references to png files for assets. Right now, I have the level data baked into the script, ...
Stormzy18's user avatar
0 votes
1 answer
49 views

Semi transparent objects show fuzzy halos when in shadow

I'm having some issues when drawing a semi transparent object after an opaque object, and the object is in the shadows. On the left, the torch is rendered just fine, I can see a nice blend of the ...
jucarave's user avatar
0 votes
1 answer
38 views

Why is this code keeping the listener which should be removed instead?

I am having some issues figuring out why this code still lets btn_1 call the function setstate3(). There is a function ...
subtlefly's user avatar
0 votes
1 answer
18 views

why does my button lose the changed cursor and mouseover behaviour as soon as I attach a class to my file?

Using adobe animate cc - exporting to HTML5 and coding in JS (or at least trying to) If I just hit cntrl+enter in adobe animate the button works as expected. If I run the app from a web server using ...
subtlefly's user avatar
1 vote
1 answer
490 views

How can I protect against a cheater changing variables on the client?

I built a multiplayer fighting game with impactjs, socket.io and nodejs and faced with "change variables hack" (I want to call it like this). All my current logic with jump, running, shoot ...
李白 puer's user avatar
0 votes
1 answer
210 views

Invisible sprites with requestAnimationFrame

I'm trying to animate a sprite sheet. I have a single image, and multiple objects of the same type but drawn at different locations on the canvas. What I'm trying to do is have each object move with ...
xquilt's user avatar
  • 3
6 votes
2 answers
2k views

What to do when my game is rejected by CrazyGames?

Every time I try to upload a scratch game to CrazyGames, it won't let me upload it. I start the upload and I wait 30 minutes to 2 hours and it just says "rejected" — I don't know why. If ...
Zeke Robo's user avatar
0 votes
1 answer
1k 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: ...
Pavul Zavala's user avatar
0 votes
1 answer
65 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 ...
Pavul Zavala's user avatar
0 votes
1 answer
230 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 ...
bhagya's user avatar
  • 11
0 votes
0 answers
27 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?
Coder2195's user avatar
  • 123
1 vote
0 answers
688 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-...
Coder2195's user avatar
  • 123
0 votes
0 answers
307 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 ...
Tosh's user avatar
  • 1
0 votes
1 answer
190 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 ...
Giuca002's user avatar
0 votes
1 answer
74 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 ...
Giuca002's user avatar
0 votes
1 answer
181 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: ...
Adam Arthur's user avatar
0 votes
1 answer
1k 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 ...
omer simchoni's user avatar
0 votes
1 answer
212 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, ...
Maren Podarm's user avatar
0 votes
1 answer
491 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 ...
ashir's user avatar
  • 31
1 vote
1 answer
91 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 ...
Ardi's user avatar
  • 15
1 vote
1 answer
878 views

My HTML Canvas went blank

I tried to draw Mario Sprites in my HTML Canvas, but it always went blank. Anybody knows why? ...
stanley355's user avatar
0 votes
1 answer
313 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??? ...
stanley355's user avatar
0 votes
0 answers
846 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....
vsys's user avatar
  • 1
0 votes
1 answer
203 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 ...
Lasse Brustad's user avatar
2 votes
1 answer
566 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 ...
msm082919's user avatar
  • 161
2 votes
1 answer
71 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 ...
Robin Andrews's user avatar
0 votes
1 answer
195 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 ...
Chrissisbeast's user avatar
2 votes
0 answers
29 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'...
Dennis's user avatar
  • 411
1 vote
0 answers
406 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 ...
DominoDev's user avatar
  • 126
0 votes
0 answers
59 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 ...
Al.'s user avatar
  • 1
1 vote
1 answer
789 views

Help solving Uncaught Abort on HTML5 Build [closed]

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 ...
ClaudioA's user avatar
  • 145
0 votes
0 answers
100 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 ...
viraj chavda's user avatar
0 votes
0 answers
821 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 (...
Jason Schayer's user avatar
1 vote
1 answer
193 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 ...
JS_noob's user avatar
  • 13
1 vote
2 answers
136 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: ...
Dustin's user avatar
  • 11
0 votes
2 answers
1k 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 ...
JParrilla's user avatar
  • 193
3 votes
1 answer
1k 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 ...
JParrilla's user avatar
  • 193
0 votes
0 answers
215 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 ...
user3871's user avatar
  • 1,055
0 votes
0 answers
295 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 ...
Marcello Silva's user avatar
2 votes
3 answers
2k 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 ...
CodeMonkey's user avatar
0 votes
1 answer
214 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 ...
user avatar
1 vote
1 answer
100 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*...
Captain Dando's user avatar
0 votes
1 answer
221 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 ...
Jon Potts's user avatar
1 vote
1 answer
103 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 ...
CMDR_Garbage's user avatar

1
2 3 4 5
11