more levels
This commit is contained in:
parent
e12c94f330
commit
2b54cb0961
18 changed files with 9252 additions and 13 deletions
|
@ -3,9 +3,11 @@ local gfx <const> = playdate.graphics
|
||||||
local imgBigRocket = gfx.image.new("gfx/bigrocket")
|
local imgBigRocket = gfx.image.new("gfx/bigrocket")
|
||||||
local tabBigRocket = gfx.imagetable.new("gfx/bigrocketfire")
|
local tabBigRocket = gfx.imagetable.new("gfx/bigrocketfire")
|
||||||
local tabSmallRocket = gfx.imagetable.new("gfx/fire")
|
local tabSmallRocket = gfx.imagetable.new("gfx/fire")
|
||||||
|
local imgMother = gfx.image.new("gfx/starscraper")
|
||||||
assert(imgBigRocket)
|
assert(imgBigRocket)
|
||||||
assert(tabBigRocket)
|
assert(tabBigRocket)
|
||||||
assert(tabSmallRocket)
|
assert(tabSmallRocket)
|
||||||
|
assert(imgMother)
|
||||||
|
|
||||||
local shake = 0
|
local shake = 0
|
||||||
|
|
||||||
|
@ -118,12 +120,45 @@ assert(imgEndPlatform)
|
||||||
local scene = 1
|
local scene = 1
|
||||||
local platformY = -imgEndPlatform.height
|
local platformY = -imgEndPlatform.height
|
||||||
local endRocketY = 0
|
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()
|
function beginEndCutscene()
|
||||||
mode = "endCutscene"
|
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:stop()
|
||||||
song:load("sfx/song4")
|
song:load("sfx/song4")
|
||||||
|
|
||||||
|
playdate.timer.new(1000, function ()
|
||||||
|
|
||||||
playdate.timer.new(3200, function ()
|
playdate.timer.new(3200, function ()
|
||||||
scene = 2
|
scene = 2
|
||||||
end)
|
end)
|
||||||
|
@ -141,8 +176,65 @@ function beginEndCutscene()
|
||||||
explode(200,150)
|
explode(200,150)
|
||||||
end)
|
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
|
end
|
||||||
|
|
||||||
function processEndCutscene()
|
function processEndCutscene()
|
||||||
|
@ -165,8 +257,52 @@ function processEndCutscene()
|
||||||
end
|
end
|
||||||
elseif scene == 4 then
|
elseif scene == 4 then
|
||||||
animBigRocket:image():drawScaled(200-imgBigRocket.width*0.75,120-imgBigRocket.height*0.75,1.5)
|
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
|
end
|
||||||
|
|
||||||
if shake > 0 then shake -= .1 elseif shake < 0 then shake = 0 end
|
if shake > 0 then shake -= .1 elseif shake < 0 then shake = 0 end
|
||||||
|
processRockParts()
|
||||||
processExplosions()
|
processExplosions()
|
||||||
end
|
end
|
|
@ -66,8 +66,6 @@ menuButton, error = menu:addMenuItem("game menu", function()
|
||||||
elseif mode == "editor" then
|
elseif mode == "editor" then
|
||||||
editClose()
|
editClose()
|
||||||
song:play(0)
|
song:play(0)
|
||||||
elseif mode == "startCutscene" or mode == "startCutsceneReplay" then
|
|
||||||
createStars()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if mode =="game" or mode == "play" then
|
if mode =="game" or mode == "play" then
|
||||||
|
@ -75,13 +73,13 @@ menuButton, error = menu:addMenuItem("game menu", function()
|
||||||
removeMap()
|
removeMap()
|
||||||
killBlades()
|
killBlades()
|
||||||
end
|
end
|
||||||
if mode ~= "music" then
|
if mode ~= "music" and mode ~= "startCutscene" and mode ~="endCutscene"then
|
||||||
totalEnergy = 0
|
totalEnergy = 0
|
||||||
showEnergy = false
|
showEnergy = false
|
||||||
energy = 0
|
energy = 0
|
||||||
mainMenuCreation()
|
mainMenuCreation()
|
||||||
createMenu(mainmenu)
|
createMenu(mainmenu)
|
||||||
else
|
elseif mode == "music" then
|
||||||
song:stop()
|
song:stop()
|
||||||
paused = false
|
paused = false
|
||||||
playbackRate = 1.0
|
playbackRate = 1.0
|
||||||
|
|
|
@ -220,15 +220,25 @@ function menuButtonPress(name, index)
|
||||||
mode = "game"
|
mode = "game"
|
||||||
|
|
||||||
elseif name == "START CUTSCENE" then
|
elseif name == "START CUTSCENE" then
|
||||||
beginStartCutscene(false)
|
local m = {"BACK","WATCH START CUTSCENE", "UNSKIPPABLE"}
|
||||||
|
m[0] = "dat"
|
||||||
|
createMenu(m)
|
||||||
elseif name == "END CUTSCENE" then
|
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()
|
beginEndCutscene()
|
||||||
|
|
||||||
elseif name == "EXTRAS" then
|
elseif name == "EXTRAS" then
|
||||||
local m = {}
|
local m = {}
|
||||||
--barpos = 160
|
--barpos = 160
|
||||||
--logopos = -112
|
--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
|
if playdate.file.exists("bonusLevels.rocketbytes") then
|
||||||
m[6] = "EXTRA LEVELS"
|
m[6] = "EXTRA LEVELS"
|
||||||
end
|
end
|
||||||
|
@ -260,7 +270,7 @@ function menuButtonPress(name, index)
|
||||||
elseif name == "BACK" or name == "CANCEL" then
|
elseif name == "BACK" or name == "CANCEL" then
|
||||||
if menu == "musicbox" then
|
if menu == "musicbox" then
|
||||||
local m = {}
|
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
|
if playdate.file.exists("bonusLevels.rocketbytes") then
|
||||||
m[6] = "EXTRA LEVELS"
|
m[6] = "EXTRA LEVELS"
|
||||||
end
|
end
|
||||||
|
@ -270,11 +280,11 @@ function menuButtonPress(name, index)
|
||||||
local m = {}
|
local m = {}
|
||||||
--barpos = 160
|
--barpos = 160
|
||||||
--logopos = -112
|
--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)
|
createMenu(m)
|
||||||
elseif menu == "qrs" or menu == "data" then
|
elseif menu == "qrs" or menu == "data" or menu == "dat" then
|
||||||
local m = {}
|
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)
|
createMenu(m)
|
||||||
else
|
else
|
||||||
createMenu(mainmenu)
|
createMenu(mainmenu)
|
||||||
|
|
|
@ -6,7 +6,8 @@ local exps = {}
|
||||||
|
|
||||||
local stars = {}
|
local stars = {}
|
||||||
|
|
||||||
function createStars(targetVelocityX,targetVelocityY)
|
function createStars(targetVelocityX,targetVelocityY, max)
|
||||||
|
max = max or 4
|
||||||
stars = {}
|
stars = {}
|
||||||
for _i = 1, 30, 1 do
|
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)}
|
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
|
for star = 1, #stars do
|
||||||
star = stars[star]
|
star = stars[star]
|
||||||
|
|
||||||
|
if star.size > max then star.size = max end
|
||||||
|
|
||||||
if targetVelocityX then
|
if targetVelocityX then
|
||||||
star.dx += targetVelocityX
|
star.dx += targetVelocityX
|
||||||
else
|
else
|
||||||
|
|
|
@ -109,6 +109,9 @@ local function playerWin()
|
||||||
playdate.datastore.write({savedLevel=map,savedDeaths=deaths},"savegame")
|
playdate.datastore.write({savedLevel=map,savedDeaths=deaths},"savegame")
|
||||||
next = nil
|
next = nil
|
||||||
addMapSave(map)
|
addMapSave(map)
|
||||||
|
elseif mode == "game" then
|
||||||
|
beginEndCutscene()
|
||||||
|
next = nil
|
||||||
else
|
else
|
||||||
next = nil
|
next = nil
|
||||||
mainMenuCreation()
|
mainMenuCreation()
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
},
|
},
|
||||||
"fuel": [
|
"fuel": [
|
||||||
],
|
],
|
||||||
|
"next":"data/5. SHUTTLE.json",
|
||||||
"inverted":false,
|
"inverted":false,
|
||||||
"rocket": {
|
"rocket": {
|
||||||
"x":1562,
|
"x":1562,
|
||||||
|
|
1992
Source/data/5. SHUTTLE.json
Normal file
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
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
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
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
BIN
Source/gfx/starscraper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
Source/launcher/biggeritchio.png
Normal file
BIN
Source/launcher/biggeritchio.png
Normal file
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
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 |
|
@ -2,6 +2,6 @@ name=Rocket Bytes
|
||||||
author=PossiblyAxolotl
|
author=PossiblyAxolotl
|
||||||
description=Help a crew of rockets collect energy to get back home!
|
description=Help a crew of rockets collect energy to get back home!
|
||||||
bundleID=com.PossiblyAxolotl.RocketBytes
|
bundleID=com.PossiblyAxolotl.RocketBytes
|
||||||
version=DEV.1
|
version=1.0.0
|
||||||
buildNumber=1
|
buildNumber=1
|
||||||
imagePath=launcher
|
imagePath=launcher
|
Binary file not shown.
BIN
card.ase
BIN
card.ase
Binary file not shown.
Loading…
Reference in a new issue