In this short Pico 8 game you are the rear gunner on a space ship travelling through space, but an endless swarm of alien ships have set their sights on taking down your ship, use your machine gun to stop them, manage your gun's health, as well as your ship's health by shooting health orbs and dodging incoming attacks.
Controls:
-UP and DOWN arrow keys to move your gun
-X/M/V to shoot
-Z/N/C to bring up the ship HUD
Tips:
To survive as long as possible, there are two important things to track, your ship's health and your gun's health:

I made a function that can turn the custom instruments into single-channel chords.
Sure, you can just use the arpeggio effects, but this code gives you fuller-sounding chords, and it allows you to put multiple chords in the same four-note group, so you can play syncopated chords!
function set_chords(wave,start,bass,filter,...)
local harmonics={...}
local addr=0x3200+68*start
for i in all(harmonics) do
for j in all(i) do
for k=0,63 do
poke(addr+k,peek(addr+k)+wave(k/64*j)*127/#i)
end
end
poke(addr+66,128)
poke(addr+65,bass and 1 or 0)
if (filter) poke(addr+64,filter)
addr+=68
end
end |

Controls: UP - forward, DOWN - reverse
Left/Right - turn
X (when on dig spot) - mine rock
Z/O - Talk/interact
Slow day at work, so here's a new version. I have an NPC you can talk to, and behind the scenes the code is a little cleaner. Additionally, it should work on mobile browsers now too!
----atr8des----

A basic color changing pong demo
(260 chars)
::➡️:: bx=60by=60bw=8bh=8ba=1bb=2 py=0s=127k=0 r=rectfill::😐::cls(k)bx+=ba by+=bb k=time()\6 color(k-5) r(bx,by,bx+8,by+8)r(0,py,8,py+64)py=py+1/8*(by-py-34)if bx+8>s or bx<7 then ba*=-1end if by+8>126 or by<0then bb*=-1end if bx+8<0then goto ➡️ end flip()goto 😐 |
they love jumping!!
without all the fancy highlighting this was actually well under 200 characters, with gradients it got increased up to 219
(219 chars)
pal({[0]=128,5,13,6,7},1)::_::cls(0)
for i=-2,16do for j=0,13do x=i*8+(t()*6*(j%2*2-1))%8
p,o=tonum(x>56and x<64),tonum(x>32and x<88)+tonum(x>44and x<76)print("웃",x,(j*10+2)+p*sin((x-56)/16)*6,1+p+o)end
end flip()goto _
|
Made some sparkles in exactly 300 chars
(300 chars)
p={}k={1,2,8,9,7}t=0r=rnd
for i=1,45do
m={}m.x=r(99)m.y=r(128)m.a=r()m.s=r()m.r=r(3)m.l=ceil(r(6))add(p,m)end::◆::cls()for m in all(p)do
m.x+=sin(m.a)+1m.y+=1m.x%=128m.y%=128m.a+=.01
for l=1,m.l-1do
for i=1,4do
a=m.a+i*.25b=(m.l-l)line(m.x,m.y,m.x+sin(a)*b,m.y+cos(a)*b,k[l])
end
end
end
flip()goto ◆
|
First postcart I've done, calling this one "mobile"
(259 chars)
pal({-2,-1,-7,-8,-9,2},1)function l(d,x,y,r)if(d<=0)print("★",x-3,y,5)return
local ct,st=c(t()/(d*2))*r,s(t()/(d*2))*r
line(x-ct,y-st,x+ct,y+st,d)circfill(x,y,d/3,6)l(d-1,x-ct,y-st,r*0.6)l(d-1,x+ct,y+st,r*0.6)end c,s=cos,sin::_::cls()l(4,64,64,32)flip()goto _
|
Grab it while you see it, it may never come back.
(296 chars)
t=0r=rrectfill _=rnd function _draw() ?"\^c2\^!5f12-♪72⌂9☉◆/웃🅾️⬅️." for n=0,9do srand(n+t\1) for m=34,120,24do w=15+_(7) h=4+_(9)\1 c=2+_(9) x=(n-t%1)*27-m/2 y=m-w\2 r(x,y,w+h,w,c,3) r(x,y-h,w,w+h,c,0) r(x,y-2,c,w,8,1) r(x+1,y-h+1,w-2,w-2,c-1,4) r(x+4,y-h+4,w-8,w-8,c-1,_(10)+5) end end t+=1/27 end |

The first exhibition of PICO-8 postcarts is happening at Pico Pico Cafe in Tokyo later this month! Each postcart is displayed as a physical 15x15cm card with the author, title and source code (<= 300 chars of PICO-8 code) on the back. A card reading machine hooked up to a crt tv can be used by guests to view the postcarts in their animated form.
We already have over 100 postcarts lined up for the exhibition, including some vintage tweetcarts and rare unposted postcarts. But the more the merrier! If you would like to show something, just check the permission box when submitting it BEFORE THE 15TH OF NOVEMBER, although we can probably include some stragglers before the opening on the 20th. I'm also happy to accept URLs via email (e.g. to old tweetcarts or personal webpages where src is visible) if you prefer: hey at lexaloffle dot come with "postcart" somewhere in the subject field.
I'm no expert on the pro postcart tricks but threw together this organic looking sketch before bed.
(211 chars)
c,s,p=cos,sin,{1,-13,3,-6,10}cls(1)::★::for x=4,128,8 do
for y=4,128,8 do
d=200/sqrt((64-x)^2+(64-y)^2)█=(t()+d)%4+1●=(cos(x+t())*32-sin(y+t())*32)%4circfill(x,y,●,█)pset(x-1,y-1,█+1)end end
flip()pal(p,1)goto ★
|

Have you ever wanted to make your Picotron backgrounds random?
Well now you can with "RandPaper"! All you have to do is run it with the argument install and it will install to your startup.lua automatically so you get a new background on startup, or if you want to try it once just run it. Its config file is found in /appdata/randpaper.pod.
Cart:
Did you know? Patrick Star's cells are tiny Patrick stars happily floating in plasma.
(299 chars)
function _update60() cls(15) for m=0,29do w=m\6*33 v=m%6*38-w/2 o=t()*.8*(m%2-.5)+v/64 q=.2+sin(t()+m/4)/30 for a=-q*2,q*2,q do for d=2,16do c(v+cos(o+a)*d,w+sin(o+a)*d,7-d*.35,14) end end for n=-3,1do d=n*3+15r=2a=o if(n>-2)d=9r=0a=o+n/40 c(v+cos(a)*d,w+sin(a)*d,r,14-n%2*12) end end end c=circfill |
This function replaces an sfx slot in a given music/pattern. Useful for dynamically changing music, making drum machines etc.
This function will also turn the channel "on" for you.
function replace_music_channel(music_id,sfx_id,channel_id) target_channel_offset=channel_id pattern_addr=0x3100+music_id*4 goal_addr=pattern_addr+target_channel_offset poke(goal_addr,sfx_id) end |
Call it with a pattern id(0-63), an sfx slot(0-63) and the channel id to change (0-3).





1 comment



