Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >

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

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

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 ...
ActionBotYT's user avatar
1 vote
0 answers
122 views

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. ...
Azariah Easey's user avatar
0 votes
0 answers
30 views

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 ...
spaciousmind's user avatar
0 votes
1 answer
72 views

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 ...
Eric Marceau's user avatar
0 votes
0 answers
47 views

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 ...
tonicebrian's user avatar
1 vote
2 answers
940 views

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 ...
LJones's user avatar
  • 23
4 votes
1 answer
595 views

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 ...
Alex's user avatar
  • 177
0 votes
1 answer
158 views

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 ...
RpgBoss's user avatar
  • 111
0 votes
0 answers
72 views

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 ...
Salvador Di Sabatto Fund's user avatar
1 vote
1 answer
89 views

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 ...
Jacob Goldstein's user avatar
0 votes
0 answers
61 views

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 ...
Alex's user avatar
  • 177
0 votes
0 answers
97 views

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 ...
robert's user avatar
  • 1
1 vote
1 answer
392 views

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 ...
Alex's user avatar
  • 177
0 votes
1 answer
99 views

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 ...
ChocolateCyanide's user avatar
1 vote
1 answer
291 views

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 ...
Fen1kz's user avatar
  • 195
0 votes
1 answer
74 views

I'm working on expanding on the tutorial found here I currently am creating two classes based off of menu ...
Legen Diary's user avatar
0 votes
0 answers
108 views

I am creating a 2D game in javascript using pure DOM, on my computer and on my cell phone WebGL or OpenGL do not work. How can I create Lights and shadows effects using Line Of Sight, for example, I ...
Haruki Hotarou's user avatar
1 vote
0 answers
184 views

I've been building a turn-based style RPG in Typescript based upon this ROT-JS Tutorial. For the most part it's fairly clear and I have a handle on everything, except I've begun building out a ...
Joel's user avatar
  • 11
0 votes
0 answers
108 views

I have a problem when creating a texture with WebGL. The thing that I do not understand is that the first call with texSubImage2D with a canvas leads to the ...
hoangphatmonter's user avatar
0 votes
1 answer
149 views

I am currently creating an environment to train aim-bot AI's for my game. It is a 2d world made of complex polygons, and the goal is to have the AI's shoot ricocheting bullets. Using a ray-casting ...
Beluker's user avatar
0 votes
0 answers
66 views

I'm a little confused on when it's needed to bring in Mongo or MySQL in a web browser multiplayer card game. Here's my plan so far: I'm using React, Node.js, Express, and Socket.io. I'm having the ...
chung's user avatar
  • 101
1 vote
3 answers
258 views

I'm facing an issue while trying to identify the two most extreme vertices of an object in my 2D game using JavaScript. The goal is to determine where I should create a trapezoid to simulate the ...
Mark Vaaz's user avatar
0 votes
1 answer
180 views

Task: to develop a function that efficiently places rectangular blocks in rectangular 2D container. The location of the blocks in the container should be as dense as possible in order to rationally ...
Назар Саханда's user avatar
0 votes
0 answers
145 views

I could use triangles (make them using trigonometry). But the circle I want is small, only 20px diameter. I could also load a model but I need a quick solution. Is there an easy method to draw a small ...
Praveen Kumar's user avatar
0 votes
1 answer
76 views

I used this to help create a 3d cylindrical mesh that wraps around any y = f(x). Each vertex is calculated by a point P: ...
Emre Tekmen's user avatar
0 votes
0 answers
169 views

I have a small image (30x30 px) I want to use as a sprite on a Javascript screen to show students what Javascript can do. (They want to create games.) How do I link the image file to my Javascript ...
Jonathan Titus's user avatar
2 votes
1 answer
337 views

I'm trying to write a WGSL structs parser (sort of webgpu-utils thing). In order to better understand the memory layout, I'm using wgsl offset computer as a helper. Having the next struct: ...
Michael Sazonov's user avatar
21 votes
2 answers
8k views

I'm new in Game development and probably this is a silly question. I had a look online but haven't found a clear answer, I did it bit quick but enough to evaluate that this is a confusing topic ...
Federico Baù's user avatar
-4 votes
1 answer
130 views

