Difference between revisions of "SICK"

(New "license": CC0)
m (Added: Other Languages)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
The authors have dedicated the library to the public domain, as per the conditions of the [http://creativecommons.org/publicdomain/zero/1.0/ Creative Commons Zero dedication]
 
The authors have dedicated the library to the public domain, as per the conditions of the [http://creativecommons.org/publicdomain/zero/1.0/ Creative Commons Zero dedication]
  
You can download it from https://dl.dropbox.com/u/2000007/sick.lua
+
You can download it from https://gist.github.com/Kyrremann/b29397159e939cff2896ed53f1e7c10f
  
 
== API functions ==
 
== API functions ==
Line 28: Line 28:
 
{{#set:Description=Easy high-score keeping.}}
 
{{#set:Description=Easy high-score keeping.}}
 
[[Category:Libraries]]
 
[[Category:Libraries]]
 +
 +
== Other Languages ==
 +
{{i18n|SICK}}

Latest revision as of 06:12, 15 December 2019

SICK stands for Simple Indicative of Competitive sKill and is a high-score library, loosly based on Highscöre. It saves player name and score separated by a tab rather than a newline, which makes them incompatible.

The authors have dedicated the library to the public domain, as per the conditions of the Creative Commons Zero dedication

You can download it from https://gist.github.com/Kyrremann/b29397159e939cff2896ed53f1e7c10f

API functions

highscore.set(filename, places, name, score)

Called at the loading of the game, it sets the filename to load and save high-scores from and to, as well as the number of slots to be used. The last two arguments are dummy values, used if the high-score file does not exist yet.


highscore.add(name, score)

Adds a record to the table. Don't bother checking whether it was high enough to count: superfluous entries will be discarded on saving.


highscore.save()

Just make sure this is called before closing the game, and you're set.


highscore()

Returns an iterator, useful to draw high-score tables. Used as in:

for i, score, name in highscore() do
    love.graphics.print(name, 400, i * 40)
    love.graphics.print(score, 500, i * 40)
end

Other Languages