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! :)

1


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 !


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.



[Please log in to post a comment]