Log In  
Page:
1
2
3
4
5
6
7
8

jonbro: "::s::" is a label definition in Lua 5.2, which you can use with "goto s". Looks like "::s::" ... "goto s" ends up being smaller than "while 1 do" ... "end". That's neat!

P#24139 2016-07-01 15:09 ( Edited 2016-07-01 19:14)

@Martincho: I love it!

P#24140 2016-07-01 15:17 ( Edited 2016-07-01 19:17)
2

Yeah, first time I used a goto in a while! It's smaller even when manually flip()ing frames too.

Cart #24141 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

t=0::l::cls()t+=0.01
for y=20,98,2 do
circ(64+cos(t)*y,20,y/8,y)for x=0,127 do
c=pget(x-1,y)+pget(x+1,y)pset(x,y+2,c%3)
end end flip()goto l
P#24142 2016-07-01 15:26 ( Edited 2016-07-01 19:26)
1

i am seriously humbled by your collective brilliance

i submit a very basic sinewave lollipop graph

t=0
while 1 do
 t+=.03
 for x=0,16 do
  y=64+sin(x/20+t)*16 
  x8=x*8
  line(x8,64,x8,y,7)
    circ(x8,y,2,7+rnd(8))
end flip()cls()end 

[edit]

aright this got creepy

Cart #24162 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

still fits in a tweet though!

t=0
while 1 do
t+=.03
 for x=0,16 do
  y=64+sin(x/20+t)*16 
  x8=x*8
    circfill(x8,y,(y/25+y/5),1+x%15)
end flip()cls()end 

[more edits]

sawtooth lollipop graph!

fits PRECISELY in 140 characters, including formatting :)

m=64 f=0
while 1 do
 for x=0,16 do
  f+=440
  y=(f%m)
  x8=x*8
  line(x8,64,x8,y+32,7)
  circ(x8,y+32,2,x)
    end 
    flip()
    cls()
end 
P#24145 2016-07-01 15:31 ( Edited 2016-07-02 15:21)
1

Cart #24151 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

UPDATED AGAIN: more efficient line usage, added some colour and detail.

UPDATED: added some more detail and less chance it messes up. Exactly 140!
First ever Pico8 'thing'. I did a tunnel-esque one but didn't like it, so here's the beginnings of Mini-DownWell... or something :p

x=32q=122p=print
a=rnd
function _draw()
for i=0,x,2 do p("@",i,q,4)p("@",q-i,q) end
p(".",a(q),q)p""
u=a(5)d=a(5)
x=max(min(32,x+u-d),0)
end
P#24146 2016-07-01 15:32 ( Edited 2016-07-01 20:08)

Cart #24147 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

i wrote this silly thing. sadly i could've made it alot better with like 5 more chars haha.

x={}for i=1,16 do
x[i]=flr(8+rnd(4))end
for i=1,16 do
for j=1,16 do
n=2
y=x[i]
if y<j then
n=3
end
if y>j then
n=1
end
spr(n,i*8,j*8)end
end
P#24148 2016-07-01 15:38 ( Edited 2016-07-01 19:38)
1

Cart #24152 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

cls()
a={}
b={}
::s::
add(a,rnd(128))
add(b,rnd(128))
for i=1,#a do
circ(a[i],b[i],1,i%3+8)
a[i]+=rnd(6)-3
b[i]+=rnd(6)-3
end
flip()
goto s
P#24153 2016-07-01 16:13 ( Edited 2016-07-01 20:13)
1

@zero01101 riffin on lollipops!! 136 characters

Cart #24155 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0
while 1 do
t+=.03
for x=0,16 do
y=64+sin(x/20+t)*20 
b=x*8
line(b,64,b,y,5)
circ(b,y,1+abs(y-64)/3,x)
pset(b,y,7)
end flip()cls()end
P#24154 2016-07-01 16:14 ( Edited 2016-07-01 20:16)

@Veld:


i wrote this silly thing. sadly i could've made it alot better with like 5 more chars haha.

