Author Topic: HighScoreLib for NSpire  (Read 4707 times)

0 Members and 1 Guest are viewing this topic.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
HighScoreLib for NSpire
« on: April 26, 2013, 07:12:40 pm »
Hi Guys,

Some of my favorite calculator games have highscore tables!  My next calculator game will have a highscore table! :)  If you are programming a game and wanted a highscore table you could create one; they are not difficult to program.  But it would take some time; and probably some bugs to fix along the way.

I figured I'd write it once in a simple, neat, sharable way such that myself and others could use it!  All source is included such that you can make any modifications you'd like!  It is written in C.  And hopefully it is able to meet all of your highscore needs!

It is in the form of a static library (meaning you compile it in with your program).  There is even a little nspirio program to test it.  I added unit tests which tests that the functionality does work as intended so hopefully there shouldn't be any problems!

The initial concept was simple; it is a table of scores and names.  Thinking a little more I figured somebody might want to make a game with difficulties such as "easy", "medium", "hard" and keep highscores for each difficulty.  I used the term identifier; and this library can do that! :)

I used a singly linked-list for the highscore items and there is a way to add extra data should you want to keep more than a name and score.  There is some usage information in the Readme file in the zip attachment.  But just let me know if you have any questions!

Thank you for reading!
Enjoy your day!

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: HighScoreLib for NSpire
« Reply #1 on: April 26, 2013, 09:22:45 pm »
This is a very helpful little thing! What about encrypted highscores with a webapp to decrypt them? :)
Keep trying.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: HighScoreLib for NSpire
« Reply #2 on: April 28, 2013, 11:57:17 pm »
Hi Dapianokid,

If I understand what you are asking: in addition to the score and the name, you are wondering if the highscores can be tamper-proof?  There is a number field where you can put anything you wanted.  For the most-part I figured a date or something relevant to the game (such as number of balloons popped if that is what the game was about).  You could make it a security verify field in case you suspect tampering with the score value.  Something simple like modulus 13 (for example) might be sufficient.  So if the score was 1128, keep the number 10 with it.  Somebody tampering with the highscore file will know to change the 1128 to some other score but won't know what to change the 10 to!  Would something like that meet your needs or would you need the score to be encrypted?

Well have a wonderful day!

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: HighScoreLib for NSpire
« Reply #3 on: April 29, 2013, 05:15:51 pm »
That is a perfect encryption. :)
Keep trying.