21st of September, 2018


I decided to add a simplistic timer into the game that tracks how long your playthrough lasts. Due to limitations with the engine it only tracks time on the overworld properly, in battles it just adds five seconds during each turn (this was the best compromise I could find).

For technical details on how this works: Every frame the game will add 1 to a variable called 'timer'. As the game runs at 60fps we can just divide that timer number by 60 to get the number of seconds - for example a timer value of 193 would be 3 seconds. The time value in seconds is then saved to two variables, 'Hours' and 'Minutes'. The hours value is divided by 3600 (the number of seconds in one hour) and the minutes value is the seconds mod 60 (divided by 60 and the remainder is saved). This means that I store the number of total hours the playthrough took, as well as the number of minutes from 0 to 59. Then it's just a matter of displaying these numbers to the player and in the right order, which is the easy part.

Get Aretisia: Tenebris Dominus

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.