EDIT 8/22/10: Updating slightly

I’ll likely be using a global leaderboard with my Flash game entry like last Ludum Dare because it can be really fun to encourage competition with fellow LDers on your game. I remember a few Flash devs being curious about the process so I wanted to post a brief step by step tutorial for those of you who want to take the plunge this weekend. If you are using AS3 I’ll also be hanging in the IRC channel and am happy to answer any tech issues you may have if you choose to implement these.

Without further ado — 10 Steps to Global Leaderboards:

  1. Login or create a new account over at MochiMedia.
  2. Once you are logged into your ‘Dashboard’ click the tab called ‘Add Game’.
  3. Fill out the ‘title’ and the ‘dimensions’ of your game. For the purposes of LD15 you don’t have to worry about using ‘Live Updates’ (their distributed version control system) so you can leave it on ‘No’ if you’d like. Click the submit button.
  4. At the next screen you can totally skip all these settings and hit the ‘Done’ button at the bottom if you’d like. Why? Well that is because all the settings on this page are related to using advertisements in your game which you probably don’t want to do for the purposes of LD15. Ads aren’t required at all to use their global leaderboards.
  5. Once you’ve clicked done you will see your game’s title in the game list on this screen. It should have a little ‘pause’ icon next to it. Don’t worry, this doesn’t matter. Click on the title of your game.
  6. Once you’ve clicked on the title of your game click the ‘Scores’ option to setup your highscores.
  7. You will see a little info about the leaderboards but the important part is to click the ‘Create Leaderboard’ button at the bottom.
  8. On the ‘Create Leaderboard’ screen enter the title for your leaderboard (ex: “Highscores” etc), optional description, and then any scoring format/sort data. Fairly self explanatory. If you are using a traditional ‘high scores = better’ then the defaults will probably be fine for you. One thing you may want to mess with is the color / transparent and formatting options near the bottom as that will let you configure the leaderboard widget to match your game’s color theme. I often do ‘transparent’ so that my game background will show through when this is displayed. You can edit this later as well. Click ‘Create Leaderboard’ again at the bottom to generate yours. (NOTE: I always click transparent and it resets to background.. you have to re-edit again and hit transparent and re-save for that option to stick.)
  9. Your leaderboard should be created now and you will be looking at a screen displaying it. The link now that you want to click on is called ‘actionscript code’. A bunch of fields will appear along with 2 radio buttons. One for AS2 and one for AS3. Pick the appropriate technology for your game. Also note your ‘game ID’ and ‘leaderboard ID’ as you will need these later.
  10. You can use these provided code snippets in tabs labeled ‘submit score’, ‘submit score and name’ and ‘show leaderboard’ to get the relevant editable code snippets to drop in that will connect your game to your leaderboards.

Can’t wait for the theme!

Tags: , , , , , , ,


5 Responses to “How to use MochiMedia Global Leaderboards with your Flash entry”

  1. athanazio says:

    ye great one, would be nice to have an open API based on REST, then I would use it in Java hehehe

  2. Draknek says:

    Thanks a lot for this; it made the whole process so much faster.

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]