more levels

This commit is contained in:
PossiblyAxolotl 2022-07-23 14:42:51 -06:00
parent e12c94f330
commit 2b54cb0961
18 changed files with 9252 additions and 13 deletions

View file

@ -3,9 +3,11 @@ local gfx <const> = playdate.graphics
local imgBigRocket = gfx.image.new("gfx/bigrocket")
local tabBigRocket = gfx.imagetable.new("gfx/bigrocketfire")
local tabSmallRocket = gfx.imagetable.new("gfx/fire")
local imgMother = gfx.image.new("gfx/starscraper")
assert(imgBigRocket)
assert(tabBigRocket)
assert(tabSmallRocket)
assert(imgMother)
local shake = 0
@ -118,12 +120,45 @@ assert(imgEndPlatform)
local scene = 1
local platformY = -imgEndPlatform.height
local endRocketY = 0
local mompos = -100
local rockParts = {}
local function processRockParts()
for part = 1, #rockParts, 1 do
if rockParts[part] ~= nil then
rockParts[part].y-= 24
animRocket:image():draw(rockParts[part].x,rockParts[part].y)
if rockParts[part].y < -46 then
rockParts[part] = nil
end
end
end
end
local smY = {260,260,260}
local smYl = {80,80,120}
local rocketadd = playdate.timer.new(400)
rocketadd.discardOnCompletion = false
local partsadd = false
-- rockParts[#rockParts+1] = {y=265,x=math.random(50,350-(animRocket:image().width*1.5))}
function beginEndCutscene()
mode = "endCutscene"
rockParts = {}
partsadd = false
scene = 1
endRocketY = 0
smY = {260,260,260}
smYl = {80,80,120}
platformY = -imgEndPlatform.height
mompos = -100
song:stop()
song:load("sfx/song4")
playdate.timer.new(1000, function ()
playdate.timer.new(3200, function ()
scene = 2
end)
@ -141,8 +176,65 @@ function beginEndCutscene()
explode(200,150)
end)
song:play()
playdate.timer.new(17600, function ()
scene = 5
end)
playdate.timer.new(20800, function ()
smYl[1] = -120
end)
playdate.timer.new(21200, function ()
smYl[2] = -120
end)
playdate.timer.new(21600, function ()
smYl[3] = -120
end)
playdate.timer.new(22000, function ()
scene = 6
end)
playdate.timer.new(22400, function ()
scene = 7
endRocketY = 300
createStars(0,12)
end)
playdate.timer.new(28800, function ()
partsadd = true
end)
playdate.timer.new(35200, function ()
scene = 8
createStars(12,12)
end)
playdate.timer.new(38400, function ()
scene = 9
createStars(8,8,3)
end)
playdate.timer.new(41600, function ()
scene = 10
createStars(4,4,2)
end)
playdate.timer.new(44800, function ()
scene = 11
end)
playdate.timer.new(60000, function ()
song:stop()
song:load("sfx/song1")
song:play(0)
createStars()
createMenu(mainmenu)
end)
song:play()
end)
end
function processEndCutscene()
@ -165,8 +257,52 @@ function processEndCutscene()
end
elseif scene == 4 then
animBigRocket:image():drawScaled(200-imgBigRocket.width*0.75,120-imgBigRocket.height*0.75,1.5)
smY[1] = playdate.math.lerp(smY[1],smYl[1],0.1)
smY[2] = playdate.math.lerp(smY[2],smYl[2],0.1)
animRocket:image():drawScaled(20,smY[1],1.5)
animRocket:image():drawScaled(380-(animRocket:image().width*1.5),smY[2],1.5)
elseif scene == 5 then
animBigRocket:image():drawScaled(200-imgBigRocket.width*0.75,endRocketY,1.5)
animRocket:image():drawScaled(20,smY[1],1.5)
animRocket:image():drawScaled(380-(animRocket:image().width*1.5),smY[2],1.5)
smY[1] = playdate.math.lerp(smY[1],smYl[1],0.1)
smY[2] = playdate.math.lerp(smY[2],smYl[2],0.1)
smY[3] = playdate.math.lerp(smY[3],smYl[3],0.1)
animRocket:image():drawScaled(70,smY[3],1.5)
animRocket:image():drawScaled(330-(animRocket:image().width*1.5),smY[3],1.5)
elseif scene == 6 then
smY[1] = playdate.math.lerp(smY[1],smYl[1],0.1)
smY[2] = playdate.math.lerp(smY[2],smYl[2],0.1)
smY[3] = playdate.math.lerp(smY[3],smYl[3],0.1)
endRocketY = playdate.math.lerp(endRocketY, -300, 0.1)
animBigRocket:image():drawScaled(200-imgBigRocket.width*0.75,endRocketY,1.5)
elseif scene == 7 then
endRocketY = playdate.math.lerp(endRocketY, 120 - (imgBigRocket.width *0.75),0.1)
animBigRocket:image():drawScaled(200-imgBigRocket.width*0.75,endRocketY,1.5)
if rocketadd.timeLeft <= 0 then
rockParts[#rockParts+1] = {y=265,x=math.random(20,380-(animRocket:image().width*1.5))}
if partsadd then
rockParts[#rockParts+1] = {y=265,x=math.random(20,380-(animRocket:image().width*1.5))}
end
rocketadd:reset()
end
elseif scene == 8 then
animBigRocket:image():drawRotated(300,160,315,1.5)
elseif scene == 9 then
animBigRocket:image():drawRotated(300,160,315,1)
elseif scene == 10 then
animBigRocket:image():drawRotated(300,160,315,0.2)
elseif scene == 11 then
mompos = playdate.math.lerp(mompos,70,0.01)
imgMother:drawRotated(mompos,110,26.6)
animBigRocket:image():drawRotated(300,160,315,0.2)
--gfx.drawText("THANKS FOR PLAYING",200-gfx.getTextSize("THANKS FOR PLAYING")/2,220)
end
if shake > 0 then shake -= .1 elseif shake < 0 then shake = 0 end
processRockParts()
processExplosions()
end

View file

@ -66,8 +66,6 @@ menuButton, error = menu:addMenuItem("game menu", function()
elseif mode == "editor" then
editClose()
song:play(0)
elseif mode == "startCutscene" or mode == "startCutsceneReplay" then
createStars()
end
if mode =="game" or mode == "play" then
@ -75,13 +73,13 @@ menuButton, error = menu:addMenuItem("game menu", function()
removeMap()
killBlades()
end
if mode ~= "music" then
if mode ~= "music" and mode ~= "startCutscene" and mode ~="endCutscene"then
totalEnergy = 0
showEnergy = false
energy = 0
mainMenuCreation()
createMenu(mainmenu)
else
elseif mode == "music" then
song:stop()
paused = false
playbackRate = 1.0

View file

@ -220,15 +220,25 @@ function menuButtonPress(name, index)
mode = "game"
elseif name == "START CUTSCENE" then
beginStartCutscene(false)
local m = {"BACK","WATCH START CUTSCENE", "UNSKIPPABLE"}
m[0] = "dat"
createMenu(m)
elseif name == "END CUTSCENE" then
local m = {"BACK","WATCH END CUTSCENE","UNSKIPPABLE"}
m[0] = "dat"
createMenu(m)
elseif name == "WATCH START CUTSCENE" then
beginStartCutscene(false)
elseif name == "WATCH END CUTSCENE" then
beginEndCutscene()
elseif name == "EXTRAS" then
local m = {}
--barpos = 160
--logopos = -112
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK", "MUSIC BOX", "LINKS", "END CUTSCENE", "START CUTSCENE", "LEVEL SELECT"
--m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK", "MUSIC BOX", "LINKS", "END CUTSCENE", "START CUTSCENE", "LEVEL SELECT"
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK","LINKS","END CUTSCENE", "START CUTSCENE", "MUSIC BOX", "LEVEL SELECT"
if playdate.file.exists("bonusLevels.rocketbytes") then
m[6] = "EXTRA LEVELS"
end
@ -260,7 +270,7 @@ function menuButtonPress(name, index)
elseif name == "BACK" or name == "CANCEL" then
if menu == "musicbox" then
local m = {}
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK", "MUSIC BOX", "LINKS", "END CUTSCENE", "START CUTSCENE", "LEVEL SELECT"
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK","LINKS","END CUTSCENE", "START CUTSCENE", "MUSIC BOX", "LEVEL SELECT"
if playdate.file.exists("bonusLevels.rocketbytes") then
m[6] = "EXTRA LEVELS"
end
@ -270,11 +280,11 @@ function menuButtonPress(name, index)
local m = {}
--barpos = 160
--logopos = -112
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK", "MUSIC BOX", "LINKS", "END CUTSCENE", "START CUTSCENE", "LEVEL SELECT"
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK","LINKS","END CUTSCENE", "START CUTSCENE", "MUSIC BOX", "LEVEL SELECT"
createMenu(m)
elseif menu == "qrs" or menu == "data" then
elseif menu == "qrs" or menu == "data" or menu == "dat" then
local m = {}
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK", "MUSIC BOX", "LINKS", "END CUTSCENE", "START CUTSCENE", "LEVEL SELECT"
m[0],m[1], m[2], m[3], m[4], m[5], m[6] = "extras", "BACK","LINKS","END CUTSCENE", "START CUTSCENE", "MUSIC BOX", "LEVEL SELECT"
createMenu(m)
else
createMenu(mainmenu)

View file

@ -6,7 +6,8 @@ local exps = {}
local stars = {}
function createStars(targetVelocityX,targetVelocityY)
function createStars(targetVelocityX,targetVelocityY, max)
max = max or 4
stars = {}
for _i = 1, 30, 1 do
stars[#stars+1] = {x=math.random(0,400),y=math.random(0,240),dx=math.random(-1.0,1.0)*0.5,dy=math.random(-1.0,1.0)*0.5,size=math.random(2,4)}
@ -15,6 +16,8 @@ function createStars(targetVelocityX,targetVelocityY)
for star = 1, #stars do
star = stars[star]
if star.size > max then star.size = max end
if targetVelocityX then
star.dx += targetVelocityX
else

View file

@ -109,6 +109,9 @@ local function playerWin()
playdate.datastore.write({savedLevel=map,savedDeaths=deaths},"savegame")
next = nil
addMapSave(map)
elseif mode == "game" then
beginEndCutscene()
next = nil
else
next = nil
mainMenuCreation()

View file

@ -5,6 +5,7 @@
},
"fuel": [
],
"next":"data/5. SHUTTLE.json",
"inverted":false,
"rocket": {
"x":1562,

1992
Source/data/5. SHUTTLE.json Normal file

File diff suppressed because it is too large Load diff

1170
Source/data/6. PYRAMID.json Normal file

File diff suppressed because it is too large Load diff

3384
Source/data/7. KITCHEN.json Normal file

File diff suppressed because it is too large Load diff

2542
Source/data/8. LADDER.json Normal file

File diff suppressed because it is too large Load diff

BIN
Source/gfx/starscraper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
Source/launcher/itchio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -2,6 +2,6 @@ name=Rocket Bytes
author=PossiblyAxolotl
description=Help a crew of rockets collect energy to get back home!
bundleID=com.PossiblyAxolotl.RocketBytes
version=DEV.1
version=1.0.0
buildNumber=1
imagePath=launcher

Binary file not shown.

BIN
card.ase

Binary file not shown.