CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: lazydogP on October 10, 2016, 03:24:44 PM

Title: How to recover TI-Nspire Lua's timer after turning off screen
Post by: lazydogP on October 10, 2016, 03:24:44 PM
I want to write a tiny game which needs players wait for a while. But when turing off screen, the timer will be freezed if the timer has been set fast. How to avoid this issue? Or how to recover the timer?
Title: Re: How to recover TI-Nspire Lua's timer after turning off screen
Post by: p2 on October 10, 2016, 03:33:57 PM
I assume running programs are paused during standby and stuff (black screen).
Maybe you could try to compare it to the calc's time settings (what time was it before turnng it off, what time is it now)
But that'd make it easy to manipulate your game.
Title: Re: How to recover TI-Nspire Lua's timer after turning off screen
Post by: lazydogP on October 10, 2016, 03:45:56 PM
Quote from: p2 on October 10, 2016, 03:33:57 PM
Maybe you could try to compare it to the calc's time settings (what time was it before turnng it off, what time is it now)
But that'd make it easy to manipulate your game.
Yeah. It's better to use this if time is so long. However, some animations need timer and timer is freezed, so the game seems stopped but if you refresh the screen manually (eg. switch to home page and come back, switch to another tab(TI calls it 'problem') or just press 'Doc' key), the new content can be shown.
Title: Re: How to recover TI-Nspire Lua's timer after turning off screen
Post by: Dream of Omnimaga on October 13, 2016, 05:49:37 AM
Hm, maybe @Adriweb  might know
Title: Re: How to recover TI-Nspire Lua's timer after turning off screen
Post by: Adriweb on October 13, 2016, 04:41:58 PM
Not really, the timer can be an odd thing sometimes.

(Also, a tab is called a 'Page', or more interally 'Activity' IIRC. A 'Problem' is one or more pages together, and defines the scope of a symbol table... (and maybe timers? I don't know about that.))