Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

AmenUnderWu

3
Posts
1
Topics
A member registered Jul 27, 2022

Recent community posts

Such a pity that javascript's setTimeout() doesn't function here...

(2 edits)

Thanks a lot! I'll study harder in the future.

 (btw I'm also looking for a way to play an animation in a custom function... but this gives me an inspiration. thanks anyway

(1 edit)

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!