This site requires JavaScript, please enable it in your browser!
Greenfoot back
JellyBlobsofDoom
JellyBlobsofDoom wrote ...

2013/1/21

Top 10 high score board?

JellyBlobsofDoom JellyBlobsofDoom

2013/1/21

#
Is there a way to record the top 10 scores, and put it on a high score board in the main menu?
danpost danpost

2013/1/21

#
Of course. If you have tried and are having trouble, explain your issue and post your code.
JellyBlobsofDoom JellyBlobsofDoom

2013/1/21

#
So far I only have a counter, can you tell me how to save the high score? do i just make an int?
danpost danpost

2013/1/21

#
Let me know if I understand you correctly, first. What you want is to display the top 10 scores on the header screen of your scenario. Is that correct?
JellyBlobsofDoom JellyBlobsofDoom

2013/1/21

#
yup!
danpost danpost

2013/1/21

#
Create an Actor sub-class called 'Header'. In its constructor, create the image to be used for the Header object(s) created from the class. Get the data from the UserInfo storage, if possible (if the user is not logged in, the storage data will not be accessable). Create a text displaying GreenfootImage object for the user name and score. These images can be drawn on the Header object image with any other text you may want to display with the data. The user name, the score, and even the userImage (icon) can all be used in creating seperate images to draw on the Header image. Make sure you set the final image as the image of the object(s) created in the class. Then, in your world constructor, create and add a Header object to the world and add a 'public void started()' method to remove the object if it exists in the world (if you do not use another way to trigger removing it).
JellyBlobsofDoom JellyBlobsofDoom

2013/1/21

#
I'll try it out! Thank you! :)
You need to login to post a reply.