I have a 2d, top-down game, where there are 2 players; one is controlled by the arrow keys, and the other one is controlled by the WASD keys. I want to make it to where when the 2 players overlap, I can make it to where it stops the program, or I can print something in the console, something like
Tag: game-development
Detect multiple keypresses and trigger an action once in p5.js
I want the user to be able to press a+d once and my game should increase the score, not hold it to increase score, similar to when pressing a+d causes a special effect to occur in a game. This code did not work so I didn’t bother to call it fail attempts test. This is my first failing attempt: This
Moving the character a few tiles more seems to cause the whole scene (the physics world) to shake, why is that? How do I fix it?
Here is the example code from phaser3 tutorial. Per the tutorial, there are 2 scenes, one for the world map and the other for the battle. I doubt if the code above implement the battle scene. I assume the scene in question is the world scene. Moving (with arrow keys) the character one or two steps/tiles works well. Keep moving
GAME_WIDTH, GAME_HEIGHT and gameWidth, gameHeight
I am learning how to make games with Vanilla JS. The instructor is using GAME_WIDTH, GAME_HEIGHT at the index.js; and gameWidth, gameHeight at the paddle.js. When he uses the latter, I see that there is an explanation pop-up near the latter one saying that it is considered GAME_WIDTH, GAME_HEIGHT when he hovers over gameWidth, gameHeight. But when I try to