Log In  
:: Unfold ::

Cart #quantumbullshit-1 | 2020-08-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Here's a tiny tweetcart!
188 chars of pixelated punch~

Here it is on twitter, if you want more ♥

P#81126 2020-08-24 20:50

:: Unfold ::

Cart #cursed_petri-0 | 2020-08-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I stumbled upon this very odd behaviour while making this tweetcart :

After loosing some sleep over why a pixel than can randomly go in any of the 4 direction always build staircases, here is what the poor souls of the #help channel on the pico8 discord server and I have found out :

  • When trying to have randomly one of these results :
    dx=0 dy=1
    dx=0 dy=-1
    dx=1 dy=0
    dx=-1 dy=0

I wrote this :

dx=rnd({-1,1}) dy=0
-- %50 chance to swap them
if(rnd({true,false})) then dy=dx dx=0 end

The behaviour disappears if I use any other method of achieving this result

  • HOWEVER, the distribution of dx and dy with this method appears to really be random
  • The pattern rnd({foo,bar}) appears to yield odd results, even on it's own
  • if I swap out +dy and +dy2 with a -dy and -dy2 in the pset() calls, the staircase pattern is reversed.
    Which makes no sense, considering the sign of dy is supposed to be 50/50

So, if anyone can explain why this behaviour happens, I'd be very grateful!

P#81089 2020-08-23 19:40

:: Unfold ::

Cart #petri-0 | 2020-08-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Finally took the time to make a #tweetcart of this cute effect I found!
It makes me think of bacteria on a Petri dish c:
Credit to @Naxane_ on the #pico8 discord server for the help fixing a particularly /w e i r d/ bug with rnd() on tables, and for golfing it into a tweet!

P#81087 2020-08-23 19:28

Follow Lexaloffle:          
Generated 2023-03-24 03:06:02 | 0.089s | Q:18