MGS

From MSX Game Library

Revision as of 09:52, 26 May 2025 by Aoineko (talk | contribs)

MSX Game Scores (MGS) is an online leaderboard platform for MSX games: https://aoineko.org/mgs.

It allows players to submit their high scores using codes generated by the games themselves. Developers can integrate score encoding into their games, and once submitted, the scores are verified server-side and displayed on public leaderboards. The goal is to bring a modern, competitive scoring system to new MSX games.

How do I add my game to the MGS site?

Generate a score code

The basic idea is that your MSX game must generate a code that encodes the relevant data:

  • the score,
  • the corresponding leaderboard (if there are several),
  • and any other useful information for your game.

For example, in a racing game, besides the time to complete the race (the score) and the track (the leaderboard), you might also want to record the car type used, whether the player used a manual or automatic gearbox, etc.

You are free to use any technique you want to encrypt your data. Just make sure the encoding is strong enough to prevent someone from inputting random codes and getting a valid score. MSXgl provides a C module for encoding data.

Add your game to MGS

After that, I will manually add the game and its leaderboards to the MGS site. For now, this is a manual process that I handle directly.

Finally, the interface needs to be created: this is PHP code that checks the validity of the submitted code and, if valid, generates the entry to be added to the leaderboard. I have some example PHP functions available, but I can also write them for you if needed.

To decode the score code, you’ll need to write in PHP the inverse function of the one used on MSX. If you use the MSXgl score encoding function, the corresponding PHP decoding function is already available.