I'm making a running game, and I was wondering if anyone can show me how to make my score based on the distance I travel like Tiny wings or icopter.? thanks.
well you could just use the self.position.x as a score if you wanted. Display that or have a score attribute thats displayed to that. Just make sure your characters starts in the middle of the origiinal camera zone so it doesnt go negative at the begingning. You could also multiply that by whatever if u want a bigger score.
The other thing u can do is just have a timer that adds to a score attribute every 0.1 seconds your playing.
LudwigHeijden said: @John time alone isn't enough or am I wrong? The velocity should be added in the equation because when you go faster, the distance you travel is more.
if you have different changes in speed then your correct, he didnt mention that though so i left it out to not confuse him. If your going at one constant speed then thats not needed.
Comments
The other thing u can do is just have a timer that adds to a score attribute every 0.1 seconds your playing.
Hope that helps
Lump Apps and My Assets