0

Not smart, how do you do movement in JS Game dev?

Can I have like basic sample code? I am not smart

12th Jan 2025, 6:36 PM
MGMPlaysYT
2 Respuestas
+ 2
I regularly use an explicit Euler integration scheme position += velocity * time The 1D solution has been provided by Mihaly
12th Jan 2025, 9:28 PM
RuntimeTerror
RuntimeTerror - avatar
+ 1
it depends on which movement: X axis, Y axis x+=1 or x = x + 1 x-=1 or x = x - 1 y+=1 or y = y + 1 y-=1 or y = y - 1
12th Jan 2025, 7:50 PM
Mihaly Nyilas
Mihaly Nyilas - avatar