That's where the computation starts to get hairy...
The skier's movements are a combination of two:
- translation forward and sideways, with the scene moving the opposite way;
- rotation of the skier in the direction they are moving, which turns the whole scene correspondingly.
Your work approximates the whole thing very cleverly. I'm simplifying the problem by deciding that - the skier never turns, they glide sideways, crab-like. In reality, a skier turns to face left when they glide right, and vice versa - an interesting combination!
This version hasn't got the Math completely right, I kept your "change x by 3.2" trick, that's why it feels like objects in the distance are moving sideways faster than they should, and faster than objects close up (when I play it, it makes me dizzy).
If you want the Math of translation in 3D, look up my bouncing ball in a room. I've scribbled the trig. for rotation of the skier's body and scene, but I haven't tried it on anything yet. Yours is an ideal example to try it on.
use the arrow keys and watch out for special surprises.
Special keywords will appear when your score gets higher. Put the keywords on the site to show you're first to get the score.
ENJOY!
PS. Thanks to dolfuss555 for the original of this lovely game. This version is just a little more responsive. I've cleaned up the working out of layers, made a background to enhance the illusion and turned off turning sideways in mid-air :-)
Comments
You need to be logged in to post comments
Add a Comment
This is cool!
(view all replies)Comment Reply
very nice! but one thing, when you are in mid air, you should move just a little bit which ever way you were facing when you hit the ramp.
(view all replies)Comment Reply
That's where the computation starts to get hairy... The skier's movements are a combination of two: - translation forward and sideways, with the scene moving the opposite way; - rotation of the skier in the direction they are moving, which turns the whole scene correspondingly. Your work approximates the whole thing very cleverly. I'm simplifying the problem by deciding that - the skier never turns, they glide sideways, crab-like. In reality, a skier turns to face left when they glide right, and vice versa - an interesting combination! This version hasn't got the Math completely right, I kept your "change x by 3.2" trick, that's why it feels like objects in the distance are moving sideways faster than they should, and faster than objects close up (when I play it, it makes me dizzy). If you want the Math of translation in 3D, look up my bouncing ball in a room. I've scribbled the trig. for rotation of the skier's body and scene, but I haven't tried it on anything yet. Yours is an ideal example to try it on.
(view all replies)Comment Reply