mysterious bouncing umlauts
Posted: Sat Apr 25, 2009 12:51 am
Hello masses. Making a first post to (somewhat predictably) ask some noob physics questions.
First I should say I'm amazed at how easy love is to use. I'm someone who's failed gloriously on every attempt to learn a language more complex than javascript, and in less than 3 days poking around with love I have something recognizably game-like.Which I've attached. It has Gravity! It has Collisions! It has Umlauts! What more could you ask? Up, Left, and Right are the only inputs. Sadly the tutorials seem to end before physics so on to the noob questions:
You'll notice it bounces. This is on purpose. Mysteriously though it doesn't lose any energy doing so, and bounces forever. I don't fully understand the collision function yet but is there a way to make it react more realistically?
On a related note, if I drag the window up or down while it's bouncing, it occasionally either teleports the character into the air or superbounces it (it's hard to tell). Also mysterious.
Increasing my impulseModifier variable increases the speed, but only up to a point. Nothing I've been able to do will make the character move faster than he is now. Mass and Inertia also only affect it to a certain point. Made all the more frustrating by the fact that it's moving almost fast enough for my liking.
Also, if anyone feels like poking around the code (it's small!), could you tell me if anything is redundant/inefficient/ugly? It would be nice to not develop bad habits right away. Sorry about the question barrage . Any help or links to help is appreciated .
First I should say I'm amazed at how easy love is to use. I'm someone who's failed gloriously on every attempt to learn a language more complex than javascript, and in less than 3 days poking around with love I have something recognizably game-like.Which I've attached. It has Gravity! It has Collisions! It has Umlauts! What more could you ask? Up, Left, and Right are the only inputs. Sadly the tutorials seem to end before physics so on to the noob questions:
You'll notice it bounces. This is on purpose. Mysteriously though it doesn't lose any energy doing so, and bounces forever. I don't fully understand the collision function yet but is there a way to make it react more realistically?
On a related note, if I drag the window up or down while it's bouncing, it occasionally either teleports the character into the air or superbounces it (it's hard to tell). Also mysterious.
Increasing my impulseModifier variable increases the speed, but only up to a point. Nothing I've been able to do will make the character move faster than he is now. Mass and Inertia also only affect it to a certain point. Made all the more frustrating by the fact that it's moving almost fast enough for my liking.
Also, if anyone feels like poking around the code (it's small!), could you tell me if anything is redundant/inefficient/ugly? It would be nice to not develop bad habits right away. Sorry about the question barrage . Any help or links to help is appreciated .