x={}for i=1,16 do
x[i]=flr(8+rnd(4))end
for i=1,16 do
for j=1,16 do
n=2
y=x[i]
if y<j then
n=3
end
if y>j then
n=1
end
spr(n,i*8,j*8)end
end


You can get a few more chars with the help of PICO-8 Lua shorthand and parser permissiveness:

x={}for i=1,16 do
x[i]=flr(8+rnd(4))end
for i=1,16 do
for j=1,16 do
n=2y=x[i]
if(y<j)n=3
if(y>j)n=1
spr(n,i*8,j*8)end
end

140 -> 121 characters

Edit: Also, you can abuse the fact that one of your sprites is transparent and then use the sgn() function to get it down to 112, even though it doesn't return three values like it's supposed to:

x={}for i=0,15 do
x[i]=flr(8+rnd(4))end
for i=0,15 do
for j=0,15 do
if(j!=x[i])spr(2+sgn(x[i]-j),i*8,j*8)end
end

If sgn(0) returned 0, like it's supposed to, you could skip the if(j!=x[i]).

Zep, I'm looking at you. cough

P#24157 2016-07-01 16:34 ( Edited 2016-07-01 21:21)

dodger - You're a helpless X, dodge the other X! If you die, the game crashes.

Controls: up - hold to move up, let go and you'll fall

Just barely fits in 140 characters, uses gotos, and takes advantage of the fact that sprite 0 is an x in new cartridges.

y=4 z=0::a::z=rnd(8)x=99::s::cls()y=mid(0,y-(btn(2)and.3 or-.3),8)spr(0,0,y*9)spr(0,x,z*9)x-=3
if(x>0)flip()goto s
if(abs(y-z)<.7)d()
goto a

edit: slightly more playable

P#24159 2016-07-01 16:50 ( Edited 2016-07-01 21:01)
1

Cart #24165 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

140 on the nose (updated for Better Styles)

t=0
function _draw()
cls()
t+=.03
for x=0,32 do
r=64-sin(x/32+t)*16+cos(t+t*0.5)*17
b=x*4
rect(b,64,b+1,r,7+x/4)
rect(b,r,b+1,r-1,7)
end
end
P#24161 2016-07-01 16:51 ( Edited 2016-07-01 21:00)

@adam Atomic

this is Art

@Overkill speaks the truth :D

P#24164 2016-07-01 16:57 ( Edited 2016-07-01 21:03)

Cart #24167 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

cls()
circfill(85,38,24,10)
for j=0,6 do
circfill(64,90,60-j*5,(8+j)%14)
end
for k=0,9 do
circfill(k*15+rnd(8),95,rnd(10)+10,7)
end
P#24168 2016-07-01 17:05 ( Edited 2016-07-01 21:05)
2

Cart #24172 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

cls()o=15::s::
for i=0,99 do
x=rnd(128)y=rnd(128)
c=pget(x,y)+o
circfill(x+rnd(6)-3,y+rnd(6)-3,5,c)
end
o*=0.7
flip()goto s
P#24173 2016-07-01 17:46 ( Edited 2016-07-01 21:46)

I wanted to write a real game for the jam, and I settled on janken, a.k.a. jankenpon, a.k.a. rock-paper-scissors. Alas, I could not trim it down enough to qualify for a tweet. It's 248 chars. I'm disqualifying myself, but I want to share it anyway.

Cart #24171 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

How to play:

L, U, R on the dpad are the moves. L < U, U < R, R < L. All legal moves beat illegal moves like D, X, or O. Ties do not count.

To start, throw any move at the first single button prompt. Say "Pi!" out loud!

To continue, throw any move again at the second single button prompt. Say "Ko!" out loud!

To complete the game, throw your real move at the triple button prompt. Say "PON!" out loud!

Your and the AI choice will be display, along with culmulative scores. Hit any button to start the next round.

Note that it does have an actual AI that does more than RND(3). It's simple, but it's not half bad. I'm curious how well it does against people. No peeking at the code first!

