Log In  

Hello all ! I'm a beginner, will post some newbies question sorry for this.

I can't find any wait function in the help file ? Do i need to program a counter or something like this ?

P#15995 2015-10-29 08:46 ( Edited 2018-03-08 14:32)

2

If you want to pass a frame without doing anything or losing your place, you can use flip(). This is useful for full screen wipe effects that freeze up everything else, like making fade in/out sequences, or other things that can interrupt everything else you're doing.

Otherwise, you should probably use a counter to iterate over multiple _update / _draw function calls, yes.

Here's a handy little shortcut I use sometimes:

function wait(a) for i = 1,a do flip() end end
P#16001 2015-10-29 12:35 ( Edited 2015-11-05 21:39)

this really helped! thank you for the information!

P#50078 2018-03-07 21:58 ( Edited 2018-03-08 02:58)

or if you are in a coroutine you can yield()
:)

P#50088 2018-03-08 00:06 ( Edited 2018-03-08 05:06)

Have a look at this thread:
https://www.lexaloffle.com/bbs/?tid=30447

This is one of key aspect of game development and pico does not provide entry level helpers

Note: coroutine are in pico-ninja realm ;)

P#50098 2018-03-08 09:32 ( Edited 2018-03-08 14:32)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 11:13:25 | 0.006s | Q:15