Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
158 views

Controlling Input Handling in Turn-Based Game

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

Handling "nested" user actions in client/server card game

I'm developing a card game in JavaScript in a functional programming style and I'm unsure what is the best way to implement the flow of player actions that require other player actions for their ...
Thiatt's user avatar
  • 101
0 votes
1 answer
842 views

Detect how much mouse has rotated in a circle around an XY point

How can I detect if the mouse cursor is moving in a circle around a target, and calculate how many turns it's done? For example, if I rotate the mouse 4 times around a specific XY point on the screen, ...
jon's user avatar
  • 103
1 vote
0 answers
782 views

Detecting keys presses between keyboard layouts, operating systems and javascript

I've recently encountered a few headaches when I tried to detect key presses for a custom game engine to supports Windows, MacOS, Linux, and WebGL. Naive approach: At first I naively thought that ...
FanManPro's user avatar
  • 131
2 votes
1 answer
269 views

Keyboard input conflict in wall jump

I'm trying to make a Megaman-style wall jump in my 2D platform game with JavaScript. The character can do A,B,C motions when it sticks the wall: My problem is that when I trying to jump off the wall(...
undefined000's user avatar
3 votes
1 answer
442 views

How to handle complex inputs in 2D platform game?

I am trying to add keyboard control for my character in 2D platform game with JavaScript. The character can walk, dash and jump. Here is my current code: ...
undefined000's user avatar
1 vote
1 answer
906 views

How to handle keyup events in game loop?

I'm writing a simple game in JavaScript, which already handles basic keyboard input like so: ...
Marco Bolis's user avatar
3 votes
2 answers
1k views

Handling input through callbacks or through game loop?

I've tried to figure out how to handle player input properly, but without luck so far. As far as I have figured out, I can either: Call the respective methods directly through the callback fired ...
Tc_'s user avatar
  • 143
1 vote
0 answers
118 views

How to disable touch in Quintus?

I'm trying to build card game using the Quintus game engine. I have objects called Card. I can touch and drag it in the screen but I want just to touch and drag it ...
Fadi's user avatar
  • 111
0 votes
1 answer
618 views

Press multiple switches to unlock the door

I made 2 scripts, one that is a switcher and one that checks if object is switched (Switch, SwitchCheck). Switch script (it's on 2 objects that are switches and both objects have colliders with ...
Samurai Fox's user avatar
4 votes
1 answer
3k views

Unity MouseWheel weapon change

I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see. I googled on how to do this and found that I have to use ...
BallzOfSteel's user avatar
6 votes
3 answers
2k views

multi touch on HTML5 with JavaScript?

How action game controls should be implemented so that they would work on smart phones as well? At the moment I use wasd/arrow keys and I am able to handle for example two keys down at the same time. ...
Petteri H's user avatar
  • 1,743