Log In  

Hey @zep,

Is holdframe() intended to be a peer/complementary function to flip()?

I had it pointed out that I'd erroneously marked flip() as undocumented on the wiki, even though it is documented—I just suck at searching the manual. That reminded me to check holdframe(), to see if it was still undocumented, and it still is. It is, however, overtly called out in the changelog as having been added, so it's simultaneously documented and undocumented.

Is it intended that we're allowed to use it for custom game loops, or no? If we are, it'd be nice to have it documented in the manual. Otherwise I'll leave it in the nebulous wiki category of Undocumented API.

Thanks! :)

P#73543 2020-02-28 16:28 ( Edited 2020-02-28 16:31)

You mentioned it would be nice to have it documented in the manual, Felice. Perhaps this description might help.

You use it after FLIP(). What it does is force the screen now to only be rewritten once FLIP() is reached.

So normally when you plot many pixels on the screen and they show up even before FLIP(), holdframe() will prevent this problem.

Try this code as normal. Then UNREM holdframe() to give you an idea of what it does.

repeat
  cls()
  for i=1,16000 do
    pset(rnd(128),rnd(128),rnd(16))
  end
  flip()
--  holdframe()
until forever

Hope This Helps !

P#73567 2020-02-29 17:27 ( Edited 2020-02-29 17:42)

I already know what it does, dw. I'm trying to determine whether or not to keep it in the "undocumented" category on the wiki.

P#73572 2020-03-01 06:11

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 14:00:01 | 0.006s | Q:14