So how does a character like Mario get around (here on the x-axis}.
If we wnat him to move on response to user input, the most economical
way is to translate the scene coordinates by his scroll rate.
* * *
Below, giving myself a peaceful pale grey background on the working examples:
Wondering how to change the shade of grey:
* * *
Char_0
Char_1
Char_2
through two images, Interestingly, he faces right or left thanks to the
draw function, which operates a flip on the original right-facing image.
in order for this to be possible, one needs to specify the image center.
Charater_4 not ony has this walking behavior, but also jumps in the air
with a gravity effect. This happens because there is a gravity constant which
accelerates the fall, and decelerates the jump!!
No comments:
Post a Comment