Such a pity that javascript's setTimeout() doesn't function here...
AmenUnderWu
3
Posts
1
Topics
A member registered Jul 27, 2022
Recent community posts
First, after I export the html file I unzip it and open the index.html, but nothing happens after I click the "click to play" except that the words disappear. Am I exporting it the wrong way?
Second, I haven't yet found a way to write a usable sleep() function. I wrote like this as others say that it can work:
function sleep(n)
local t0=time()
while time()-t0<=n do end
end
But not only does it cause the program to lag, it also causes glitches. In the TIC() function, if I write draw something on the screen, then sleep(50), and then cls(), nothing will be displayed. I wonder how to realize a fully functional sleep()...
Thanks!