Log In  

Hi all!
I'm Elia and this is my first post here.
I'm enjoying a lot PICO-8 but I've stumbled across a mystery.

To get to the point, I was reading the pico8zine#2 as a tutorial, and the first chapter makes u do a game of life program.
The example was not using the _update and _draw function, so I changed a bit my code to use it, and at first I thought something wasn't working with the code, and later discovered I was running at 15fps!

It was a bit weird since I was basically doing just the things the tutorial said, I then tried to switch to not using _draw but drawing with flip and a while(true) as the tutorial, and now all works fine!

I don't know if this is intended, but I used stat(1) to look at the cpu usage, and I had more than 17 with the tutorial version, when I though more than 1 lead you to 15 fps.

This is my version with the _draw and _update functions:

Cart #huhegojuze-0 | 2020-09-28 | Code ▽ | Embed ▽ | No License

Here instead I use a while(true) loop with a call to flip():

Cart #koguporero-0 | 2020-09-28 | Code ▽ | Embed ▽ | No License

Is it normal? And if it is, isn't it like the "fantasy" limit on the cpu can be overcome this way?

I've looked a bit to know if there was something related to this but couldn't find an answer and now I'm a bit curious =)

As a side note, the thing that makes that game run so slow is the 128x128 table that leads to huge loops and a lot of read/write to it.
At the end, it was useful to discover all of this cause now I'm a bit more skilled on PICO-8 limitation!

Edit:
The numbers on the games are the cpu usage and the current fps!

P#82405 2020-09-28 17:58 ( Edited 2020-09-28 18:27)


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-11-27 05:49:42 | 0.006s | Q:15