[Library] BeTR: Best Time Recorder
Posted: Sat Jun 06, 2015 6:46 pm
This is a highscores library for times. Great for games or applications that want to monitor the best time
As of v1.0, BeTR only records the #1 best time, but I am trying to add more.
Im sure this is probably not the cleanest code or best library, but I'm still a beginner, and it works for the small games I am programming.
I'm also new to Github and all that, so the page might be formatted right either. Anyway, here is the github page: https://github.com/1nsertNameHere/BeTR
How to use it:
Note that while this is not yet in the readme.mt (jsut ignore that), it is in the library code itself.
Please commend suggestions, bugs, or edits!
As of v1.0, BeTR only records the #1 best time, but I am trying to add more.
Im sure this is probably not the cleanest code or best library, but I'm still a beginner, and it works for the small games I am programming.
I'm also new to Github and all that, so the page might be formatted right either. Anyway, here is the github page: https://github.com/1nsertNameHere/BeTR
How to use it:
Code: Select all
besttime.path(path) - defines file for best time - recommend being placed in love.load (This file is in applications support, the path is basically just the name you want)
besttime.start() - creates file for best time - recommend being placed in love.load
besttime.new(time) - checks if time is lower than current best, then adds
besttime.get() - returns the best time
besttime.reset() - sets best back to 9999
besttime.set(time) - FORCES this new time to be set
good for if you're using this for a highscore and not a best time
(you probably want to edit the starting number from 9999 then though)
Please commend suggestions, bugs, or edits!