All Questions
Tagged with movement javascript
30 questions
0
votes
1
answer
87
views
JS 2D top down movement doesn't act as expected
I realise this is very similar to other 2D movement questions already posted but cant find a solution that fits the behaviour I'm looking for, so I'm posting in the hope that someone more ...
0
votes
1
answer
101
views
How to design a system that allows for custom equations of movement?
I'm developing a top-down shooter and I currently have a PhysicsSystem which operates on TransformComponents. Basically, it ...
0
votes
1
answer
333
views
Is speed and direction generally combined into one vector, or separated into two?
Couldn't find this answered already, surprisingly.
For example, for a game (in my case a 2D top-down one), there could be advantages to doing so. For example, whenever you want to change an entity's ...
1
vote
1
answer
187
views
Javascript snake game, configurable section distance
I want to make a snake game.
In a classic game the snake moves in 4 directions, I want the player to move in all directions by mouse input, similar to slither.io
Right now the tail section changes ...
1
vote
0
answers
247
views
Junk movement with steady 60fps on Web canvas
I'm new to building games on canvas, and I'm trying to create one. But I encountered a problem with sprite movements. My sprites move is smooth, but sometimes it starts to "jump". FPS is stable 60 ...
3
votes
3
answers
147
views
TypeScript Space Shooter movement
I'm trying to create a simple space shooter game using typescript and i've got kind of stuck at checking the movement.The thing is that if i only press one
key it works fine but if i press 2 keys at ...
1
vote
1
answer
515
views
Character Movement - Canvas Character - Javascript
How do I change the arrowkey movement so that is based off of the click of the buttons instead?
Cheers
...
0
votes
2
answers
8k
views
Diagonal movement is faster than horizontal or vertical movement. How to fix?
When using Horizontal or Vertical input keys, the the movement is normal. But when trying to move diagonal, multiple keys are to be pressed, and the speed just stacks up.
Yes there are many answers ...
1
vote
1
answer
202
views
javascript game character mouse movement
When a mouse button is pressed, coordinates are stored and character begins to move towards that point.
I do a check each frame if my character reached the destination, but because of the nature of ...
0
votes
1
answer
1k
views
How can I make my movement continuous?
I'm making a game with simple movement code. I don't want the movement to be too complex since it's going to be a small game once it's done.
Right now the character moves 10 units at a time, then ...
3
votes
1
answer
150
views
Particles to Denote Movement in Space
I'm currently working on a WebGL project to realise an idea I've had for some years. On my desk is book on making a space sim written 15 years ago.
There I found some algorithm for particles in space....
2
votes
1
answer
1k
views
Architecture for game character movements with user input and a finite state machine
I have a JavaScript canvas game setup using Phaser framework. When I first made my character able to run, jump, and crouch, I used lots of if/else conditions and ended up with an ugly, buggy mess. I ...
1
vote
0
answers
320
views
Collision detection for multiplayer game with MatterJS
We are developing JavaScript multiplayer top down game where characters can move freely and collide with each other. We are rather weak at mathematics and physics, luckily we don't need much, just ...
2
votes
3
answers
1k
views
How do I correctly make character sprite direction match player inputs?
In my top down game I can move the character around and the character will even face the direction he is moving.
However, there is some weird behavior I'm having: when you hold down one direction and ...
1
vote
1
answer
370
views
svg spaceship game movement 2d
I've been searching for a way to make an svg box move to all directions using js. I have seen many tutorials on how to do it grid like, but I want it so have a square that can turn, move forward, ...