Questions tagged [javascript]
"JavaScript (sometimes abbreviated JS) is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles." From Wikipedia. http://en.wikipedia.org/wiki/JavaScript
1,432 questions
0
votes
0
answers
53
views
LootJS/Forge GLM injecting items fails due to mod-internal overwrite (Apocalypse Now/Lost Cities)
I am trying to have modded items in the chests of lost cites mod, and there is this problem I am facing, in which a mod called Apocalypse Now automatically injects its mod items into the chests ...
1
vote
0
answers
120
views
How to port web-based video game to other consoles?
I'm rather new to video game development, as I have only released one indie game on the web. Every time I have demonstrated the game at a public event, it has always received some kind of reception. ...
0
votes
0
answers
30
views
Toxiclibs softbody physics issue with jittering under weight
hopefully this is alright to post here. I'm learning to code and working on a thing (actually trying to reproduce this https://www.instagram.com/juhani.halkomaki/reel/DGFpqfCNgZe/ )
I have created a ...
0
votes
1
answer
72
views
Gap showing between canvas element and div container
I am fleshing out a small desktop game that will be HTML5-based.
Grid zone 3 uses one canvas element, and that is placed correctly without any visible gaps between the edge of the canvas and the ...
0
votes
0
answers
47
views
Is it common/advisable to deploy a game using HTML for the frontend but also provide a backend native?
As a proof of concept I'd like to create the UI of a boardgame using SVG and HTML, so I can deploy it in desktop through Electron, mobile using Cordova and also hosting it in a website.
I also have ...
1
vote
2
answers
916
views
How to port a JavaScript game to Nintendo Switch and PlayStation 5?
I'm looking to port a JS web game to console (Nintendo Switch and PlayStation 5). With the WiiU, it had native HTML5 support.
These are my current solutions:
Built-in browser: Currently, the only way ...
4
votes
1
answer
594
views
The button indexes are different between two controllers. Is there a work around?
I found that when you connect a controller, the buttons have a code. When I run console.log(navigator.getGamepads()[0].buttons), the A button on a Nintendo Switch ...
0
votes
1
answer
158
views
How to make objects appear on the map at a certain distance based on scale?
Mode7 - Sprites on Screen / Pseudo 3D
Scale x1:
Scale x16:
I'm trying to recreate this system with JAVASCRIPT:
https://github.com/vinibiavatti1/Mode7/blob/master/src/mode7/FlatModeSeven.java
The ...
0
votes
0
answers
72
views
How to "cancel" a promise to make my fighting system work
I'm making a very basic clickable combat game with HTML and JavaScript. In the battles, the user starts the round, attacks, and then the enemies attack one by one.
On the player's turn, the user has ...
1
vote
1
answer
89
views
2D Square Collision Correction issue detecting which direction
I've just started getting into 2D game development and have been experimenting with some 2D collision and correction logic in canvas. I'm trying to debug this block of code and understand why it is ...
0
votes
0
answers
61
views
Using NFC without using NDEFReader
I am trying to build a Amiibo read-only game support for my phone, but the NDEFReaader is only supported in two different browsers that I don't and can't have. MDN Doc page.
So my question is how can ...
0
votes
0
answers
96
views
How to add an HTML + CSS overlay to a DirectX app?
I'm looking for a way to render html and css elements within an executable as an overlay.
There are programs today made in electron such as Blitz or even the best known Discord. They do overlay within ...
1
vote
1
answer
387
views
Is there a way to read data from an amiibo?
Just for the fun of it, is there a way I read (not write) data from an amiibo? I think it would be cool if I could make a mini-game that summons Mario if I put a Mario amiibo. Also, I know I shouldn't ...
0
votes
1
answer
99
views
Should tiles from a tileset atlas be separated into individual images when the program loads?
I load a large tileset image in at the start of my program.
To draw the game world, I loop over a 2D array of tile IDs and based on that ID I cut out a 16x16 portion from the tileset and draw that as ...
1
vote
1
answer
290
views
Fixed timestep without cloning game state
I'm doing a JS game with hundreds of moving physical particles.
I've read the famous "fix your timestep" article. So far I've implemented basic prototype with janky game loop tied to FPS and ...