0
Not smart, how do you do movement in JS Game dev?
Can I have like basic sample code? I am not smart
2 Respuestas
+ 2
I regularly use an explicit Euler integration scheme
position += velocity * time
The 1D solution has been provided by Mihaly
+ 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