Smooth movement. (SOLVED)
Posted: Fri Apr 12, 2013 4:40 am
My first post!
I have been learning LÖVE through sockmunkeedev's tutorials, but sometimes the "narrator" or "tutor" (don't know what term I should use) tells the audience to look up things he can't explain.
I've got some programming experience with javascript (Made rock, paper, scissor, lizard, Spock with vannila JavaScript )
Now, this is the video that stumped me. Note I had only seen the basic tutorials before this one:
[youtube]http://www.youtube.com/watch?v=zCAYHKYDPr8[/youtube]
I was able to write the code for x and y axes, but i didn't understand a lot that was going on. Why was 50 speed suddenly so fast? wahat the hay did this line mean?
and How did it actually work? I understood that you raised velocity so it accelerated, but it didn't quite click.
Help?
Also, if I'm breaking any forum rules with this post, I am terribly sorry
I have been learning LÖVE through sockmunkeedev's tutorials, but sometimes the "narrator" or "tutor" (don't know what term I should use) tells the audience to look up things he can't explain.
I've got some programming experience with javascript (Made rock, paper, scissor, lizard, Spock with vannila JavaScript )
Now, this is the video that stumped me. Note I had only seen the basic tutorials before this one:
[youtube]http://www.youtube.com/watch?v=zCAYHKYDPr8[/youtube]
I was able to write the code for x and y axes, but i didn't understand a lot that was going on. Why was 50 speed suddenly so fast? wahat the hay did this line mean?
Code: Select all
player.xvel = player.xvel * (1 - math.min(dt*player.friction, 1))
Help?
Also, if I'm breaking any forum rules with this post, I am terribly sorry