Jump Planet
Jump Planet
Z to jump
Hold to jump higher or fall faster
CONTROL-R to reset
(jump right away. The first obstacle comes quick)
About
Made in Pico-8 for TweetTweet Jam 7! The source code for this game fits into just 2 tweets (560 bytes)
Source Code
You can copy/paste this into a new Pico-8 cart to try it out! Make sure you are using Pico-8 version 0.2.2 or later.
v=0y=-50s=0g=1e=0pal({[0]=5,7,6,14},1)b=sin::_::e+=g*.8cls(2)camera(-64,-94)d=40 if(g<1)pal({[0]=130,5,141,136},1) v+=.3y+=v if(y>-45)y,v=-45,0 if(btnp(4)and v==0)v=-3 if(btn(4)and v>-4)v-=.15 for a=0,1,.005do srand(flr(a*99+e))for k=0,2do m=d-rnd()*9-k*9pset(b(a)*m,cos(a)*m,0)end if rnd()<.04then if(a==0)s+=1 for k=0,5do m=a+k*.004h=mid(b(a+.25),0,1)*(9-k*2)+d if(h-d>=1)line(b(m)*d,cos(m)*d,b(m)*h,cos(m)*h) end end x=a*165-99 if(rnd()<0.1)circfill(x,b(x/60)*2-60-rnd(45),4,1) end if(pget(0,y+1)<1)g=0 ?"웃",-3,y,3 ?"\^w\^t"..s,-7,-80 flip()goto _
Comments
Log in with itch.io to leave a comment.
In 560 bytes? It’s ridiculously awesome, even with a lot more bytes 😁 I really like the minimalist look!
WOW this looks incredible, and fun to play!
how do the clouds work?? I can see that it boils down to this:
, and if I comment out the srand it behaves how I’d expect, but I don’t understand how seeding the RNG this way makes the clouds visually coherent
aha! I figured it out:
let
function F(z) srand(z) return rnd()<0.1 end
. we don’t particularly know (or care) which specific integers F(z) is true for, but for any given ‘a’, ‘e’, andz=flr(a*99+e)
where F(z) is true, then increasing ‘e’ slightly and decreasing ‘a’ slightly will still give the same value z as before, so F(z) is still true.and in the context of this cart, ‘e’ increases over time, and x decreases as ‘a’ decreases, so the x-values that clouds are drawn at move left over time. cool!
Yup you got it exactly! The same trick is used the generate & move the obstacles!