Ninjump type Counter
motorcycle boy
Member Posts: 429
I notice in Ninjump that they have the first two digits that seem to be counting 10th of a second or 100th of a second. Has anyone played that game? I'd like to implement a counter system for my own endless scroller. Is there a template for something similar to this? Thanks
Comments
What would the counter be measuring ?
The distance traveled upwards by the character. I just have a game level integer that I change every second to game.score+1. I just wanted a nice fluid display like they use in Ninjump. It reminded me of a stop watch display.
If you are changing a value by 1 every 1 second then you don't really need any additional attributes as game.time is already changing by 1 every 1 second, all you are doing is looking at one attribute (game.time) and seeing when it increments by 1 (each second) and then using this to increment a second attribute (game.score), you are just duplicating game.time.
It's a little looking at a clock, and every hour you write down the time, and print it out and stick it on the wall next to the clock so everyone can look at the printout and see the time . . . but it's just as easy for people to look at the clock that is already there !
If you want to display 1 point every second it would be Display text floor(game.time)
If you want to display the score in 100ths of a second it would be Display text roundTo(game.time,2)
Ah ok thank you for that. Looks to be very simple to implement thankfully.
Yep, it's very straightforward.