»DDD@3334óÿÿ4ÿDD4ODD4OCC4OCC4O3CDDD333ÿÿ?CDDÿCDDôC43ôC44ôC4CôC4OCC4OCC4OCC4ODD4ODD4óÿÿ@333DDD44ôC44ôC44ôCDDôCDDÿCÿÿ?C333DDDÀÌÌ ÀÀÌÌ À ÀÌÌ ÀÌÌ À À ÀÌÌ ÀÀÀÌÌ À À ÀÌÌ À À ÀÌÌ ÀÀÀÀÀÌÌ ÀÌÌ ÌÌÀ À ÌÌÀÌÌ ÀÌÌ À À ÀÌÌ À À 3333ÌÌÌÌ3333"""""" """"" "   """" " pÇ|pÌÌÇÌÌ|ÇÇ||pppp''rr'""rp""'rppp77ss733sp33wwp'rp""'""rpwwàÎìàÌÌàÌÌÎìàà.âà""à33>ãà<'7GGHIJ ¿ 000000000000000000000000000000À À À À À À À À À À À À À À À À À `` `` ``` `` ` ` ` ` ` €` À À À À À À À À À À ÀÀ ÀÀÀ ÀÀ ÀÀ ÀÀ ÀÀ ÀÀ À À À ÀÀ ``` `` ` ``` ` ```` `````` ``` ` ` ```` ` ``` `` ` ` ` ````` ` ` ` ` ` ```` ```` `` ` ` ``` `2ýØÁ „?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿð " " """"""""""""""  """ " " "ÌÌÌÀ ÀÀÌÌÌÌÀ ÌÌ ð"""""" " " " " ""  "  " " " ÌÀ À ÀÀ ÀÌÀ À ð """""" " " " " " "" """""ÌÀ À ÀÀÌ Ì Ìð"""""""      "  " """ÌÀ Ì À ÀÌÀ À ð"" " """""""""""""  " " " " "ÌÌ ÌÌÀÀÌÌÀÌ À ÀÌðððððÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿwpwpwpwpwpwp"'rp"'rp"'rp"'rp"'rp"'"rp""'"rp""'"rp""'"rp""'"rp""'"rp"""'""rp"""'""rp"""'""rp"""'""rp"""'""rp"""wwwpwwwwwpwwwwwpwwwwwpwwwwwpwwwwwwpppwpppwpppwpppwpppwpps3777ssps3777ssps3777ssps3777ssps3777ssps37p333733sp333733sp333733sp333733sp333733sp33373sp3373sp3373sp3373sp3373sp3373spwwwpwwwpwwwpwwwpwwwpwwpppwpppwpppwpppwpppwpps3777ssps3777ssps3777ssps3777ssps3777ssps37p333733sp333733sp333733sp333733sp333733sp33373sp3373sp3373sp3373sp3373sp3373spwwwpwwwpwwwpwwwpwwwpwîà"."â>3ãà3î»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»pÇ|pÌÌÇÌÌ|ÇÇ||pp˜2-- title: Spacia -- author: Hexabee Retro -- desc: Classic-paced Space Invaders. Wave splash, bunkers, HUD fixed, invulnerability frames. -- script: lua -- saveid: spacia -- input: gamepad -- 📦 KALICI KAYIT local hiSkor = pmem(0) or 0 if hiSkor < 3000 then hiSkor = 3000; pmem(0, 3000) end -- GLOBAL DEGISKENLER local durum = "intro" local skor = 0 local can = 3 local dalga = 1 local oyuncu = {x = 112, y = 128, w = 8, h = 8} local mermiler = {} local dusmanMermiler = {} local dusmanlar = {} local yon = 1 local hiz = 0.12 local dusman_atis_araligi = 60 local son_dusman_atis = 0 local yildizlar = {} local su_an_calan = -1 local bariyerBloklari = {} local korunma_suresi = 0 local dalga_mesaji_sure = 0 -- ✅ EKSIK GLOBALLER local t = 0 local state_timer = 0 -- 🌟 YILDIZLARI OLUÅžTUR (BoÅŸ tabloyu doldurduk ki arka plan görünsün) for i = 1, 60 do table.insert(yildizlar, {x = math.random(240), y = math.random(136)}) end -- ✅ YARDIMCI: Sayı padding function pad(num, len) local s = tostring(num) while #s < len do s = " " .. s end return s end function zeropad(num, len) local s = tostring(num) while #s < len do s = "0" .. s end return s end -- 🟢 BARIYER SISTEMI function bariyerKur() bariyerBloklari = {} local bx_baslangic = {28, 78, 128, 178} for _, bx in ipairs(bx_baslangic) do for satir=0,2 do for sutun=0,3 do if not (satir==0 and (sutun==1 or sutun==2)) then table.insert(bariyerBloklari, {x=bx+sutun*4, y=106+satir*4, aktif=true}) end end end end end -- ✅ TIC DISPATCHER function TIC() t = t + 1 if durum == "intro" then intro() elseif durum == "menu" then menu() elseif durum == "oyun" then oyun() elseif durum == "gameover" then gameover() elseif durum == "story" then story() end end -- 🎯 STATE: INTRO function intro() cls(0) spr(1, 58, 42, 0, 3) spr(2, 80, 42, 0, 3) spr(3, 58, 65, 0, 3) spr(4, 80, 65, 0, 3) print("HEXABEE", 108, 50, 5, false, 2) print("RETRO", 108, 70, 4, false, 2) print("FROM KAYSERI/TURKIYE", 60, 95, 11) print("https://www.hexabee.com.tr/retro", 38, 128, 12) if btnp(4) and state_timer > 30 then durum = "menu" state_timer = 0 return end local perde = math.max(0, 8 - (state_timer / 20)) if perde > 0 then for y = 0, 136, 8 do rect(0, y, 240, perde, 0) end end if state_timer >= 210 then durum = "menu" end state_timer = state_timer + 1 end -- 🎯 STATE: MENU function menu() cls(0) state_timer = state_timer + 1 for _,s in ipairs(yildizlar) do pix(s.x, (s.y + t/200) % 136, 1) end local logo_x = {12, 47, 82, 117, 152, 187} for i=0, 5 do local r_renk = math.random(1, 15) poke(0x3FF0 + 15, r_renk) spr(5 + i, logo_x[i+1], 24, 0, 5) end poke(0x3FF0 + 15, 15) for i=0,5 do spr(11, 12 + (i*35), 65, 0, 5) end print("HI-SCORE: "..zeropad(hiSkor, 5), 20, 90, 4) print("SCORE: "..zeropad(skor, 5), 150, 90, 4) if (t // 30) % 2 == 0 then print("PRESS [Z] TO START", 60, 100, 2) end spr(12, 90, 110) spr(13, 98, 110) spr(14, 106, 110) spr(15, 114, 110) print("2026 - HEXABEE RETRO", 52, 120, 12) calMuzik(0) if btnp(4) then durum = "story" music(1) state_timer = 0 end end -- Hikaye Metni local hikaye_metni = { "- SPACIA -", "SPACIA WAS HIDDEN ON", "THE ''LOST PLANET,'' A PLACE", "TUCKED AWAY IN THE MOST", "REMOTE CORNER OF THE UNIVERSE,", "CONSTANTLY SHIFTING ITS", "COORDINATES THROUGH QUANTUM", "FLUCTUATIONS. NEITHER STEALING", "THE SHIP NOR EVEN FINDING", "THE PLANET WAS THEORETICALLY", "POSSIBLE FOR ANY GALACTIC", "EMPIRE. YET, A TURK", "ACCOMPLISHED THE IMPOSSIBLE.", "NOW, THEY SIT IN THE PILOT'S", "SEAT OF THIS MASSIVE, ANCIENT", "VESSEL, WHERE EVERY CONSOLE", "IS ALIEN AND EVERY BUTTON", "COULD RIP THROUGH", "THE FABRIC OF DIMENSIONS.", "", "OUTSIDE, SPACE PIRATES THE MOST", "RUTHLESS HUNTERS IN THE GALAXY", "HAVE TRACKED SPACIA'S DARK", "SIGNAL AND SURROUNDED THE SHIP.", "THEY DON'T JUST WANT", "THE VESSEL; THEY WANT", "THE ''MYSTERIOUS STRANGER'' WHO", "DARED TO STEAL IT. REALIZING", "THAT THEY ARE NOT JUST A THIEF", "BUT A CARRIER OF HOPE, OUR", "PROTAGONIST TOUCHES THE TRIGGER", "OF AN UNKNOWN WEAPON FOR", "THE FIRST TIME. HOWEVER,", "A TERRIFYING SECRET LIES DEEP", "WITHIN THE HEART OF THE SHIP:", "SPACIA IS A CURSED MACHINE", "THAT RUNS NOT ON FUEL, BUT ON", "THE LIFE FORCE AND MEMORIES OF", "ITS PILOT. EVERY TIME", "THE ENGINE ROARS TO LIFE,", "A MEMORY IS ERASED FROM", "THE PILOT'S MIND, CONVERTED", "INTO RAW ENERGY. TO WIN", "THE WAR, THEY MUST SAVE EARTH,", "BUT IF THEY SUCCEED, WILL THEY", "EVEN REMEMBER WHO THEY ARE WHEN", "THEY FINALLY RETURN HOME?", "", } local story_scroll = 20 function story() cls(0) state_timer = state_timer + 1 story_scroll = 160 - (state_timer / 5) for i, satir in ipairs(hikaye_metni) do local y_poz = story_scroll + (i * 12) if y_poz > -10 and y_poz < 150 then local merkez_x = 120 - (#satir * 3) local parlaklik = 12 if y_poz < 40 then parlaklik = 5 elseif y_poz < 20 then parlaklik = 1 end print(satir, merkez_x, y_poz, parlaklik, true) end end if (t // 30) % 2 == 0 then rect(70, 128, 100, 8, 0) print("PRESS [Z] TO SKIP", 75, 129, 02) end local son_satir_y = story_scroll + (#hikaye_metni * 12) if btnp(4) or son_satir_y < 0 then durum = "oyun" oyunBaslat() music(-1) state_timer = 0 end end -- 🎯 STATE: GAME OVER (YENİ EKLENDİ) function gameover() cls(0) state_timer = state_timer + 1 print("GAME OVER", 63, 50, 2, false, 2) print("FINAL SCORE: " .. zeropad(skor, 5), 70, 80, 12) print("HI-SCORE: " .. zeropad(hiSkor, 5), 78, 95, 12) if (t // 30) % 2 == 0 then print("PRESS [Z] TO CONTINUE", 60, 120, 2) end if btnp(4) and state_timer > 30 then if skor > hiSkor then hiSkor = skor; pmem(0, hiSkor) end durum = "menu" state_timer = 0 end end function oyun() cls(0) if btn(2) and oyuncu.x > 4 then oyuncu.x = oyuncu.x - 3 end if btn(3) and oyuncu.x < 220 then oyuncu.x = oyuncu.x + 3 end if btnp(4) and #mermiler < 1 then table.insert(mermiler, {x = oyuncu.x + 2, y = oyuncu.y - 4, w = 4, h = 4}) sfx(0, 5, 10, 3, 5) end for i=#mermiler,1,-1 do mermiler[i].y = mermiler[i].y - 5 if mermiler[i].y < -4 then table.remove(mermiler, i) end end local kenara_carpti = false for _,d in ipairs(dusmanlar) do if d.canli then if (yon == 1 and d.x + d.w > 232) or (yon == -1 and d.x < 6) then kenara_carpti = true break end end end if kenara_carpti then yon = -yon hiz = math.min(0.5, hiz + 0.003) for _,d in ipairs(dusmanlar) do if d.canli then d.y = d.y + 4 end end end for _,d in ipairs(dusmanlar) do if d.canli then d.x = d.x + (yon * hiz) end end -- 👾 DÜŞMAN-BARİYER ÇARPIÅžMASI (İkisi de yok olsun!) for _,d in ipairs(dusmanlar) do if d.canli then for _,b in ipairs(bariyerBloklari) do if b.aktif and d.x < b.x + 4 and d.x + d.w > b.x and d.y < b.y + 4 and d.y + d.h > b.y then b.aktif = false d.canli = false -- Düşman da patlar! break -- Düşman öldü, diÄŸer bariyerleri kontrol etmeye gerek yok end end end end son_dusman_atis = son_dusman_atis + 1 if son_dusman_atis >= dusman_atis_araligi then local canlilar = {} for _,d in ipairs(dusmanlar) do if d.canli then table.insert(canlilar, d) end end if #canlilar > 0 then local secilen = canlilar[math.random(#canlilar)] table.insert(dusmanMermiler, {x = secilen.x + 2, y = secilen.y + 6, w = 4, h = 4}) son_dusman_atis = 0 end end for i=#dusmanMermiler,1,-1 do dusmanMermiler[i].y = dusmanMermiler[i].y + 3 if dusmanMermiler[i].y > 136 then table.remove(dusmanMermiler, i) end end for mIdx=#mermiler,1,-1 do local m = mermiler[mIdx] local silindi = false for dmIdx=#dusmanMermiler,1,-1 do local dm = dusmanMermiler[dmIdx] if m.x < dm.x + 4 and m.x + m.w > dm.x and m.y < dm.y + 4 and m.y + m.h > dm.y then table.remove(dusmanMermiler, dmIdx) silindi = true sfx(3, 1, 5, 3, 5) break end end if not silindi then for _,b in ipairs(bariyerBloklari) do if b.aktif and m.x < b.x + 4 and m.x + m.w > b.x and m.y < b.y + 4 and m.y + m.h > b.y then b.aktif = false silindi = true sfx(3, 3, 8, 3, 5) break end end end if not silindi then for _,d in ipairs(dusmanlar) do if d.canli and m.x < d.x + d.w and m.x + m.w > d.x and m.y < d.y + d.h and m.y + m.h > d.y then d.canli = false silindi = true skor = skor + (d.tip * 10) if skor > hiSkor then hiSkor = skor end sfx(1, 2, 10, 3, 5) break end end end if silindi then table.remove(mermiler, mIdx) end end for i=#dusmanMermiler,1,-1 do local dm = dusmanMermiler[i] local silindi = false for _,b in ipairs(bariyerBloklari) do if b.aktif and dm.x < b.x + 4 and dm.x + dm.w > b.x and dm.y < b.y + 4 and dm.y + dm.h > b.y then b.aktif = false silindi = true sfx(3, 3, 8, 3, 5) break end end if not silindi and korunma_suresi == 0 then if dm.x < oyuncu.x + oyuncu.w and dm.x + dm.w > oyuncu.x and dm.y < oyuncu.y + oyuncu.h and dm.y + dm.h > oyuncu.y then can = can - 1 korunma_suresi = 90 silindi = true sfx(2, 1, 15, 3, 5) if can <= 0 then if skor > hiSkor then hiSkor = skor; pmem(0, hiSkor) end durum = "gameover" state_timer = 0 end end end if silindi then table.remove(dusmanMermiler, i) end end for _,d in ipairs(dusmanlar) do if d.canli and d.y + d.h >= oyuncu.y then if skor > hiSkor then hiSkor = skor; pmem(0, hiSkor) end durum = "gameover" state_timer = 0 break end end local kalan = 0 for _,d in ipairs(dusmanlar) do if d.canli then kalan = kalan + 1 end end if kalan == 0 then dalga = math.min(64, dalga + 1) hiz = math.min(0.5, 0.12 + (dalga * 0.002)) dusman_atis_araligi = math.max(30, 60 - math.floor(dalga / 5)) yon = 1 dusmanOlustur() bariyerKur() dalga_mesaji_sure = 120 end rect(0, 0, 240, 12, 0) rectb(0, 0, 240, 12, 15) print("SCORE: "..zeropad(skor, 5), 4, 2, 2) print("HI: "..zeropad(hiSkor, 5), 100, 2, 2) local can_renk = 12 if korunma_suresi > 0 then korunma_suresi = korunma_suresi - 1 can_renk = (math.floor(t/8) % 2 == 0) and 8 or 12 end print("LIVES: "..can, 190, 2, can_renk) if dalga_mesaji_sure > 0 then dalga_mesaji_sure = dalga_mesaji_sure - 1 local t_efekt = 120 - dalga_mesaji_sure local bant_h = (t_efekt < 20) and t_efekt * 1.5 or (t_efekt > 100 and (120 - t_efekt) * 1.5 or 30) rect(0, 0, 240, bant_h, 0) rect(0, 136 - bant_h, 240, bant_h, 0) if t_efekt > 15 and t_efekt < 105 then local msg = ">>> THREAT LEVEL: " .. zeropad(dalga, 2) .. " <<<" local mx, my = 120 - (#msg * 3), 65 print(msg, mx, my, 12, true, 1) local lazer_x = (t_efekt * 4) % 400 - 80 rect(lazer_x, my - 2, 40, 10, 12) rect(lazer_x + 15, my - 2, 10, 10, 15) line(0, bant_h, 240, bant_h, 12) line(0, 136 - bant_h, 240, 136 - bant_h, 12) end if t_efekt % 20 < 10 then print("SCANNING FOR HOSTILES...", 75, 120, 15) end end spr(16, oyuncu.x, oyuncu.y) for _,m in ipairs(mermiler) do spr(20, m.x, m.y) end for _,dm in ipairs(dusmanMermiler) do spr(21, dm.x, dm.y) end for _,d in ipairs(dusmanlar) do if d.canli then spr(16 + d.tip, d.x, d.y) end end for _,b in ipairs(bariyerBloklari) do if b.aktif then rect(b.x, b.y, 4, 4, 11) end end end -- 🚀 OYUNU SIFIRLAYIP BAÅžLATAN FONKSİYON function oyunBaslat() skor = 0 can = 3 dalga = 1 hiz = 0.12 dusman_atis_araligi = 60 yon = 1 oyuncu.x = 112 korunma_suresi = 0 dalga_mesaji_sure = 120 mermiler = {} dusmanMermiler = {} dusmanOlustur() bariyerKur() music(-1) -- ✅ Müzik tamamen durduruldu end -- 👾 DÜŞMANLARI DİZELGELEYEN FONKSİYON function dusmanOlustur() dusmanlar = {} local satir = math.min(5, 3 + math.floor(dalga / 25)) for r=0,satir-1 do for c=0,10 do table.insert(dusmanlar, { x=20+c*19, y=25+r*12, w=8, h=8, canli=true, tip=(r==0 and 3) or (r<3 and 2 or 1) }) end end end -- 🎵 MÜZİK KONTROLÜ function calMuzik(id, loop) if su_an_calan ~= id then music(id, -1, loop and 1 or 0) su_an_calan = id end end