add some lvl and more to inf mode

This commit is contained in:
PossiblyAxolotl 2024-03-08 23:24:13 -06:00
parent 824ce41472
commit 9dee225585
17 changed files with 9182 additions and 14 deletions

View file

@ -1,8 +1,8 @@
-- PossiblyAxolotl
-- Created May 10th, 2022
-- Last updated March 8th, 2024
-- Rocket Bytes
import "CoreLibs/graphics"
import "CoreLibs/sprites"
import "CoreLibs/math"
@ -69,7 +69,7 @@ createMenu(mainmenu)
tutorial = nil
local menu = playdate.getSystemMenu()
menuButton, error = menu:addMenuItem("game menu", function()
menuButton, error = menu:addMenuItem("main menu", function()
if mode == "game" or mode == "hgame"then
playdate.datastore.delete("savegame.json")
playdate.datastore.write({savedLevel=map,savedDeaths=deaths,mode=mode},"savegame")
@ -93,6 +93,11 @@ menuButton, error = menu:addMenuItem("game menu", function()
removeMap()
killBlades()
end
if mode == 'endless' then
closeEndless()
end
if mode ~= "music" then
totalEnergy = 0
showEnergy = false
@ -129,9 +134,6 @@ end
song:play(0)
function playdate.update()
if mode == 'endless' then
processEndless()
end
if mode == "menu" then
updateMenu()
processExplosions()
@ -182,6 +184,10 @@ function playdate.update()
end
end
updateSaws()
if mode == 'endless' then
processEndless()
end
end
function playdate.gameWillTerminate()

View file

@ -34,7 +34,7 @@ function addMap(_file, rs)
end
-- Add collision
tiles = gfx.sprite.addWallSprites(tilemap, {0,1,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24})
tiles = gfx.sprite.addWallSprites(tilemap, {0,1,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32})
song:stop()
if level.song then

View file

@ -66,7 +66,7 @@ function createMenu(items, invert)
_y -= 20
end
if mode == "game" or mode == "play" or mode == "hgame" then
if mode == "game" or mode == "play" or mode == "hgame" or mode == "endless" then
song:stop()
song:load("sfx/song1")
song:play(0)
@ -139,6 +139,13 @@ local function dataLoad()
barpos = 160
setLogoPos()
local lvls = {"1. HOOK.json","2. ROCKET.json","3. HUT.json","4. SPINNER.json","5. SHUTTLE.json","6. SHELL.json","7. PYRAMID.json","8. KITCHEN.json","9. LADDER.json","10. CITY.json","11. FLOWER.json", "12. BOXES.json","13. SNAKE.json","14. TOWER.json","15. ESCAPE.json","H1. CAVEYARD.json", "H2. PUMPKIN.json", "H3. HAUNTED HOUS.json", "H4. TRICK OR TREAT.json", "H5. CANDY CORN.json","H6. COFFIN.json"}
if isPlus then
local plusLvls = {"P1. CONSOLE.json", "P2. FISH.json"}
for item = 1, #plusLvls do
lvls[#lvls+1] = plusLvls[item]
end
end
local m = {}
m[0], m[1] = "data", "EXTRAS"
if #lvls - ((10*page)) <= 0 then page = 0 end
@ -223,14 +230,23 @@ function menuButtonPress(name, index)
m[0], m[1], m[2] = "halgame", "CANCEL", "CONFIRM"
createMenu(m)
elseif name == "START PLUS GAME" then
local m = {}
m[0], m[1], m[2] = "plusgame", "CANCEL", "CONFIRM"
createMenu(m)
elseif name == "START NEW GAME" or name == "CONFIRM" then
if menu ~= "halgame" then
deaths = 0
if menu ~= "halgame" and menu ~= "plusgame" then
beginStartCutscene(true)
else
elseif menu ~= "plusgame" then
mode = "hgame"
map = "data/H1. CAVEYARD.json"
addMapSave("data/H1. CAVEYARD.json")
else
mode = "hgame"
map = "data/P1. CONSOLE.json"
addMapSave("data/P1. CONSOLE.json")
end
elseif name == "ENDLESS" then
startEndless()

View file

@ -24,6 +24,10 @@ sprRocket:setCollideRect(9, 9, 10, 10)
local startpos = {x=0,y=0}
sprRocket:setGroups({1,2,3})
function getActive()
return active
end
local imgBigRocket = gfx.image.new("gfx/bigrocket")
local imgBigFire = gfx.imagetable.new("gfx/bigrocketfire")
local imgSpawn = gfx.image.new("gfx/spawn")

View file

@ -17,6 +17,7 @@ local blades = {}
local spinblades = {}
local fuels = {}
local checks = {}
local moves = {}
local sfxCollect = playdate.sound.sampleplayer.new("sfx/collect")
@ -239,3 +240,36 @@ function killBlades()
spinblades = {}
end
function addMoveSaw(_x, _y, dir)
local rads = math.rad(dir)
local xv, yv = math.sin(rads), -math.cos(rads)
local spr = gfx.sprite.new(loopSaws:image())
spr:moveTo(_x, _y)
spr:setZIndex(1)
spr:setCollideRect(0,0,16,16)
spr:add()
moves[#moves+1] = {xv=xv,yv=yv,spr=spr}
end
function processMoveSaw()
for i = #moves, 1, -1 do
local saw = moves[i]
local sp = saw.spr
sp:moveBy(saw.xv, saw.yv)
sp:setImage(loopSaws:image())
if sp.x > 416 or sp.x < -16 or sp.y > 256 or sp.y < -16 then
sp:remove()
table.remove(moves, i)
end
end
end
function deleteMoves()
for move = 1, #moves, 1 do
moves[move].spr:remove()
end
moves = {}
end

View file

@ -0,0 +1,859 @@
{
"bigrocket": {
"x":1504,
"y":1440
},
"next":"data/P2. FISH.json",
"checks": [
{
"x":1833,
"y":1451
}
],
"fuel": [
{
"x":1641,
"y":1563
},
{
"x":1593,
"y":1563
},
{
"x":1833,
"y":1451
}
],
"grav":0.20000000298023,
"inverted":false,
"rocket": {
"x":1514,
"y":1564
},
"rotators": [
{
"armlen":3,
"arms":1,
"middle":true,
"speed":0.5,
"x":1760,
"y":1488
}
],
"saws": [
{
"ends": {
"x":1696,
"y":1504
},
"speed":0.20000000298023,
"start": {
"x":1632,
"y":1504
}
}
],
"song":"song11",
"tiles": [
{
"t":2,
"x":107,
"y":103
},
{
"t":2,
"x":92,
"y":103
},
{
"t":2,
"x":92,
"y":88
},
{
"t":2,
"x":107,
"y":99
},
{
"t":2,
"x":107,
"y":95
},
{
"t":2,
"x":107,
"y":90
},
{
"t":2,
"x":107,
"y":88
},
{
"t":2,
"x":111,
"y":99
},
{
"t":2,
"x":111,
"y":94
},
{
"t":2,
"x":111,
"y":91
},
{
"t":2,
"x":111,
"y":90
},
{
"t":2,
"x":112,
"y":91
},
{
"t":2,
"x":112,
"y":94
},
{
"t":2,
"x":113,
"y":94
},
{
"t":2,
"x":118,
"y":95
},
{
"t":2,
"x":118,
"y":90
},
{
"t":2,
"x":113,
"y":90
},
{
"t":2,
"x":113,
"y":91
},
{
"t":2,
"x":107,
"y":94
},
{
"t":15,
"x":107,
"y":92
},
{
"t":15,
"x":107,
"y":93
},
{
"t":15,
"x":107,
"y":91
},
{
"t":15,
"x":107,
"y":96
},
{
"t":15,
"x":107,
"y":97
},
{
"t":15,
"x":107,
"y":98
},
{
"t":12,
"x":109,
"y":89
},
{
"t":6,
"x":94,
"y":90
},
{
"t":6,
"x":94,
"y":91
},
{
"t":6,
"x":94,
"y":92
},
{
"t":6,
"x":94,
"y":93
},
{
"t":6,
"x":94,
"y":94
},
{
"t":6,
"x":94,
"y":95
},
{
"t":6,
"x":95,
"y":95
},
{
"t":6,
"x":96,
"y":95
},
{
"t":6,
"x":97,
"y":95
},
{
"t":6,
"x":98,
"y":95
},
{
"t":6,
"x":99,
"y":95
},
{
"t":6,
"x":100,
"y":95
},
{
"t":6,
"x":101,
"y":95
},
{
"t":6,
"x":102,
"y":95
},
{
"t":6,
"x":103,
"y":95
},
{
"t":6,
"x":103,
"y":90
},
{
"t":6,
"x":102,
"y":90
},
{
"t":6,
"x":101,
"y":90
},
{
"t":6,
"x":100,
"y":90
},
{
"t":6,
"x":99,
"y":90
},
{
"t":6,
"x":98,
"y":90
},
{
"t":6,
"x":97,
"y":90
},
{
"t":6,
"x":96,
"y":90
},
{
"t":6,
"x":95,
"y":90
},
{
"t":16,
"x":95,
"y":91
},
{
"t":16,
"x":96,
"y":91
},
{
"t":16,
"x":97,
"y":91
},
{
"t":16,
"x":98,
"y":91
},
{
"t":16,
"x":99,
"y":91
},
{
"t":16,
"x":100,
"y":91
},
{
"t":16,
"x":101,
"y":91
},
{
"t":16,
"x":102,
"y":91
},
{
"t":16,
"x":103,
"y":91
},
{
"t":16,
"x":103,
"y":92
},
{
"t":16,
"x":103,
"y":93
},
{
"t":16,
"x":103,
"y":94
},
{
"t":16,
"x":102,
"y":94
},
{
"t":16,
"x":102,
"y":93
},
{
"t":16,
"x":102,
"y":92
},
{
"t":16,
"x":101,
"y":92
},
{
"t":16,
"x":101,
"y":93
},
{
"t":16,
"x":101,
"y":94
},
{
"t":16,
"x":100,
"y":94
},
{
"t":16,
"x":100,
"y":93
},
{
"t":16,
"x":100,
"y":92
},
{
"t":16,
"x":99,
"y":92
},
{
"t":16,
"x":99,
"y":93
},
{
"t":16,
"x":99,
"y":94
},
{
"t":16,
"x":98,
"y":94
},
{
"t":16,
"x":98,
"y":93
},
{
"t":16,
"x":98,
"y":92
},
{
"t":16,
"x":97,
"y":92
},
{
"t":16,
"x":97,
"y":93
},
{
"t":16,
"x":97,
"y":94
},
{
"t":16,
"x":96,
"y":94
},
{
"t":16,
"x":96,
"y":93
},
{
"t":16,
"x":96,
"y":92
},
{
"t":16,
"x":95,
"y":92
},
{
"t":16,
"x":95,
"y":93
},
{
"t":16,
"x":95,
"y":94
},
{
"t":14,
"x":112,
"y":93
},
{
"t":14,
"x":112,
"y":92
},
{
"t":3,
"x":106,
"y":88
},
{
"t":3,
"x":105,
"y":88
},
{
"t":3,
"x":104,
"y":88
},
{
"t":3,
"x":103,
"y":88
},
{
"t":3,
"x":102,
"y":88
},
{
"t":3,
"x":101,
"y":88
},
{
"t":3,
"x":100,
"y":88
},
{
"t":3,
"x":99,
"y":88
},
{
"t":3,
"x":98,
"y":88
},
{
"t":3,
"x":97,
"y":88
},
{
"t":3,
"x":96,
"y":88
},
{
"t":3,
"x":95,
"y":88
},
{
"t":3,
"x":94,
"y":88
},
{
"t":3,
"x":93,
"y":88
},
{
"t":3,
"x":93,
"y":103
},
{
"t":3,
"x":94,
"y":103
},
{
"t":3,
"x":95,
"y":103
},
{
"t":3,
"x":96,
"y":103
},
{
"t":3,
"x":97,
"y":103
},
{
"t":3,
"x":98,
"y":103
},
{
"t":3,
"x":99,
"y":103
},
{
"t":3,
"x":100,
"y":103
},
{
"t":3,
"x":101,
"y":103
},
{
"t":3,
"x":102,
"y":103
},
{
"t":3,
"x":103,
"y":103
},
{
"t":3,
"x":104,
"y":103
},
{
"t":3,
"x":105,
"y":103
},
{
"t":3,
"x":106,
"y":103
},
{
"t":3,
"x":108,
"y":99
},
{
"t":3,
"x":109,
"y":99
},
{
"t":3,
"x":110,
"y":99
},
{
"t":3,
"x":110,
"y":90
},
{
"t":3,
"x":109,
"y":90
},
{
"t":3,
"x":108,
"y":90
},
{
"t":3,
"x":114,
"y":90
},
{
"t":3,
"x":115,
"y":90
},
{
"t":3,
"x":116,
"y":90
},
{
"t":3,
"x":117,
"y":90
},
{
"t":3,
"x":117,
"y":95
},
{
"t":3,
"x":116,
"y":95
},
{
"t":3,
"x":115,
"y":95
},
{
"t":3,
"x":114,
"y":95
},
{
"t":2,
"x":113,
"y":95
},
{
"t":2,
"x":105,
"y":101
},
{
"t":2,
"x":105,
"y":90
},
{
"t":2,
"x":94,
"y":101
},
{
"t":4,
"x":111,
"y":95
},
{
"t":4,
"x":111,
"y":96
},
{
"t":4,
"x":111,
"y":97
},
{
"t":4,
"x":111,
"y":98
},
{
"t":4,
"x":107,
"y":100
},
{
"t":4,
"x":107,
"y":101
},
{
"t":4,
"x":107,
"y":102
},
{
"t":4,
"x":92,
"y":102
},
{
"t":4,
"x":92,
"y":101
},
{
"t":4,
"x":92,
"y":100
},
{
"t":4,
"x":92,
"y":99
},
{
"t":4,
"x":92,
"y":98
},
{
"t":4,
"x":92,
"y":97
},
{
"t":4,
"x":92,
"y":96
},
{
"t":4,
"x":92,
"y":95
},
{
"t":4,
"x":92,
"y":94
},
{
"t":4,
"x":92,
"y":93
},
{
"t":4,
"x":92,
"y":92
},
{
"t":4,
"x":92,
"y":91
},
{
"t":4,
"x":92,
"y":90
},
{
"t":4,
"x":92,
"y":89
},
{
"t":4,
"x":107,
"y":89
},
{
"t":4,
"x":118,
"y":91
},
{
"t":4,
"x":118,
"y":92
},
{
"t":4,
"x":118,
"y":93
},
{
"t":4,
"x":118,
"y":94
}
]
}

View file

@ -0,0 +1,401 @@
{
"bigrocket": {
"x":1576,
"y":1488
},
"checks": [
],
"fuel": [
{
"x":1657,
"y":1483
},
{
"x":1529,
"y":1483
}
],
"grav":0,
"inverted":true,
"rocket": {
"x":1594,
"y":1612
},
"rotators": [
],
"saws": [
],
"song":"song4",
"tiles": [
{
"t":2,
"x":100,
"y":104
},
{
"t":2,
"x":99,
"y":103
},
{
"t":2,
"x":98,
"y":102
},
{
"t":2,
"x":97,
"y":101
},
{
"t":2,
"x":96,
"y":100
},
{
"t":2,
"x":95,
"y":99
},
{
"t":2,
"x":94,
"y":98
},
{
"t":2,
"x":94,
"y":97
},
{
"t":2,
"x":94,
"y":96
},
{
"t":2,
"x":94,
"y":95
},
{
"t":2,
"x":94,
"y":94
},
{
"t":2,
"x":102,
"y":98
},
{
"t":2,
"x":101,
"y":98
},
{
"t":2,
"x":100,
"y":98
},
{
"t":2,
"x":99,
"y":98
},
{
"t":2,
"x":105,
"y":91
},
{
"t":2,
"x":104,
"y":91
},
{
"t":2,
"x":98,
"y":91
},
{
"t":2,
"x":97,
"y":91
},
{
"t":2,
"x":96,
"y":91
},
{
"t":2,
"x":95,
"y":92
},
{
"t":2,
"x":94,
"y":93
},
{
"t":2,
"x":102,
"y":104
},
{
"t":2,
"x":103,
"y":103
},
{
"t":2,
"x":104,
"y":102
},
{
"t":2,
"x":105,
"y":101
},
{
"t":2,
"x":106,
"y":100
},
{
"t":2,
"x":107,
"y":99
},
{
"t":2,
"x":108,
"y":98
},
{
"t":2,
"x":108,
"y":97
},
{
"t":2,
"x":108,
"y":96
},
{
"t":2,
"x":108,
"y":95
},
{
"t":2,
"x":108,
"y":94
},
{
"t":2,
"x":108,
"y":93
},
{
"t":2,
"x":106,
"y":91
},
{
"t":2,
"x":107,
"y":92
},
{
"t":2,
"x":103,
"y":98
},
{
"t":2,
"x":103,
"y":91
},
{
"t":2,
"x":102,
"y":92
},
{
"t":2,
"x":101,
"y":93
},
{
"t":2,
"x":99,
"y":91
},
{
"t":2,
"x":100,
"y":92
},
{
"t":30,
"x":99,
"y":100
},
{
"t":31,
"x":101,
"y":100
},
{
"t":32,
"x":103,
"y":100
},
{
"t":26,
"x":106,
"y":98
},
{
"t":26,
"x":104,
"y":95
},
{
"t":26,
"x":96,
"y":97
},
{
"t":26,
"x":98,
"y":93
},
{
"t":27,
"x":98,
"y":95
},
{
"t":27,
"x":105,
"y":93
},
{
"t":27,
"x":104,
"y":97
},
{
"t":27,
"x":110,
"y":98
},
{
"t":27,
"x":108,
"y":102
},
{
"t":27,
"x":103,
"y":105
},
{
"t":27,
"x":95,
"y":103
},
{
"t":27,
"x":91,
"y":100
},
{
"t":27,
"x":92,
"y":96
},
{
"t":27,
"x":92,
"y":89
},
{
"t":27,
"x":99,
"y":88
},
{
"t":27,
"x":107,
"y":90
},
{
"t":26,
"x":112,
"y":95
},
{
"t":26,
"x":109,
"y":92
},
{
"t":26,
"x":104,
"y":89
},
{
"t":26,
"x":101,
"y":91
},
{
"t":26,
"x":95,
"y":90
},
{
"t":26,
"x":89,
"y":94
},
{
"t":26,
"x":93,
"y":101
},
{
"t":26,
"x":97,
"y":106
},
{
"t":26,
"x":103,
"y":108
},
{
"t":26,
"x":106,
"y":104
},
{
"t":26,
"x":109,
"y":106
},
{
"t":26,
"x":110,
"y":101
},
{
"t":2,
"x":101,
"y":105
}
]
}

2765
Source/data/P2. FISH.json Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1995
Source/data/P4. FACTORY.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,15 @@
local gfx <const> = playdate.graphics
local imgClock = gfx.image.new("gfx/clock")
local imgTrophy = gfx.image.new("gfx/trophy")
local imgSand = gfx.image.new("gfx/hourglass")
local lastActive = false
local lastTime = 0
local tempDeaths
function startEndless()
addPlayer(200,120,999,999, false)
song:stop()
@ -5,9 +17,35 @@ function startEndless()
song:play(0)
mode = "endless"
playdate.resetElapsedTime()
lastActive = false
tempDeaths = deaths
end
function processEndless()
deaths = playdate.getElapsedTime()
local active = getActive()
if not active and lastActive then -- just died
deleteMoves()
lastTime = playdate.getElapsedTime()
elseif not lastActive and active then -- just started
playdate.resetElapsedTime()
addMoveSaw(0,30,90)
end
if active then
deaths = tostring(playdate.getElapsedTime())
else
deaths = tostring(lastTime).."\n12"
imgTrophy:draw(1,20)
end
imgClock:draw(0,1)
lastActive = active
processMoveSaw()
end
function closeEndless()
deaths = tempDeaths
killPlayer()
deleteMoves()
end

BIN
Source/gfx/clock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

BIN
Source/gfx/hourglass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 1 KiB

BIN
Source/gfx/trophy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

View file

@ -4,5 +4,5 @@ description=Help a crew of rockets collect energy to get back home!
bundleID=com.PossiblyAxolotl.RocketBytes
launchSoundPath=launcher/rocketing
version=1.5.0
buildNumber=1500
buildNumber=10500
imagePath=launcher