̬̬̬̈̬̬̬̬̈̬̬̬̬̬̪쬪̬̬̬̪쬪 >?0 @ 0 @0`0  gP@̀@ 0@  ސP P 0`P0pwPp` r`@```  @0pPp% pҳ PpP@ p  P0a0 x``0а @ ΠPPAgpUppf r0Pss` ` `'@FEᰀP  P```@   p800xP '@'  ppР`  @ӇGఀ@`  J V@p0F @& 8]  q`@fx PP'4PuР00 P c͡P @pР @ p p`P` E`Y  p6p@8޶ PȺ`x ` ``c@p  W 8p0` P p pPǠ Wh0   P@P&P@P0@ h ES'`0 3x. '@P# 'Dp@   @ x#PpVH P7`H p`x`C@ `  G07 kE,4`P u0 p 80ip 6` @p`+ P p 0@` 0 `0 ;ǥ G@0 p pR p`P PP 0W޼ p5 @`@ @PPްp F ``p0ЀP #h pp uH `@`p (0  &P5I3 B P7g: @FWE`;(G0 p }Ph4' w 0j 0p`p`0xP4q 0P @'pp ` Q P Pi @p`PP ЈVͦx`P@ BP @@0fpǛU0 hs<`  p 0P`Pʹ@P  ``% p0 < p%ěx p P@ ` `p0 ` n)Wrvg@% V` P˫ x`P0 $D# @#d(G0V ज़!S` S4`0 @@ xEsWv @P V S&xͺ@V0Y4 Pp` p Ѐ VE*sp h WP`` P @@p0 Vx޼ h  ( :  `P nxp5t  a0%` pPK@0Л`Pp@6Pp gK; 漊F   `P @ p] Pv5pP( e 0 xVxʹ0pͫYc HGX`p`@p P "aPPWUNsP     00 :#@`0xVCPr `P 0Q p nD0Լ`$; qp 0`@p@`gg׌DP p`@  0@ @ nV@9  @ 0 @p0 8 0~fzS h@ {4  P Pp  x&@x Va `  `@xVxvp|U@ p ~ 0 `P^p IP4 %@0ps E pތ$E1 p`@͋ 5m1 P  P [` S gS9}W0 | `pPP VpVL)`E'V@D9`@ 0 p@p0 @ |0 d(s@`@F` 8 0 0 x K ` l L0E3w  @PpP g!@P n\P@0ف6p!@`0UP6@ЉVu0ptPP@ P  0p  p`ަ0V 0ZA  '0 0pi`@V` Gp xͻ @2 Q   PH@0p޷ތa`Pp fs0PP Np,p`w^< @0`  p @pEp`   b 00Ѐq@6EF E[p@c    @pp g ;g}^g"H ;\p`@PpQ P D:Ȱz:E`^P `0 :@FxYE@v-`h0% 0@     c0 p@`0P`@ plklg\@3%ptp@  pb0 pkP ~Pp` P`p   U pxRy `g0@PP@ .p`p:~` ` pp ` Ͱv`B1%p  =  pt v^(!x`\#0   F0Up;  lLP0P 0]@3耼UdS    `pp  KL< u `p0%  ` U竘ty[2p 7 pP` p\ ʋ@@p  PP |Nzp~caP ` ``@ `  0ba`0s 0@ iBgRr& @ P 0P= pf|Pc#Q0S pp``p p0   PPA> @W    `p`J u PP @ `)0] +J  `Ppp@: -- title: Ball -- author: g0blinish -- desc: 1st place at Chaos Constructions 2024 -- site: website link -- license: MIT License (change this to your license of choice) -- version: 0.1 -- script: lua --font definition fo={ 0,0,0,0,0,0,0,0, 0,32,112,240,112,32,0,0, 0,32,80,32,80,32,80,32, 80,80,112,80,80,48,16,16, 224,128,192,176,160,48,32,32, 96,128,96,0,48,32,48,32, 128,128,128,224,48,32,48,32, 0,112,80,80,112,0,0,0, 0,32,112,32,0,112,0,0, 144,208,176,144,32,32,32,48, 160,160,160,64,48,16,16,16, 32,32,32,224,0,0,0,0, 0,0,0,224,32,32,32,32, 0,0,0,48,32,32,32,32, 32,32,32,48,0,0,0,0, 32,32,32,240,32,32,32,32, 0,112,0,0,0,0,0,0, 0,0,112,0,0,0,0,0, 0,0,0,112,0,0,0,0, 0,0,0,0,112,0,0,0, 0,0,0,0,0,112,0,0, 32,32,32,48,32,32,32,32, 32,32,32,224,32,32,32,32, 32,32,32,32,240,0,0,0, 0,0,0,0,240,32,32,32, 32,32,32,32,32,32,32,32, 0,16,32,64,32,16,112,0, 0,64,32,16,32,64,112,0, 0,240,80,80,80,80,0,0, 0,16,240,32,240,64,0,0, 48,64,224,64,112,208,64,0, 0,0,0,32,0,0,0,0, 0,0,0,0,0,0,0,0, 0,64,64,64,64,0,64,0, 0,160,160,0,0,0,0,0, 0,160,224,160,160,224,160,0, 64,64,160,64,32,160,64,64, 0,160,32,64,64,128,160,0, 64,160,64,160,160,192,96,0, 0,64,64,0,0,0,0,0, 0,32,64,64,64,64,32,0, 0,128,64,64,64,64,128,0, 0,160,64,224,64,160,0,0, 0,64,64,224,64,64,0,0, 0,0,0,0,0,64,64,128, 0,0,0,224,0,0,0,0, 0,0,0,0,0,64,64,0, 0,32,32,64,64,128,128,0, 0,64,160,224,160,160,64,0, 0,64,192,64,64,64,224,0, 0,64,160,32,64,128,224,0, 0,224,32,64,32,160,64,0, 0,32,96,160,224,32,32,0, 0,224,128,192,32,160,64,0, 0,96,128,192,160,160,64,0, 0,224,32,32,64,64,64,0, 0,64,160,64,160,160,64,0, 0,64,160,160,96,32,192,0, 0,0,64,0,0,64,0,0, 0,0,64,0,0,64,128,0, 0,0,32,64,128,64,32,0, 0,0,224,0,224,0,0,0, 0,0,128,64,32,64,128,0, 0,64,160,32,64,0,64,0, 0,64,160,160,128,128,96,0, 0,64,160,160,224,160,160,0, 0,192,160,192,160,160,192,0, 0,64,160,128,128,160,64,0, 0,192,160,160,160,160,192,0, 0,224,128,224,128,128,224,0, 0,224,128,224,128,128,128,0, 0,64,160,128,160,160,64,0, 0,160,160,224,160,160,160,0, 0,224,64,64,64,64,224,0, 0,32,32,32,32,160,64,0, 0,160,160,192,160,160,160,0, 0,128,128,128,128,128,224,0, 0,160,224,160,160,160,160,0, 0,32,160,224,224,160,128,0, 0,64,160,160,160,160,64,0, 0,192,160,160,192,128,128,0, 0,64,160,160,160,192,96,0, 0,192,160,160,192,160,160,0, 0,64,160,64,32,160,64,0, 0,224,64,64,64,64,64,0, 0,160,160,160,160,160,224,0, 0,160,160,160,160,160,64,0, 0,160,160,160,160,224,160,0, 0,160,160,64,160,160,160,0, 0,160,160,64,64,64,64,0, 0,224,32,64,64,128,224,0, 0,96,64,64,64,64,96,0, 0,128,128,64,64,32,32,0, 0,192,64,64,64,64,192,0, 0,64,160,0,0,0,0,0, 0,0,0,0,0,0,0,240, 0,128,64,0,0,0,0,0, 0,0,192,32,96,160,96,0, 0,128,128,192,160,160,192,0, 0,96,128,128,128,96,0, 0,32,32,96,160,160,96,0, 0,0,64,160,224,128,96,0, 0,32,64,224,64,64,64,0, 0,0,96,160,160,96,32,192, 0,128,128,192,160,160,160,0, 0,64,0,192,64,64,224,0, 0,32,0,96,32,32,32,192, 0,128,128,160,192,160,160,0, 0,64,64,64,64,64,64,0, 0,0,160,224,160,160,160,0, 0,0,192,160,160,160,160,0, 0,0,64,160,160,160,64,0, 0,0,192,160,160,192,128,128, 0,0,96,160,160,96,32,32, 0,0,96,128,128,128,128,0, 0,0,96,128,64,32,192,0, 0,64,64,224,64,64,64,0, 0,0,160,160,160,160,224,0, 0,0,160,160,160,160,64,0, 0,0,160,160,160,224,160,0, 0,0,160,160,64,160,160,0, 0,0,160,160,160,96,32,192, 0,0,224,32,64,128,224,0, 32,64,64,128,64,64,32,0, 64,64,64,0,64,64,64,0, 128,64,64,32,64,64,128,0, 0,0,192,96,0,0,0,0, 0,0,0,0,0,0,0,0, } --scrolly ts=" Greetings to CC24 Visitors! Welcome to Demoscene World. Feel, Touch and Enjoy Spirit" tp=1 t_dx=0 bw0=128 --setup palette for i=0,15 do poke(0x3fc0+i*3,i*17) poke(0x3fc1+i*3,i*17) poke(0x3fc2+i*3,i*17) end poke(0x3fed,224) poke(0x3fee,224) poke(0x3fef,0) --variables c=math.pi/180 bx={} by={} bz={} r=65 ci=0 ax=0 ay=0 az=0 ma=0 --scrolly s={} for i=0,255 do s[i]=math.floor(20+20*math.sin(i*math.pi/128)) end a0=0 --rasters dr=0.7 ras={ 0x10/dr,0x20/dr,0x30/dr,0x40/dr,0x50/dr,0x60/dr,0x70/dr, 0x60/dr,0x50/dr,0x40/dr,0x30/dr,0x20/dr,0x10/dr, } ra=0 ry=0 rl1={} rl2={} --precalc XYZ for t=-90,90,10 do for p=0,360,9 do bx[ci]=math.floor(r*math.cos(t*c)*math.cos(p*c)) by[ci]=math.floor(r*math.cos(t*c)*math.sin(p*c)) bz[ci]=math.floor(r*math.sin(t*c)) ci=ci+1 end end function ro(v1,v2,an) return v1*math.cos(an*c)+v2*math.sin(an*c) end --zero memory $8000,16320 memset(0x8000,0,16320) function TIC() --copy buffer memcpy(0,0x8000,16320) --raster move-- for i=0,15,1 do ry=math.floor(0.5+64+64*math.sin((ra-i*10)*c)) for j=0,15,1 do if rl1[j+ry]==0 then rl1[j+ry]=ras[j] if i>8 then rl2[j+ry]=ras[j] rl1[j+ry]=0 end end end end ra=(ra+2)%360 -- x0=120+60*(math.cos(ma*2*c)) y0=68+34*(math.sin(ma*c)) ma=(ma+1)%360 for i=0,778 do x=bx[i] y=by[i] z=bz[i] -- x1=x*math.cos(az*c)-y*math.sin(az*c) x1=ro(x,-y,az) -- y1=y*math.cos(az*c)+x*math.sin(az*c) y1=ro(y,x,az) z1=z x=x1 y=y1 -- x1=x*math.cos(ay*c)-z*math.sin(ay*c) x1=ro(x,-z,ay) y1=y -- z1=z*math.cos(ay*c)+x*math.sin(ay*c) z1=ro(z,x,ay) x=x1 y=y1 z=z1 x1=x -- y1=y*math.cos(ax*c)+z*math.sin(ax*c) y1=ro(y,z,ax) -- z1=z*math.cos(ax*c)-y*math.sin(ax*c) z1=ro(z,-y,ax) if z1>0 then cl=14 else cl=8 end rect(x1+x0,y1+y0,1,1,cl) end ax=(ax+1)%360 ay=(ay+1)%360 az=(az+2)%360 --fade for i=0,0x3fbf do fa=peek(i) if fa&15~=0 then fa=fa-1 end if fa&240~=0 then fa=fa-16 end poke (i+0x8000,fa) --poke (i,0) end --scrolly aa=a0 tt=tp bw=bw0 for sx=0,239,1 do ty=20+s[(aa+sx)&255]+s[(a0+sx)&255] tc=string.byte(string.sub(ts,tt,tt+1)) aa=aa+1 for py=0,8,1 do if bw&fo[tc*8+py]~=0 then pix(sx,py*2+ty,15) pix(sx,py*2+ty+1,15) end--bw&fo[tc*8+py]~=0 end--for py if sx&1~=0 then bw=bw>>1 if bw==8 then bw=128 tt=tt+1 if tt>string.len(ts) then tt=1 end--tt>string.len(ts) end--if bw=8 end-- if sx&1~=0 end--for sx --shift-- bw0=bw0>>1 if bw0==8 then bw0=128 a0=(a0+3)&255 tp=tp+1 if tp>string.len(ts) then tp=1 end--tt>string.len(ts) end --end draw,next frame a0=(a0+2)&255 end -- of TIC()