A downloadable project

Pocket Game Jam #2 de Gamecodeur -  Gifboy.io

Gifboy Firework


Après le bombardement de populations innocentes, puis la pulvérisation de paisibles vaches, voici donc ma 3ème participation, plus pacifique, à une game jam de Gamecodeur.

Malheureusement, la limite du nombre de caractères pour le script LUA (mais s'il n'y en avait pas, ça ne serait pas drôle), m'a obligé à pratiquer une chasse au gaspillage de caractères superflus, plombant la compréhensibilité du script.  Donc, si besoin, n'hésite pas à m'envoyer tes questions...

Un grand merci à Gifboy pour son travail, et surtout pour ses dernières mises-à-jour qui m'ont permis d'augmenter significativement, le nombre de particules présentes dans l'animation.

Gifboy

Toutes ces animations ont été faites avec le script ci-dessous, en modifiant uniquement le randomseed et les 5 couleurs de la palette utilisées.

----

Suite à une fausse manip, le script n'est, pour l'instant, plus téléchargeable sur le site. Cependant, Il est disponible un peu plus bas. Attention, si tu y vois un feu d'artifice à la place de lignes de code, c'est que tu es l'élu.


StatusReleased
CategoryOther
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorGl0bul

Download

Download
gifboy-firework-globul20201027x1.gif 2.1 MB
Download
gifboy-firework-globul20201027x2.gif 4.4 MB

Install instructions

maxframes(999) math.randomseed(3) r=math.random fl=math.floor ti=table.insert tr=table.remove cf=circlefill pt=point pl=palette al=alpha local pb=15 local ps=90 local pg=12 local ph=5 local lb={} local lg={} local ls={} local bg=0 local c={1,2,3,4,5,6,8,9,10,11,12,13,14,15} local gd={} local gc={} gc[0]={1,2,3,4,16,17,24,38,41,42,43,44,45,52,53,54,55,56,57,58,59,63,64,65,66,67,68,69,73,74,75,76,77,78,79,80,81,82,86,87,88,89,90,96,106,108,109,110,111,112,113,114,115,116,117} gc[1]={0,15,18,24,25,37,38,40,51,62,70,73,83,85,96,106,108,118} gc[2]={0,15,18,24,26,36,38,40,51,61,71,73,83,85,96,106,108,118} gc[3]={0,14,19,24,27,35,38,40,51,61,71,73,83,85,96,106,108,118} gc[4]={0,9,13,20,24,28,34,38,40,41,42,43,44,45,46,47,48,51,61,71,73,83,85,86,87,88,89,90,91,92,96,106,108,109,110,111,112,113,114,115,116,117} gc[5]={0,9,13,14,15,16,17,18,19,20,24,29,33,38,40,51,61,71,73,83,85,96,106,108,112,113} gc[6]={0,9,12,21,24,30,32,38,40,51,62,70,73,83,85,97,105,108,114,115} gc[7]={1,2,3,4,5,6,7,8,9,11,22,24,31,38,41,42,43,44,45,46,47,48,49,52,53,54,55,56,57,58,59,63,64,65,66,67,68,69,73,74,75,76,77,78,79,80,81,82,86,87,88,89,90,91,92,93,94,98,99,100,101,102,103,104,108,116,117} for i=1,14,1 do    n=r(1,6) if n==1 then c1,c2,c3,c4,c5,c6=128,255,0,128,0,128 end if n==2 then c1,c2,c3,c4,c5,c6=0,128,128,255,0,128 end if n==3 then c1,c2,c3,c4,c5,c6=0,128,0,128,128,255 end if n==4 then c1,c2,c3,c4,c5,c6=128,255,128,255,0,128 end if n==5 then c1,c2,c3,c4,c5,c6=0,128,128,255,128,255 end if n==6 then c1,c2,c3,c4,c5,c6=128,255,0,128,128,255 end pl(c[i],r(c1,c2),r(c3,c4),r(c5,c6)) end for i=1,pb,1 do b={} b.x=80+r(-5,5) b.y=160 b.i=r(-4,4)/10 b.j=r(-400,-350)/100 b.v=80+r(15,25)-fl(b.j*5) b.w=r(10,20)*i b.c=i%14+1 ti(lb,b) end for j=0,7,1 do for i=1,len(gc[j]),1 do ti(gd,{y=j,x=gc[j][i]}) end end function draw() clear(bg) bg=0 for k=len(lg),1,-1 do g=lg[k] g.v=g.v-1 if g.r>1 then al(g.v/100) cf(g.x,g.y,g.r,c[g.c]) else al(g.v/5) pt(g.x,g.y,c[g.c]) end if g.v<0 then tr(lg,k) end end al(1) for i=len(lb),1,-1 do b=lb[i] b.w=b.w-1 if b.w<=0 then ti(lg,{x=fl(b.x),y=fl(b.y),c=b.c,v=pg,r=2}) b.x=b.x+b.i b.y=b.y+b.j b.j=b.j+0.05 b.v=b.v-1 cf(fl(b.x),fl(b.y),2,c[b.c]) cf(fl(b.x),fl(b.y),1,7) if b.v<0 then for j=1,ps,1 do t=50+r(30,60) ti(ls,{x=b.x+r(-2,2),y=b.y+r(-2,2),i=r(-100,100)/r(100,300),j=r(-100,100)/r(100,300),c=b.c,v=t,w=t,d=0}) end bg=c[b.c] tr(lb,i) end end end for i=len(ls),1,-1 do p=ls[i] if p.d~=1 then ti(lg,{x=fl(p.x),y=fl(p.y),c=p.c,v=ph,r=1}) p.x=p.x+p.i p.y=p.y+p.j p.j=p.j+0.01 al(1) pt(fl(p.x),fl(p.y),7) if p.d==0 and ig(fl(p.x)-20,fl(p.y)-76)==1 then p.d=1 p.v=r(340,350) end else al(r(3,10)/10) pt(fl(p.x)+r(-1,1),fl(p.y)+r(-1,1),c[p.c]) pt(fl(p.x),fl(p.y),7) end p.v=p.v-1 if p.v<=0 and p.d==1 then p.v=r(20,40) p.d=-1 end if p.v<=0 or p.y>=160 then tr(ls,i) end end if len(lb)==0 then if len(ls)==0 then stop() else if len(gd)>0 then s=r(1,len(gd)) ti(ls,{x=gd[s].x+20,y=gd[s].y+76,i=r(-10,10)/15,j=r(-10,10)/15,c=r(1,5),v=220,w=220,d=1}) tr(gd,s) end end end if len(lb)==0 and len(ls)==0 then stop() end end function ig(x,y) for i=len(gd),1,-1 do if gd[i].x==x and gd[i].y==y then tr(gd,i) return 1 end end return 0 end

Leave a comment

Log in with itch.io to leave a comment.