I have just started on a new short game and i am trying to figure out how to make a reward when i reach a certain value I expect that the counter starts at zero, and each time the button is clicked it ...
David Humphrey's user avatar
1 vote
1 answer
207 views

I am a new coder and im trying to learn html. i have started working on a clicker game but im trying to figure out how to give a reward when my total clicks var has reached a certain value. the reward ...
David Humphrey's user avatar
0 votes
1 answer
139 views

I have a Node.js game that sends update packets to players every 30ms. The code I currently use works this way: Get the entities within each player's vision. Create a temporary object that stores ...
hmmmm's user avatar
  • 1
1 vote
0 answers
153 views

Is there a way to set the pivot point for rotating a sprite? The default option seems to be arbitrarily chosen point on the sprite or the mid point. ...
Naveen's user avatar
  • 111
0 votes
1 answer
246 views

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
1 answer
111 views

I am going to be completely honest, this is not 100% about storing a game state in Javascript's localStorage, it is more to do with a utility program storing statistics. Since it can be related to ...
Rewind's user avatar
  • 113
0 votes
1 answer
353 views

I am currently working on a basic HTML, CSS, and JavaScript game as a freshman high school summer project. I am currently trying to implement separating axis theorem (I spent a lot of time learning ...
Yash-902's user avatar
1 vote
1 answer
224 views

Game Genie was a tool for the NES that allowed users to input codes that were able to drastically able to change the mechanics of a game by getting CPU reads and replacing the game's response with its ...
Jake Miahn's user avatar
2 votes
1 answer
214 views

Just for fun, I had been attempting to build a model cube in vanilla JS that can be moved and/or rotated. What I was going for was the simplest possible representation (so, no adjusting for ...
Quack E. Duck's user avatar
0 votes
0 answers
84 views

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
10 votes
2 answers
4k views

I am trying to remake Super Mario Bros. in JavaScript and I am trying to figure out if there is a more efficient way to create and store the level data. I have created 1-1 and here's what the code ...
Jake Miahn's user avatar
1 vote
1 answer
1k views

Do I have to know how to code in JavaScript to make good games in RPG Maker MZ? I'm asking cause I know you don't really have to code in RPG Maker. I already tried some programming languages, so I ...
Inerzja's user avatar
  • 11
1 vote
0 answers
239 views

I have made a test sketch of collision avoidance using javascript, as you can see right here. I want the vehicle to move to the clicked location, avoiding obstacles on the way. It is working, but not ...
Ricardinho's user avatar
1 vote
1 answer
258 views

First off I must admit I'm really not good at math and am trying to learn but have had a hard time finding examples someone like myself can follow. I'm trying to figure out how to draw and calculate ...
cluelessgamedev's user avatar
0 votes
0 answers
139 views

I am using Lens Studio to build an AR effect and trying to use the position of the hand tracker fingertip to make a cube rotate. For example, as I move my finger on the x-axis the cube rotates in the ...
Harry's user avatar
  • 141
1 vote
2 answers
389 views

I would like to develop a simple and small game for WebXR so that Quest, Index, etc. can play it. I would eventually like to be able to put it on the Quest store and Steam. Is there a way to publish a ...
Imperial A's user avatar
0 votes
1 answer
75 views

Hi There this is my first Post on gamedev, and i hope everyone understand what i want :) First of all my Code is an very Personal Version from one Github Isometric Map. I Tryd now 2 Days to Add the ...
Tobias B.'s user avatar
1 vote
1 answer
95 views

I'm making 2d Mobile game using JavaScript. I have method that controls every character (Dumb AI) on battleground. It using recursion to call another action. I want to add debuff system and had little ...
Jakub Dobrzeniecki's user avatar
0 votes
1 answer
93 views

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
39 views

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
0 votes
1 answer
1k views

I can't understand how to work with .jslib files. I don't understand the syntax of this type of file. Also I couldn't find any easy explanation of it The problem ...
EzioMercer's user avatar
0 votes
1 answer
426 views

I'm in the process of creating a game using electron and HTML5. It's going to be a pretty basic story-based platformer, but I'm ...
Blue Herring's user avatar

1
2 3 4 5
29