Speaking of the code, this is what you're meant not to peek at:

I SAID DON'T PEEK! GO PLAY FIRST!

function p(s)print(s)repeat b=btn()until b!=0 repeat until btn()==0 end
w=0 l=0::r::a=flr(g or rnd(3))+1 g=nil p("L!")p("L!")q="LUR?"p(q)u=({1,3,4,2})[b]or 4
if(a!=u)d=(u-a)%3%2 w+=d l+=1-d g=(a-1-d+rnd(1.3))%3
p(w..sub(q,u,u)..sub(q,a,a)..l)goto r

(Note that in the actual code, LUR is replaced with the corresponding arrow icons, which don't copy/paste correctly.)

P#24175 2016-07-01 18:03 ( Edited 2016-07-01 22:07)

Cart #24179 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This uses sprites, but I wanted to do something with the map.

f=0
function _draw()
f+=1
if f==8 then f=0
memcpy(0x2080,0x2000,2000)
for x=0,127 do
poke(0x2000+x,flr(rnd(8)))
end end
map(0,0,0,-8+f)
end
P#24180 2016-07-01 18:28 ( Edited 2016-07-01 22:28)
2

Cart #24185 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

press button 4

rectfill(0,0,140,140,3)
while 1 do a=1
if(btn(4))a=3
for i=0,a do
x,y=rnd(140),rnd(140)
circfill(x,y,a,pget(x,y)*a)
end 
end

123 characters I think

First thing I've ever made with pico 8, it was a lot of fun!

P#24186 2016-07-01 18:41 ( Edited 2016-07-01 22:41)

whoa mesmerizing O_O :D

P#24190 2016-07-01 19:27 ( Edited 2016-07-01 23:27)
4

Cart #24191 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

cls()for x=0,127 do
for y=0,127 do
s=0t=0
for i=1,19 do
u=s^2-t^2+x/60-1.6t=2*s*t+y/60-1s=u
if(s^2+t^2>4)pset(x,y,x^5/99-y/9)end end end
P#24192 2016-07-01 19:31 ( Edited 2016-07-01 23:31)

@lynn i think you win O_O

P#24194 2016-07-01 19:33 ( Edited 2016-07-01 23:33)

@lynn: WOW O_O

ok trying a more satisfying etchasketch config - exactly 140c

Cart #24196 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

cls()
x=9y=9t=0
function _draw()
if(btn(0))x-=1
if(btn(1))x+=1
if(btn(2))y-=1
if(btn(3))y+=1
t+=0.05
circfill(x%127,y%127,rnd(3),6+t%10)
end
P#24195 2016-07-01 19:34 ( Edited 2016-07-01 23:38)
1

x=0y=0::s::
if(btnp(4)) then cls()x=64y=64 end
x+=1-rnd(2)
y+=1-rnd(2)
a=10-rnd(20)
b=10-rnd(20)
line(x,y,x+a,y+b,rnd(16))
x+=a
y+=b
goto s
P#24200 2016-07-01 19:55 ( Edited 2016-07-01 23:58)

whoa

Cart #24202 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Experimented with some ideas I saw from PixzleOne, to sample existing screen pixels with pget(), this gives pretty interesting results! got some weird Dr. Mario colors going on here

EDIT:

whoops, here's the code:

::a::for i=1,99 do x=rnd(128)y=rnd(128)rect(x,y,x+2,y+2,pget(rnd(128),64)/.8)end
print('whoa',58,64,7)
flip()goto a

EDIT 2:

there was a redundant counter variable j, I've removed it from the code snippet because doesn't affect anything

P#24203 2016-07-01 20:03 ( Edited 2016-07-02 00:09)

whoa O_O

P#24204 2016-07-01 20:05 ( Edited 2016-07-02 00:05)
::a::
    pset(rnd(128),rnd(128),5+rnd(3))
goto a

this doesn't even deserve a cart but it's really effective static

P#24205 2016-07-01 20:35 ( Edited 2016-07-02 00:35)
1

Cart #24206 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Every day is a good day when you paint.

cls()
x=64y=64t=0::s::
t=rnd(.4)
x+=t-rnd(t*2)
y+=t-rnd(t*2)
x%=128
y%=128
circ(x,y,1,7+(x*y)*.00056%8)
print("bob ross",95,120,0)
goto s
P#24207 2016-07-01 20:45 ( Edited 2016-07-02 00:48)

@zero01101 can even be a one-liner!

::a::pset(rnd(128),rnd(128),5+rnd(3))goto a

@Overkill - i love how if you remove the seed "whoa" from the algo that it burns itself out really fast! that was weird + unexpected <3

P#24208 2016-07-01 20:49 ( Edited 2016-07-02 00:51)
1

Cart #24211 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I'm just getting started with Pico-8 and wanted to try this since everyone else was making such cool rainbowy things! (140 characters)

t=0 function _draw()cls() 
for y=40,140 do
for x=0,127 do
b=999/y*sin(.01*x-.05*t)pset(x,y+b*sin(.02*x-t),rnd(y*.02)+y/7) 
end end t+=.1 end
P#24213 2016-07-01 21:56 ( Edited 2016-07-02 01:59)
1

Cart #24217 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

River

t=10 r=127while 1 do for y=1,r do f=y/(256-rnd(t%50)) for x=1,r do p=pget(x+(f*t),y) pset(x,y,p-1) end end t+=.5 end

P#24218 2016-07-01 22:33 ( Edited 2016-07-02 02:33)
2

Cart #24222 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

t=1
while 1 do
t+=.000016
circ(64+cos(t)*50,64+sin(t/3)*50,1,15)
x=rnd(127)
p=pget(x,x)
if(p)then circ(x,y,rnd(4),p*.99) end
end
P#24223 2016-07-01 23:10 ( Edited 2016-07-02 03:10)
1

my first pico-8 thing, yay!

Cart #24225 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0 x=0 y=0
while true do
    t+=0.05 x+=1    y=0+sin((t+x)/128)*128
    pset(x%128,y%128,sin((y%x)/256)*4)
end

this jam is the best

P#24226 2016-07-01 23:48 ( Edited 2016-07-02 03:48)
1

Cart #24228 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I made bubble sort in 139 characters!

a={} for i=0,99 do a[i]=rnd()*99 end
function _draw()cls()for k=0,98 do
if (a[k]>a[k+1])t=a[k] a[k]=a[k+1] a[k+1]=t
line(k,0,k,a[k])end end
P#24229 2016-07-02 00:38 ( Edited 2016-07-02 04:38)
1

Cart #24231 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

POWER ORB - fun with polar coordinates! Every particle entity starts at a random angle with a fixed radius away from the center of the screen, and every frame decreases each the particle's radius. When a particle hits radius 0, it is removed. You can remove that del if you want stuff to cross through the origin, which looks kinda neat -- but I sorta liked having everything contained in a circle around the center.

t={}w=64::a::add(t,{w,rnd(),rnd(16)})for e in all(t)do
r=e[1]a=e[2]pset(sin(a)*r+w,cos(a)*r+w,e[3])e[1]=r-1
if(r<0)del(t,e)
end
flip()goto a
P#24232 2016-07-02 00:47 ( Edited 2016-07-02 09:08)

Cart #24233 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

GEM SLUG: you are a slug, you are hungry, you must collect gems. There is no scoring, and you more really slow. Also, to reduce code size on the randomization, the gems share the same x and y. Anyway, have fun!

(Unlike my previous 140-character game, this one resets itself "nicely" when you collide with the other object)

Controls: arrow keys = move

x=64y=64 a=x d=.5::l::pset(x,y,3)pset(a,a,9)b=btn
d*=-1
if(b(d+.5))x+=d
if(b(d+2.5))y+=d
if((a-x)^2+(a-y)^2<1)cls()a=rnd(99)+9
flip()
goto l
P#24234 2016-07-02 01:40 ( Edited 2016-07-02 05:43)
3

Cart #24238 | 2016-07-02 | Code ▽ | Embed ▽ | No License
3

Adding more waves to the ocean.

q=135 t=0::s::cls()t+=1 for x=0,q,9 do for y=0,q,9 do
a=x+5*sin((t+y-x)/q)b=a-x+y
for i=1,5 do circ(a,b,i,x+y+i+t)end
end end
flip()goto s
P#24240 2016-07-02 02:37 ( Edited 2016-07-02 06:37)

REFLEX MASTER: Press the button, quickly! Each button press counts towards your score, but your score resets when the time runs out. The difficulty increases slightly with each button, and eventually becomes impossible to win.

(A high score thing and better difficulty curve would nice, but with only 140 characters not much you can do.)

p=0::a::n=rnd(6)+1
t=70-p::b::flip()cls()t-=1
if(t>20 or t%2<1)print(sub('������',n,n)..' '..p)
if(btnp(n-1))p+=1 goto a
if(t>0)goto b
run()

Those characters are the button codes btw (LRUDOX), not sure if the BBS will display them. I noticed the pico-8 0.1.8 text editor's scrolling breaks with long lines of button code strings, and won't scroll the viewport to the right fully.

P#24241 2016-07-02 02:42 ( Edited 2016-07-02 06:42)

@Retronator - tip: You can swap variables much more easily in Lua:

a,b = b,a

No need for a temporary. :)

