Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

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

Runs at 120 tics per second in HTML

A topic by xmonkee created Feb 06, 2022 Views: 215 Replies: 2
Viewing posts 1 to 3

Test program here: https://gist.github.com/xmonkee/a9fe6ab0ab983371213e15e5b666734d

to run natively:

`tic80 --fs . --cmd="load main.lua"`

To run html:

```
tic80 --fs . --cli --cmd="load main.lua & export html speed"
unzip speed.zip
python3 -m http.server 8080
```

The FPS counter will show 120 in the browser, and the music will play at double speed

Not sure what the problem is there but I created this similar program and tested it natively and by uploading to itch.io. It reports the expected 60fps in both cases.

Maybe the python server is causing the issue? Note: I also didn't hear any music when running your code.

local t=0
local ts=tstamp()
function drawFps()
    local tmp=tstamp()
    if tmp==ts+1 then
        ts=tmp
        cls(0)
        print(t,0,0)
        t=0
    end
end
function TIC()
    t=t+1
    drawFps()
end
Developer

xmonkee what version do you use to the fps, 1.0-dev or 0.90?