],]']>S}Wup8d%qy)6o;]AsVl3S}Wup8d%qy)6o;]AsVl P2TvͫgE#2Tv2Tvևck  OD_____ooooofݯݭݪݭݪݭݪ}w}www}wwwww}wwwwwww ݭݪݭݪݭݪ}w}www}wwwww}wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww=3=333=33333=3333333333333333333333333333333333333ݝݙݝݙݝݙٙٙٙٙ  3 5 67888999::::;;;<<<=======>>?7`:0= >?????????????????????????? 6 7789:<=>>????????????????????OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH A AA!!!55 `  " " " " " " " HHDiHIHH)@i HHh$DIHHIHiHIHDiHHiHIHHHIhHIHihH)@i@I Hi$@h$@@i$@2@PP@PP?ffffffffUllfdfelfclfffffFfffdfl,fffflfff&ffff&f,`lfoflffffffff`ffffln\fffffffffUfelfdfffclfffffFfffd,flffllffff&f"f foflflfffffffff`fln\fffffffffeff\lfFffLfcffflfffffdLcd,ffaf,ffff&f"f,`flfffffffff`flnf\lffffffffffffefffffcfdfffffdLcd&ff (fx_length-fade_length) then for i=1,15*3 do poke(0x3fc0+i-1,lerp(blk[i],sw16[i],(fx_length-t)/fade_length)) end end end function fadesm(t) if t < fade_length then for i=1,15*3 do poke(0x3fc0+i-1,lerp(blk[i],matrixp[i],t/fade_length)) end elseif t > (fx_length-fade_length) then for i=1,15*3 do poke(0x3fc0+i-1,lerp(blk[i],matrixp[i],(fx_length-t)/fade_length)) end end end -------------------------- function plasma() local bgcolor = 6 -- border color poke(0x3FF8,bgcolor) --cls(bgcolor) local t = time() - time_init + acc fades(t) for y=0,136 do for x=0,240 do pix(x,y,(x//6+t/100+math.sin(t/1000+y/30)*10)%5+5+math.sin(x%3-y)*10%3) end end end ------------------------- function pipes() local bgcolor = 7 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) for y=1,136,15 do for x=-15,239,16 do local rot = (t/9000+math.sin(x-120+y)*6+math.sin(y-x)*8) spr((rot%2//1)*2+33,(x+t//30)%255-16,y,13,1,0,(rot/10%4)*90,2,2) --rect(x,y,16,15,(t/9000+math.sin(x-120+y)*6+math.sin(y-x)*8)%5+7) end end end -------------------------- function tang() local bgcolor = 0 poke(0x3FF8,bgcolor) --cls(bgcolor) local t = time() - time_init + acc fades(t) for y=0,136 do for x=0,240 do pix(x,y,((x/5.25+t*.0001)%136*(y/5.7-268))%16) end end end -------------------------- function triangles() local bgcolor = 12 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) for y=-1,9 do for x=-15,239,16 do local rot = (t/90000+math.sin(x-120+y)*6+math.sin(y-x)*8) spr((rot%3//1)*2+8,(x+(t//30)*(y%2*2-1))%256-16,(y*16+math.sin(t/1000)*16),13,1,0,(rot/10%4)*90,2,2) end end end --------------------------- function ice_crackle() local bgcolor = 13 poke(0x3FF8,bgcolor) --cls(bgcolor) local t = time() - time_init + acc fades(t) for x=0,240 do for y=0,136 do pix(x,y,math.sin(y*.1+t/600+math.sin(t/1200)*2)*2-math.cos(t/1200+x*.005+(x~y)//1)*2%3+13) end end end --------------------------- function petal_tunnel() local bgcolor = 0 poke(0x3FF8,bgcolor) --cls(bgcolor) local t = time() - time_init + acc fades(t) for x=0,240 do for y=0,136 do pix(x,y, math.sin(y*.1+t/600+math.sin(t/1200)*2)*(math.sin(t/1100)*2+1) -math.cos(t/1200+x*.005+(x~y)//1)*2%3+3 +math.sin(math.atan(x-120,y-66)*7+t/1200)*(math.cos(t/2200)*3+3) ) end end end -------------------------- function sinusoidal() local bgcolor = 12 poke(0x3FF8,bgcolor) --cls(bgcolor) local t = time() - time_init + acc fades(t) local tt=t/800 for i=0,239 do local y1=30+math.sin(i*2+tt)*20 local y2=106+math.sin(i*2-tt)*20 line(i,0,i,y1,bgcolor) line(i,y1,i,y2,13) line(i,y2,i,192,bgcolor) end end --------------------------- function stranded() local bgcolor = 6 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) for i=1,13 do local max=3 for k=0,80 do local y = (i*15+(t/36)+math.sin(t/600+(k-7))*4)%146-10 --if (k%2 == 0) then rect(k*max,y,max,8,7) --else -- rect(k*32,126-y,32,8,1) --end end end end --------------------------- function radial_lines() local bgcolor = 10 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local NLINES = 200 local PI = 3.14159265359 for ray=1,NLINES do theta = 2 * ray * PI/(NLINES) - t/2000 power = 1100*(.07+math.sin(ray+t/800)*.05) line(120+power*math.cos(theta+1)*.5, 68+power*math.sin(theta)*.5, 120+power*math.cos(theta), 68+power*math.sin(theta), ray%4+12) end end --------------------------- function dandelions() local bgcolor = 6 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local sin=math.sin local cos=math.cos local max=math.max local min=math.min local rnd=math.random local atan2=math.atan2 local abs=math.abs t = t//15 for k=-8,9,2 do l=t+10*k for i=0,260,5 do for ta=1,4 do j=l+ta circ(i+3*sin(i)+8*sin(i/12+t/50)-k*15-4*ta, i/2-8*abs(sin(i+ta*8+(j+7)/30)) -3*abs(sin(i))+5*sin(i/12+t/50)+k*7.5+2*ta, 2,12) line(i+3*sin(i)+8*sin(i/12+t/50)-k*15-4*ta, i/2-8*abs(sin(i+ta*8+(j+7)/30)) -3*abs(sin(i))+5*sin(i/12+t/50)+k*7.5+2*ta, i+3*sin(i)+5*sin(i/12+t/50)-k*15-4*ta, i/2+3*sin(i)+5*sin(i/12+t/50)+k*7.5+3*ta, ta+k+4) end end end end --------------------------- function structure() local bgcolor = 5 poke(0x3FF8,bgcolor) if dirty == true then cls(bgcolor) dirty = false end local t = time() - time_init + acc fades(t) local tt = t/1000 local bcols = {12, 5, 6, 5} local s_size = 1.2 + math.sin(0.37 * tt) * 0.4 -- background local ampl = 2 local thw, thh = 32, 16 local trindex = 0 for y = 0, 152, 16 do for x = 0, 256, 16 do local c = bcols[(trindex % #bcols)+1] local i = (x + y * 240 * 0.2) + tt local px = x + math.cos(i)*ampl local py = y + math.sin(i)*ampl trib( px-thw, py-thh, x+thw, y-thh, px, py+thh, c) trindex = trindex + 1 end end end --------------------------- function organic() local bgcolor = 8 poke(0x3FF8,bgcolor) if dirty == true then cls(bgcolor) dirty = false end local t = time() - time_init + acc fades(t) local tt = t/500 local bcols = {1, 3, 2, 8} local s_size = 1.2 + math.sin(0.37 * tt) * 0.4 -- background local ampl = 2 local thw, thh = 12, 26 local trindex = 0 for y = 0, 152, 16 do for x = 0, 256, 16 do local c = bcols[(trindex % #bcols)+1] local i = (x + y * 240 * 0.2)*2 + tt local px = x + math.cos(i)*ampl local py = y + math.sin(i)*ampl*4 trib( px-thw, py-thh, x+thw, y-thh, px, py+thh, c) trindex = trindex + 1 end end end --------------------------- function hexcode() local bgcolor = 0 poke(0x3FF8,bgcolor) local t = time() - time_init + acc fades(t) local tt = t//100 cls(bgcolor) math.randomseed(2) for y=0,16 do for x=2,22 do numb = string.upper(string.format("%x", 16+math.random(239))) print(numb,((x+(tt))*12+y%2*6)%252-12,1+y*8,13,1,1,true) end end for x=0,51 do local w=math.random()*70+30 local h=math.random()*20+10 local posx=(math.random()*240+(t/w*4)*x/20)%(240+w+x)-w local posy=math.random()*(136+h)-h local col=math.random()*2+math.cos(t/2000)*2+5 clip(posx,posy,w,h) for i=posx,posx+w do circ(i,posy+i//1%h,w/(col+16),col+i/300) end clip() end end --------------------------- function teeth_strip(ty1,ty2,th,nt,c) -- bar below teeth tri(0,ty1,0,ty1+th,240,ty2,c) tri(0,ty1+th,240,ty2,240,ty2+th,c) for i=0,nt do local posx = (i/nt)*240 local posy = ty1-th+1+(ty2-ty1)*i/nt tri(posx-th,posy+th,posx,posy,posx+th,posy+th,c) end end function sun() local bgcolor = 4 poke(0x3FF8,0) cls(bgcolor) local t = time() - time_init + acc fades(t) local posx = 55 local posy = 30 for i=2,10 do local ori = ((i%2)*2)-1 for ang=0,math.pi*2,math.pi/8 do circ(posx+math.cos(ang+t/2000*ori)*25*i,posy+math.sin(ang+t/2000*ori)*20*i,(i+1)*5,i%3+10) end end rect(0,110,240,30,6) teeth_strip(100,108,10,22,5) teeth_strip(104,116,10,22,6) end --------------------------- function bit() local bgcolor = 0 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt = t//32 for x=0,40 do for y=0,22 do local col=math.cos(math.abs(x-20)-math.abs(y-10)*tt*0.1)%3+2 rect(x*6,y*6,6,6,col) end end end --------------------------- function checked() local bgcolor = 3 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt=t/128 for x=-5,20 do for y=0,14 do rect(x*9+50,y*9,9,9,((x+y)%2)*12+7) local defx = math.floor(math.sin(tt)/(y+1))%2 local defy = math.floor(math.sin(tt+x)/(y+1))%2 rect(x*9+51+5*defx, y*9+1+5*defy,2,2, ((x+y+1)%2)*12+7 ) end end end --------------------------- function checked2() local bgcolor = 3 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt=t/128 for x=-5,20 do for y=0,14 do rect(x*9+50,y*9,9,9,((x+y)%2)*12+7) local defx = math.floor(math.sin(tt+y)/(y+1))%2 local defy = math.floor(math.sin(tt)/(y+1))%2 rect(x*9+51+5*defx, y*9+1+5*defy,2,2, ((x+y+1)%2)*12+7 ) end end end --------------------------- function the() local bgcolor = 0 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local s=t/1e4+1 for i=0,1e5 do local a=i%136 local d=i%241 local m=a-s*2 pix(d,a,(((d*d+a*a)//241~(d*d+m*m)//241)%2)*12) end end --------------------------- function rectangles() local bgcolor = 15 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt=(t+10000)//32 math.randomseed(12) for x=0,50 do local w=math.random()*70+30 local h=math.random()*20+10 local posx=(math.random()*240+w+tt*(x+3)/20)%(240+w+x+3)-w local posy=math.random()*(136-h) local col=math.random()*10+1 rect(posx-1,posy-1,w+2,h+2,0) rect(posx,posy,w,h,col) end end --------------------------- function scanline_blocks() local bgcolor = 8 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) for y=-1,9 do for x=-15,239,32 do local rot = (t/90000+math.sin(x-120+y)*6+math.sin(y-x)*8) spr((rot%2//1)*2+64,(x+(t//30)*(y%2*2-1))%272-32,y*32,13,2,0,(rot/10%4)*90,2,2) end end for y=1,136,2 do line(0,y,240,y,bgcolor) end end --------------------------- function plasma_height() local bgcolor = 0 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt = t/1000 for x=-80,80,1.5 do for z=-40,40,.5 do local y=(math.sin(x/9-tt)*2 +math.cos(x/30-tt)*4 +math.sin(z/8))/7 local u=64+x*4+z*8 local v=64+x*2-z*2-y*12 pix(u,v,(y*5)%3+8) end end end --------------------------- function bit_rect() local bgcolor = 12 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt = t//32 local col=0 for x=0,40 do for y=0,22 do col=math.cos(math.abs(x-20)-math.abs(y-10)*tt*0.01)%2+11 rect(x*6,y*6,(x~y)%2+2,(x~y+6)%3+1,col+1) end end end --------------------------- function bit_green() local bgcolor = 7 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) local tt = t//32 for x=0,40 do for y=0,22 do local col=math.cos(math.abs(x-20)-math.abs(y-10)*tt*0.1)%2+5 circ(x*6,y*6,(x~y)%3,col) end end end --------------------------- function xor_slide() local bgcolor = 0 poke(0x3FF8,bgcolor) cls(bgcolor) local t = time() - time_init + acc fades(t) for x=0,240 do for y=0,192 do pix(x,y,math.sin(y*.15+t/600)*2+8+((x~y-t//60))%12//4) end end end --------------------------- local fx = { xor_slide, organic, structure, sun, dandelions, plasma, hexcode, pipes, tang, triangles, ice_crackle, petal_tunnel, sinusoidal, stranded, radial_lines, the, checked, checked2, --bit, rectangles, scanline_blocks, plasma_height, bit_rect, bit_green, } local duplo_text = { {"",""}, { "Demoscene", "Report" }, { "hello everyone", "how are you doing?" }, { "(almost) every week", "a concise summary" }, { "all the latest news", "links, releases" }, { "demoparty results", "tool updates" }, { "lets talk demoscene!","youtube.com/psenough" }, { "bla bla bla and dont", "forget to subscribe" }, { "text will now", "loop ..." } } -- start the music music(0) function TIC() -- push forward time accumulator local rowhit = false local row = peek(0x13FFC+2) if rowhit == false and ((row == 5) or (row == 24)) then rowhit = true acc = acc+100 else rowhit = false end -- switch to visual bank 0 (background) vbank(0) -- hide mouse cursor poke(16379,1) -- rotate scenes local sc = (time()//fx_length)%#fx if sc ~= prev then prev = sc time_init = time() acc = 0 dirty = true end -- play scene selected fx[sc+1]() -- switch to visual bank 1 (front) vbank(1) cls() --print(acc) size = 2 qtop = 37--+math.sin(time()/1000)*5 lpad = 1--+math.sin(time()/900)*5 local hpad = 16 local idx = (time()//(fx_length*2.5))%#duplo_text + 1 local col2=8 -- calculate length of print offcreen local l1=(240-print(duplo_text[idx][1],0,-20,col2,2,size))/2+lpad -- print with border printr(duplo_text[idx][1],l1,qtop+hpad,col2,2,size) local l2=(240-print(duplo_text[idx][2],0,-20,col2,2,size))/2+lpad printr(duplo_text[idx][2],l2,qtop+hpad*2,col2,2,size) -- printr(text1,240-time()/15,20,col2,2,1) col2=12 print(duplo_text[idx][1],l1,qtop+hpad,col2,2,size) print(duplo_text[idx][2],l2,qtop+hpad*2,col2,2,size) -- print(text1,240-time()/15,20,12,2,1) -- print sprite on corner -- id,x, y, colorkey, -- scale,flip,rot -- w,h spr(3,217,129,13,1,0,0,3,1) vbank(0) end function BDR(l) vbank(1) poke(0x3fc0+12*3+0,math.sin(-l/10-time()/100)*40+180) poke(0x3fc0+12*3+1,255) poke(0x3fc0+12*3+2,math.sin(l/10-time()/200)*50+100)--math.sin(time()/1000)*100+100) -- poke(0x3FF8,14) --end vbank(0) end