My 3 Level Game Needs a Scoreboard

(pamtango) #1

Here’s the link for a game I’ve been working on. Object is to have character escape 3 levels of rooms. I’d like to add a scoreboard of fastest times solved, but haven’t managed that as yet. Image of Level 2a below, showing 7 seconds into game.
Pam’s Physics Game

(Member) #2

Very nice is this your first game?

(pamtango) #3

I’d made another with 5 levels built a level or 2 each Xmas for a friend’s kid. I’ll post it if you want to check it out.
Do you have any suggestions for a best times menu?

(Member) #4

Yes i have a suggestion are you making new maps and levels to the game?

(Member) #5

And it should have a scoreboard that who has the higher level also…

(pamtango) #6

Everyone reaches all the levels. I need to integrate times for all levels combined and list best times. Still trying to do so.

(jesusmora) #7

scoreboard can be done easily in python, but i believe it is also posible with logic bricks.
first you need a timer property.
when level start, set the property to 0.0 using a property actuator or from python.
when level ends, use a property actuator to copy the timer property into a different property. you can use multiple properties, like “first”, “second”, etc, for different scores.
you can test the value of the timer property at game end to put it in the correct score property.
then you just have to show the scoreboard, copy the properties of the scores into the text property.

with python it’s a lot simpler and you can save the scores to a file, but you need to know python. you can basically put the scores into a list inside a dictionary, sort the list, and then do bge.logic.globalDict["scores"] = scores and bge.logic.saveGlobalDict(), and load the dictionary when starting the game.