Log In  

After reading this post https://www.lexaloffle.com/bbs/?tid=38297 I got more interested in coroutines. I had originally dismissed them completely, but this article https://docs.google.com/document/d/14HzJnqKdVtBjN2vN9-rZHLR3rlgwWwDym8ehzhKRqFo got me thinking that I had missed something.

Here is my before and after wall animation code. (Flappy Bird Game) Both achieve the same result, but I feel like the coroutine version is easier to expand and update. The coroutine encapsulates the entire animation logic, including delay. While the function version has to manage more variables.

What do you think? Is the coroutine version better or worse?

P#78333 2020-06-20 15:52

Cart #fate_roller_v1-0 | 2020-05-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

FATE/FUDGE Dice Roller

Press any key to re-roll.

P#76874 2020-05-21 02:23

Follow Lexaloffle:        
Generated 2020-08-06 15:41 | 0.092s | 4194k | Q:29