Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Any ideas for a high score chart???

Hi, I would like to add a high score chart when my frogs n logs game in Unity finishes a round. I do not know where to put this code in my scripts, so could someone please give me a little help? Thanks guys!

1 Answer

With unity, the code files tend to be separate from each other for separation of concerns. I would make a new file, name it leaderboard.js (if you are using JavaScript) and do your code inside that file. I would think about when the high scores need to be updated, (i.e. when seems like an appropriate time to log that information) and how to sort them, as well as coming up with some kind of interface for entering the players name/initials. One thing to think about: does it actually need any interface at all? If this is being played on a computer, probably not since the user has the keyboard for input, but if the game was going for release on a different platform, that might be something to consider. Probably not important for what you are tying to do, but these are things game devs think about when designing these systems.