Leaderboards, how?

Hi there! Have you ever wondered how you can implement a leaderboard system for an app? Well, I have, and now I need to implement one for our app !ZeroTime.

!ZeroTime is an app that helps and motivates students to spend their time studying rather than doing something else. We also wanted to add a little bit of competition as a motivator so we decided to add a leaderboard system for our app so people can see who has studied the longest. This leaderboard resets monthly so everyone has a chance to get on it. That all sounds good but there’s just one problem, how in the world does one make a leaderboard that tracks everyone’s progress?

To get the leaderboard to work, we obviously need our app to be connected to the internet and somehow upload the user’s progress to a remote server. From that server, we need to upload everyone’s progress to the user, so the leaderboard can sort and show them. I started looking for my options and found something called Firebase Realtime Database. It’s a cloud-hosted NoSQL database that can store and sync data between users in real-time. I think that’s perfect, so let’s move to the part on how we could use it.

If we were to make our app in Unity (we are still considering doing the app for real, even though it’s not necessary for this course), we would need to add a custom package to Unity called Firebase Unity SDK, which gives us the tools to connect to our database and use it. This database wants the data to be in JSON format, so we need to save the user’s progress in JSON for this to work. Now we can make our app send the data to the database and at the same time listen to changes in it so that the user has the most up-to-date leaderboard.

 

That’s it for this one and now you now know how our leaderboard system works behind the scenes. Pretty simple, right?

Until next time!

Kommentit

  1. What a great blog post! Very interesting topic. Thank you! :)

    VastaaPoista
  2. A great technical post with additional effort on graphics. The post nicely describes the intended functionality and is written well.

    VastaaPoista
  3. A tremendous amount of effort is put into this post which is something I can appreciate. Leaderboards are fascinating indeed!

    VastaaPoista
  4. Thanks, I will definitely use this info on our app aswell!

    VastaaPoista
  5. Thanks for the useful info! The visual appearance of this post was also amazing.

    VastaaPoista
  6. Great blog post. I look forward to hearing more about you and your apps.

    VastaaPoista
  7. Wow, I would've never thought to use NoSQL databases instead of SQL databases because I have no prior experience using NoSQL

    VastaaPoista
  8. Great post. Informative about NoSQL databases.

    VastaaPoista

Lähetä kommentti

Tämän blogin suosituimmat tekstit

Clean Code