I need to find a way to include a scoring mechanism for my game. Right now its just a simple side scroller that the background scrolls left and repeats while my rocket just moves up and down on the y axis. I want the score to be kept for distance that is supposed to be traveled or somehow keep track of the time passed without colliding with anything. Anyone have any suggestions on how to go about this?
EDIT: Right now I have a few ways to keep score… If an enemy hits the back wall and respawns you get +1 and if you click to raise your rocket you get +1. Now what I am looking for is a way to constantly having my score going up to mimic distance being traveled by the rocket. I used os.time() last night and had not much luck. I had it working for +1 per second but in only was added and displayed to the screen when I added it to my onTouch rocket function which made it look like the score was added by clicking the rocket. I couldn’t get it to work by itself… any help? [import]uid: 20272 topic_id: 35220 reply_id: 335220[/import]