̬̬̬̈̬̬̬̬̈̬̬̬̬̬̪쬪̬̬̬̪쬪    !!!!!"" !"!"!"! !!!!!!"!!"!!"!!!!!"!!! "!!!"!!!!!"!"!!!!!"!(!!""""""""       )&" *-................////////)%"  !! !!""$%&''())**+,-.../)%"  !! !!""$%&''())**+,-.../)%"  !! !!""$%&''())**+,-.../)%"  !$&'*&$%()*+,*))**+,-.../)%"  !$&'*&$%()*+,*))**+,-.../)%"  !$&'*&$%()*+,*))**+,-.../  % ppppppppppppppppppppppppppppp*pppppppppppppppppppppppppppp` ` ` ` ` ` ` ` ``` @ p P p PQq r RI pIP Ip PEQqE Lr R@@@@@@@@@@@@@@@@@@@Ť@@@@Ť@@@@Ť@@@@@@Ip pPIP pIpP PQEQqqE rLrR RdŔńŤdŤdŔńŤddŔńdŔńŤdtTtTQEQqqE rLrR R F F F F F F F F F F & & F F & F & F & F F & &dŔńŤdŤdŔńŤddŔńdŔńŤddŔdŔdŔdŔdŔdŔ !@b `A A`b `AHa@b `A A@a` `A A a a !@b `A A`b `A Ha@b`aa@a` `A A a atTtTUuvV |t  hh hhhhhhth hHHH(dŔńŤldŔńŔdŔ ldŔ ldŔdŔ ldŔdŔ H H l D H l H H H H H & H H H H H H H H H l H @b `Pb ``c`!  ! D!`c`   B @!`!!  ! D! D D!!`I`K`LDEIKLDE`E`I`K`LD`LDEIKbIbKbLDEIKLDEbEbIbKbLDbLDEIKbbLbKILbKbbbbLbKILbKbbbbKbIEKbIbbbEDLEbD A@b `A A`b `A Ha@b`aa@a` `A@a `A A HA A@HdtH ldDtH lHtH HtHHtd& HHdH HtHtH HHtH lH A@b `A A`b `AHa@b `A A@a` `A A a abbLbKILbKbbIbbLbbbLbKILbKbbIbbLbbbKbIEKbIbbEbbKbbEDLEbDLbEdŔńŤldŔńŔdŔ ldŔdŔdŔ@ 000@PPP`ppppp<00A(L((0((EEC)\EE5a6aE6a4EE)Okookynerd = { start_t = -1, duration = 60*10, -- frame time management start_frame = 0, count_frame = 3, -- dots = { {0, 0, 1.5, {0, -40, 2.5, {0, -35, 1.5, { 0, -30, 1.3, { 0, -25, 1.3, { 0, -20, 1.3, {} } } } } } } }, b_dots = {}, b_dots_p_line = 3, width = 240, height = 136, cey = 136//2, cex = 240//2 } function kookynerd:cf() return peek(0x13ffd) end function kookynerd:cr() return peek(0x13ffe) end function kookynerd:start(start) if self.start_t >= 0 then return end trace("Start kookynerd's section") math.randomseed(100, 200) self.start_t = start self.start_frame = self:cf() - 1 --for by = 1,self.height do -- for i=1,self.b_dots_p_line do -- self.b_dots[(by-1)*self.b_dots_p_line+i] = {math.random(1, self.width), by} -- end --end end function kookynerd:isTime(t) if self.start_t < 0 then return false end if self.count_frame > 0 then if self:cf() - self.start_frame > self.count_frame then return false end return true else if t < self.start_t + self.duration then return true end end return false end function kookynerd:TIC(t) if not self:isTime(t) then return false end self:demo(t) return true end -- Demo logic section function kookynerd:r(x,y,a) local x1 = x*math.cos(a) - y*math.sin(a) local y1 = x*math.sin(a) + y*math.cos(a) return x1, y1 end function kookynerd:h(dot, a, px, py, rr, i, t, sh) local track= peek(0x13ffc) local frame= self:cf() local row= peek(0x13ffe) if #dot == 0 then return end if t % 3 == 0 then local d1m = math.random(-1,1) local d2m = math.random(-1,1) --if t > (self.duration - 150) then if self:cf() - self.start_frame == self.count_frame and self:cr() > 55 then d1m = 0.8 d2m = 0.8 end dot[1] = dot[1] + d1m * (math.random(100, 500) / 10000) dot[2] = dot[2] + d2m * (math.random(100, 500) / 10000) --dot[3] = dot[3] + math.random(-1,1) * math.random(100, 500) / 1000000 end local x, y, am, nxt = dot[1], dot[2], dot[3], dot[4] local nx, ny = self:r(x, y, a) nx = nx + px ny = ny + py if i > 2 then if sh == 0 then circ(nx, ny, rr, (a*5-t/10)%2 + (t/100)) else circ(nx, ny, rr*2.2, (15+(a*5)%2)%16) end end self:h(nxt, a*am, nx, ny, rr/2, i+1, t, sh) end function kookynerd:blur(x, y) for dd in {{-1,1}, {1,1}} do local dx, dy = dd[1], dd[2] end end function kookynerd:demo(t) t = t - self.start_t local a = t / 30 cls(0) --for i=1,self.height*self.b_dots_p_line do -- pix((self.b_dots[i][1] + t*2-1) % self.width, ((math.sin(t/20) + 1.5) * self.b_dots[i][2]) % self.height, t/100) -- pix((self.b_dots[i][1] + t*2) % self.width, (self.height - (math.sin(t/20) + 1.5) * self.b_dots[i][2]) % self.height, t/100) --end for i=1,#self.dots do for j=0,math.min(t/100, 3.9),0.005 do self:h(self.dots[i], a-j, self.cex-5, self.cey-5, 53, 0, t, 1) end end for i=1,#self.dots do for j=0,math.min(t/100, 3.9),0.005 do self:h(self.dots[i], a-j, self.cex, self.cey, 53, 0, t, 0) end end -- blur for x=1,self.width do for y=1,self.height do --blur(x,y) end end --print(self:cr(), 1, 130, 15) --print(self:cf(), 22, 130, 15) end kookynerd2 = { start_t = -1, duration = 60*10, -- frame time management start_frame = 0, count_frame = 3, -- width = 240, height = 136, cex = 240 // 2, cey = 136 // 2, cs = 6, ic = 2, bc = 0, pc = 3, cb = 0, pcr = -1, } function kookynerd2:cf() return peek(0x13ffd) end function kookynerd2:cr() return peek(0x13ffe) end function kookynerd2:start(start) if self.start_t >= 0 then return end trace("Start kookynerd2's section") math.randomseed(10, 33) self.start_t = start self.start_frame = self:cf() - 1 -- vbank(1) -- cls(0) -- vbank(0) cls(0) circ(self.cex, self.cey, self.cs//2, self.ic) circ(self.cex - self.cs, self.cey, self.cs//2, self.ic) circ(self.cex + self.cs, self.cey, self.cs//2, self.ic) circ(self.cex, self.cey - self.cs, self.cs//2, self.ic) circ(self.cex, self.cey + self.cs, self.cs//2, self.ic) end function kookynerd2:isTime(t) if self.start_t < 0 then return false end if self.count_frame > 0 then if self:cf() - self.start_frame > self.count_frame then return false end return true else if t < self.start_t + self.duration then return true end end return false end function kookynerd2:TIC(t) if not self:isTime(t) then return false end self:demo(t) return true end function kookynerd2:countn(x, y) local count = 0 local cs = self.cs local dxdy = {{-cs, 0}, {cs, 0}, {0, cs}, {0,-cs}, {cs,-cs}, {cs,cs}, {-cs, cs}, {-cs, -cs}} for i=1,#dxdy do local pv = pix(x+dxdy[i][1], y+dxdy[i][2]) if pv > 0 then count = count + 1 end end return count end function kookynerd2:has_value (tab, val) for index, value in ipairs(tab) do if value == val then return true end end return false end -- Demo logic section -- B35678/S5678 function kookynerd2:demo(t) t = t - self.start_t -- b = {3,5,6,7,8} -- s = {5,6,7,8} -- b = {3,4,5} -- s = {4,5,6,7} local b = {1} local s = {0,1,2,3,4,5,6,7,8} ncb = 1 if self.cb == 1 then ncb = 0 end local cc = math.random(1,5) local cr = self:cr() if cr ~= self.pcr and cr % 2 == 0 then self.pcr = cr for x=1,self.width,self.cs do for y=1,self.height,self.cs do vbank(self.cb) local cnt = self:countn(x, y) local cpv = pix(x, y) vbank(ncb) if cpv > 0 then if self:has_value(s, cnt) then circ(x, y, self.cs//2, cc-1) else circ(x, y, self.cs//2, 0) end end if self:has_value(b, cnt) then circ(x, y, self.cs//2, cc) end end end vbank(self.cb) cls(self.bc) self.cb = ncb vbank(self.cb) end end -- Demo dutation in t cycles should be specified in duration property artem = { start_t = -1, duration = 60 * 5, start_frame = 0, count_frame = 3, pixel_width = 2, hide1 = false, hide2 = false, zoomed1 = false, zoomed2 = false, toffset1 = 0, toffset2 = 0, } -- 240 x 136 function artem:cf() return peek(0x13ffd) end function artem:cr() return peek(0x13ffe) end function artem:start(start) if self.start_t >= 0 then return end trace("Start artem's section") self.start_t = start self.start_frame = self:cf() - 1 zoomed = false end function artem:isTime(t) if self.start_t < 0 then return false end if self.count_frame > 0 then if self:cf() - self.start_frame > self.count_frame then return false end return true else if t < self.start_t + self.duration then return true end end return false end function artem:drawSprite(id, w, h, cx, cy, scale, angle) -- UV in sprite sheet u = (id % 16) * 8 v = (id // 16) * 8 hw = w / 2 * scale hh = h / 2 * scale ca = math.cos(angle) sa = math.sin(angle) function rotate(x, y) return cx + x * ca - y * sa, cy + x * sa + y * ca end x0, y0 = rotate(-hw, -hh) x1, y1 = rotate(hw, -hh) x2, y2 = rotate(hw, hh) x3, y3 = rotate(-hw, hh) -- top-left triangle ttri( x0, y0, x1, y1, x2, y2, u, v, u + w, v, u + w, v + h, 0, 0 -- bank=1, chromakey=0 ) -- bottom-right triangle ttri( x0, y0, x2, y2, x3, y3, u, v, u + w, v + h, u, v + h, 0, 0 ) end function artem:TIC(t) if not self.isTime(self, t) then return false end --Good condition for fade effect if self.count_frame == self:cf() - self.start_frame and self:cr() > 55 then self.pixel_width = self.pixel_width * 1.1 end -- here demo code goes the same way as in TIC local angle = t / 20 local cos_a = math.cos(angle) local sin_a = math.sin(angle) --gradual zoom factor 1‒2× local z = 4 + math.sin(t / 20) * 3 --screen half‑sizes for centring local cx, cy = 120, 68 music_row = artem:cr() music_frame = artem:cf() local beat = false local color_offset = 0 local random_max = 100 if music_frame == 1 and (music_row + 3) % 4 == 0 then beat = true color_offset = 2 random_max = 4 end if music_frame == 2 and (music_row + 3) % 2 == 0 then beat = true color_offset = 4 random_max = 2 end for y = 0, 135, self.pixel_width do local shiftx = 0 if math.random(0, random_max) == 0 and beat then shiftx = 6 end for x = 0, 239, self.pixel_width do --translate to centre, rotate, translate back local dx = (x - cx) / z local dy = (y - cy) / z local rx = dx * cos_a - dy * sin_a local ry = dx * sin_a + dy * cos_a local sx = rx + cx -- + math.random(-1, 1) local sy = ry + cy -- + math.random(-1, 1) sx = sx + shiftx --original colour function on rotated coords local col = ( math.sin(sx / 2 / (t / 6 + 2000) * 800) * math.cos(sy / 2 / (t / 6 + 2000) * 800) * math.tan((math.sqrt(sx) / 2 + 95) / 50) * 1.5 * math.sin(t / 100) * 2 + t / 2 + sx / 2 + sy / 2 ) % 5 + 5 + math.sin(t / 50) * 5 rect(x, y, self.pixel_width, self.pixel_width, col + color_offset) end end if music_frame == 0 and music_row < 16 then artem:title(t) end if music_frame == 0 and music_row > 16 then artem:byFsk(t) end --print(self:cr(), 1, 130, 15) --print(self:cf(), 20, 130, 15) -- here demo code ends return true end function artem:title(t) if not self.toffset1 then self.toffset1 = t end local t1 = t - self.toffset1 local angle = -math.cos(t1 / 50) * math.pi / 4 local zoom = math.sin((t1 - 20) / 20) + 1 if zoom > 1 then zoomed = true end if zoomed and zoom < 0.1 then self.hide1 = true end if not self.hide1 then artem:drawSprite(256, 128, 60, 120, 68, zoom, angle) end end function artem:byFsk(t) if not self.toffset2 then self.toffset2 = t end local t2 = t - self.toffset2 local angle = -math.cos(t2 / 50) * math.pi / 4 local zoom = math.sin((t2 - 20) / 20) + 1 if zoom > 1 then self.zoomed2 = true end if self.zoomed2 and zoom < 0.1 then self.hide2 = true end if not self.hide2 then artem:drawSprite(368, 128, 64, 120, 68, zoom, angle) end end -- Demo dutation in t cycles should be specified in duration property virtus = { start_t = -1, duration = 60, start_frame = 0, count_frame = 3, col = 10, angle1 = 0, angle2 = 0, angle3 = 0, angle4 = 0, angle5= 0, angle7 = 0, angle6 = 0, angle8 = 0, ex = 4, ex1 = 2, final_ex = 4, } function virtus:cf() return peek(0x13ffd) end function virtus:cr() return peek(0x13ffe) end function virtus:start(start) if self.start_t >= 0 then return end trace("Start virtus's section") self.start_t = start self.start_frame = self:cf()-1 end function virtus:isTime(t) if self.start_t < 0 then return false end if self.count_frame > 0 then if self:cf()-self.start_frame > self.count_frame then return false end return true else if t < self.start_t + self.duration then return true end end return false end function virtus:TIC(t) if not self.isTime(self, t) then return false end -- here demo code goes the same way as in TIC cls(0) self.col = 5 self.x = 120 self.y = 68 local x = self.x local y = self.y local t = t - self.start_t if self.count_frame == self:cf() - self.start_frame and self:cr() > 59 then self.ex = self.ex * 1.1 self.ex1 = self.ex1 * 1.1 end self.spiral(self, t/20, self.move(self, 0, 0, 4, 4, true, 'angle5', 0.01), false, 1, 2, self.ex1) self.spiral(self, t/20, self.move(self, 240, 0, 2, 2, false, 'angle6', 0.01), true, 2, 2, self.ex1) self.spiral(self, t/20, self.move(self, 0, 120, 2, 2, true, 'angle7', 0.01), false, 2, 2, self.ex1) self.spiral(self, t/29, self.move(self, 240, 120, 2, 3, false, 'angle8', 0.01), false, 1, 2, self.ex1) self.spiral(self, t/20, self.move(self, x, y, 40, 30, true, 'angle2', 0.02), false, 3, nil, self.ex) self.spiral(self, t/19, self.move(self, x-20, y-20, 50, 50, false, 'angle3', 0.03), true, 3, nil, self.ex) self.spiral(self, t/20, self.move(self, x+40, y+60, 40, 30, false, 'angle1', 0.01), true, 4, nil, self.ex) self.spiral(self, t/17, self.move(self, x+30, y-30, 40, 30, true, 'angle4', 0.01), false, 4, nil, self.ex) return true end function virtus:final(t) if t > self.start_t + 90 then return false end cls(0) self.spiral(self, t/17, self.move(self, 130, 30, 0, 0, false, 'angle4', 0.01), false, 4, nil, self.final_ex * 14) self.spiral(self, t/20, self.move(self, 10, 0, 0, 0, true, 'angle2', 0.02), false, 3, nil, self.final_ex * 13) self.spiral(self, t/19, self.move(self, 200, 0, 0, 0, false, 'angle3', 0.03), true, 3, nil, self.final_ex * 10) self.spiral(self, t/20, self.move(self, 40, 140, 0, 0, true, 'angle1', 0.01), true, 4, nil, self.final_ex * 10) self.spiral(self, t/17, self.move(self, 210, 100, 0, 0, false, 'angle4', 0.01), false, 4, nil, self.final_ex * 10) local cr = t - self.start_t if cr < 20 then print("CODE ", 50, 50, 8, false, 2.4) print("CAVE", 130, 60, 10, false, 2.4) end if cr >= 20 and cr < 40 then print("MUSIC", 130, 50, 8, false, 2.4) print("a0", 50, 60, 10, false, 2.4) end if cr >= 40 and cr < 60 then print("CODE ", 50, 50, 8, false, 2.4) print("VIRT2S", 130, 60, 10, false, 2.4) end if cr >= 60 and cr < 80 then print("GFX", 140, 50, 8, false, 2.4) print("Sheinar", 50, 60, 10, false, 2.4) end return true end local function f(flag, arg) if flag then return math.sin(arg) end return math.cos(arg) end function virtus:move(x, y, rx, ry, dir, angle, speed) if speed == nil then speed = 0.01 end local a = self[angle] local x = x + rx * f(dir, a) local y = y + ry * f(not dir, a) self[angle] = self[angle] + speed return function () return x, y end end function virtus:spiral(t, getCoord, flag, c, dd, radius) if dd == nil then dd = 7 end local d = dd + math.sin(t+100) local x, y = getCoord() local d1 = 4 + math.sin(t/10) for i=1,800 do local c = c + math.sin(i/3) x = x + i/d1 * f(flag, t + i/2)/d y = y + i/d1 * f(not flag, t + i/2)/d rect(x, y, radius, radius, c) end end -- Demo dutation in t cycles should be specified in duration property virtus2 = { start_t = -1, duration = 60, start_frame = 0, count_frame = 4, col = 10, angle1 = 0, angle2 = 0, angle3 = 0, angle4 = 0, angle5= 0, angle7 = 0, angle6 = 0, angle8 = 0, ex = 4, ex1 = 2, final_ex = 4, } function virtus2:cf() return peek(0x13ffd) end function virtus2:cr() return peek(0x13ffe) end function virtus2:start(start) if self.start_t >= 0 then return end trace("Start virtus2's section") self.start_t = start self.start_frame = self:cf()-1 end function virtus2:isTime(t) if self.start_t < 0 then return false end if self.count_frame > 0 then if self:cf()-self.start_frame > self.count_frame then return false end return true else if t < self.start_t + self.duration then return true end end return false end function virtus2:TIC(t) if not self.isTime(self, t) then return false end self:final(t) return true end function virtus2:final(t) cls(0) self.spiral(self, t/17, self.move(self, 130, 30, 0, 0, false, 'angle4', 0.01), false, 4, nil, self.final_ex * 14) self.spiral(self, t/20, self.move(self, 10, 0, 0, 0, true, 'angle2', 0.02), false, 3, nil, self.final_ex * 13) self.spiral(self, t/19, self.move(self, 200, 0, 0, 0, false, 'angle3', 0.03), true, 3, nil, self.final_ex * 10) self.spiral(self, t/20, self.move(self, 40, 140, 0, 0, true, 'angle1', 0.01), true, 4, nil, self.final_ex * 10) self.spiral(self, t/17, self.move(self, 210, 100, 0, 0, false, 'angle4', 0.01), false, 4, nil, self.final_ex * 10) t = t - self.start_t --local cr = self:cr() if t < 5*60 then print("CODE ", 50, 50, 8, false, 2.4) print("CAVE", 130, 60, 10, false, 2.4) end if t >= 5*60 and t < 10*60 then print("MUSIC", 130, 50, 8, false, 2.4) print("a0", 50, 60, 10, false, 2.4) end if t >= 10*60 and t < 15*60 then print("CODE ", 50, 50, 8, false, 2.4) print("VIRT2S", 130, 60, 10, false, 2.4) end if t >= 15*60 and t < 20*60 then print("GFX", 140, 50, 8, false, 2.4) print("Sheinar", 50, 60, 10, false, 2.4) end return true end local function f(flag, arg) if flag then return math.sin(arg) end return math.cos(arg) end function virtus2:move(x, y, rx, ry, dir, angle, speed) if speed == nil then speed = 0.01 end local a = self[angle] local x = x + rx * f(dir, a) local y = y + ry * f(not dir, a) self[angle] = self[angle] + speed return function () return x, y end end function virtus2:spiral(t, getCoord, flag, c, dd, radius) if dd == nil then dd = 7 end local d = dd + math.sin(t+100) local x, y = getCoord() local d1 = 4 + math.sin(t/10) for i=1,800 do local c = c + math.sin(i/3) x = x + i/d1 * f(flag, t + i/2)/d y = y + i/d1 * f(not flag, t + i/2)/d rect(x, y, radius, radius, c) end end t=0 ready = 1 music_playing=0 music_part=0 track=0 frame=0 row=0 function TIC() -- track= peek(0x13ffc) -- frame= peek(0x13ffd) -- row= peek(0x13ffe) if ready == 1 then music(0,0,0,false,false) music_playing=1 ready=0 elseif music_playing == 1 then if(track==255)then music_part = music_part + 1 if music_part == 1 then music(1,0,0,false,false) else exit() end end end t = t+1 artem:start(t) if artem:TIC(t) then return end virtus:start(t) if virtus:TIC(t) then return end kookynerd:start(t) if kookynerd:TIC(t) then return end kookynerd2:start(t) if kookynerd2:TIC(t) then return end virtus2:start(t) if virtus2:TIC(t) then return end trace('exit') exit() end