P#24242 2016-07-02 03:09 ( Edited 2016-07-02 07:09)
2

Cart #24243 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

cls()a={}::s::r=rnd
add(a,{x=r(128),y=r(99),u=r(6)-3,v=0})
for j in all(a)do
circ(j.x,j.y,1,j.u)
j.x+=j.u
j.y+=j.v
j.v+=.1
end
flip()
goto s
P#24244 2016-07-02 03:25 ( Edited 2016-07-02 07:25)

Animated water tiles. Fills an 8x8 tile with 1 bg color pixel + 1 white pixel every frame, to make a semi-convincing water tile. The logic done by sset could be useful for someone's top-down game if they don't want to draw a tile, just remove the color cycling on the bg color.

cls()t={12,6,9,15,14,11}memset(8192,1,4096)c=0::a::sset(rnd(8)+8,rnd(8),t[flr(c)%#t+1])sset(rnd(8)+8,rnd(8),7)
map()flip()c+=.005
goto a
P#24246 2016-07-02 03:29 ( Edited 2016-07-02 07:29)

I tried compressing Tron, but I ended up having to make it singleplayer and useless, and it still isn't even 140 characters. Oh well.

cls()
x=64 y=64 d=0
function _update()
if(btnp(0))d-=1
if(btnp(1))d+=1
if(d<0)d=3
if(d>3)d=0
if(d==0)x+=1
if(d==1)y+=1
if(d==2)x-=1
if(d==3)y-=1
if(pget(x,y)==8)cls()
end
function _draw()
rect(x,y,x,y,8)
rect(0,0,127,127,8)
end
P#24248 2016-07-02 04:25 ( Edited 2016-07-02 08:25)

Cart #24257 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I managed to do something slightly interactive.
Press Z to increase bubbles' radius.

t=0
r=1
::a::cls()
for y=0,128,8 do
for x=0,128,8 do
c=flr(rnd(16))circ(x,y,abs(5-sin(t)*r),c)end
end
t+=.01
if(btn(4))r+=.2
flip()
goto a
P#24258 2016-07-02 07:36 ( Edited 2016-07-02 11:39)
1

Cart #24270 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

This was small enough to tweet with #pico8 hashtag and a gif

t=0::s::z=cos(t)*32+40
t+=0.01
w=64
for y=-w,w do
for x=-w,w do
pset(x+w,y+w,bxor(x/z,y/z)%2+1)end end goto s
P#24271 2016-07-02 11:17 ( Edited 2016-07-02 15:17)

@kometbomb very mode7, delicious :D

P#24273 2016-07-02 11:29 ( Edited 2016-07-02 15:29)
2

Cart #24274 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

::s::
for i=0,3000 do
x=rnd(127) y=rnd(127)
c=pget(x,y)
if c>0 then
circ(x,y,1,8+(c+rnd(99)/98)%8)
end
end
flip()goto s
P#24276 2016-07-02 11:39 ( Edited 2016-07-02 15:39)

Cart #24277 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

x=64y=40q=0.25_=128r=-q::g::
if(btnp(0))r-=q
if(btnp(1))r+=q
x+=sin(r)
y+=cos(r)
if(pget(x%_,y%_)!=0)cls()
pset(x%_,y%_,8+4*r%8)flip()goto g

140/140

Building on from linky00's Tron idea. Replaced the edges with wraparound and also made the color cycle every time you make a turn.

P#24278 2016-07-02 12:03 ( Edited 2016-07-02 16:06)

cls()
x=3 y=3
function _update()
if(btn(0)) x=-1
if(btn(1)) x=x+1
if(btn(2)) y=y-1
if(btn(3)) y=y+1 
rect(64-x,64+y,64+x,64+y, rnd(16))
end
P#24281 2016-07-02 12:19 ( Edited 2016-07-02 16:19)
1

Cart #24282 | 2016-07-02 | Code ▽ | Embed ▽ | No License
1

No one can escape the grid. No one.

n=15
w=127
t=0::s::cls()t-=.5
for i=0,n do
z=(i*n+t%n)y=w*n/z+32
line(0,y,w,y,8)v=i+t%n/n-n/2
line(v*9+64,40,v*60+64,w,8)end
flip()goto s
P#24283 2016-07-02 12:24 ( Edited 2016-07-02 16:24)

@NuSan Color Battle is AWESOME!

P#24284 2016-07-02 12:31 ( Edited 2016-07-02 16:31)
1

Cart #24285 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0 while true do   cls() t+=0.002 for i=0,128 do   x=sin(t)*128 y=-x z=sin(t+y/128)*64+(i+x)%128 rect(z,z,128-i,(i+x)%128,i/8) end flip() end

Cart #24286 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0 while 1 do cls(0) t+=.01    for i=0,127 do x=sin(t+i/32)*7 y=cos(t+i/96)*128    line(y*i+x,(i+y)%128,(128-i-y)%128,(i+x)%128,i/13) end flip() end

Cart #24287 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0 while true do   cls()   t+=.002 for i=0,127 do  x=sin(t)*128    y=-x    line((i+x)%128,(i+y)%128,(128-i-y)%128,(i+x)%128,sin(t+i/8)) end    flip() end

and here's a bonus failed one which i couldn't shrink enough & still have it looking how i wanted..

Cart #24288 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

t=0
while true do
    cls(0)
    t+=0.002
    for i=0,127 do
    x=sin(t)*128
    y=cos(t)*128
        if i%6<2 then
        rect((sin(t+y/128)*64)+(i+x)%128,(cos(t+x/128)*64)+(i+y)%128,(128-i-y)%128,(i+128+x)%128,5+(i/16)%3)
        end
        line((sin(t+y/128)*64)+(i+x)%128,(cos(t+x/128)*64)+(i+y)%128,(128-i-y)%128,(i+128+x)%128,7+(i/8)%8)
    end
    flip()
end
P#24289 2016-07-02 13:02 ( Edited 2016-07-02 17:02)

Cart #24290 | 2016-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

fireball effect

r=rnd::s::n=128
for i=0,n do x=1
for j=0,n do c=pget(i,j)
if(c>0)pset(i+r()-.5,j+r()-.5,c/2)x=_
end
if(x)circfill(r(n),r(n),7,9)
end
goto s
P#24291 2016-07-02 13:38 ( Edited 2016-07-02 17:38)
Page:

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-19 04:05:49 | 0.109s | Q:198