Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

Two problems I'm having

A topic by AmenUnderWu created Jul 27, 2022 Views: 201 Replies: 3
Viewing posts 1 to 3
(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!

Developer
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?

You have to use any local http server to load index.html or just try to upload your game to itch.io

Developer
Second, I haven't yet found a way to write a usable sleep() function.

As a possible solution, it could be like in this post https://itch.io/post/82494

(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