added bonus levels
|
@ -1,6 +1,3 @@
|
||||||
import "CoreLibs/animation"
|
|
||||||
import "CoreLibs/animator"
|
|
||||||
import "CoreLibs/sprites"
|
|
||||||
local gfx <const> = playdate.graphics
|
local gfx <const> = playdate.graphics
|
||||||
|
|
||||||
local imgBigRocket = gfx.image.new("gfx/bigrocket")
|
local imgBigRocket = gfx.image.new("gfx/bigrocket")
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
import "CoreLibs/keyboard"
|
|
||||||
import "CoreLibs/animation"
|
|
||||||
import "CoreLibs/math"
|
|
||||||
|
|
||||||
local gfx <const> = playdate.graphics
|
local gfx <const> = playdate.graphics
|
||||||
local prevtext = ""
|
local prevtext = ""
|
||||||
local levelname = nil
|
local levelname = nil
|
||||||
|
@ -517,6 +513,7 @@ function editClose()
|
||||||
tiles = {}
|
tiles = {}
|
||||||
powers = {}
|
powers = {}
|
||||||
sawblades = {}
|
sawblades = {}
|
||||||
|
spins = {}
|
||||||
editor = "main"
|
editor = "main"
|
||||||
tileIndex = 0
|
tileIndex = 0
|
||||||
playdate.display.setInverted(false)
|
playdate.display.setInverted(false)
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
|
|
||||||
import "CoreLibs/graphics"
|
import "CoreLibs/graphics"
|
||||||
import "CoreLibs/sprites"
|
import "CoreLibs/sprites"
|
||||||
|
import "CoreLibs/math"
|
||||||
|
import "CoreLibs/animation"
|
||||||
|
import "CoreLibs/animator"
|
||||||
|
import "CoreLibs/timer"
|
||||||
|
import "CoreLibs/easing"
|
||||||
|
import "CoreLibs/keyboard"
|
||||||
import "CoreLibs/ui"
|
import "CoreLibs/ui"
|
||||||
import "Cutscenes"
|
import "Cutscenes"
|
||||||
import "Particles"
|
import "Particles"
|
||||||
|
@ -37,7 +43,6 @@ gfx.setBackgroundColor(gfx.kColorBlack)
|
||||||
song = playdate.sound.fileplayer.new("sfx/song1")
|
song = playdate.sound.fileplayer.new("sfx/song1")
|
||||||
song:setVolume(0.5)
|
song:setVolume(0.5)
|
||||||
--song:setVolume(0.5,0.5, 1)
|
--song:setVolume(0.5,0.5, 1)
|
||||||
song:play(0)
|
|
||||||
|
|
||||||
local imgSkull = gfx.image.new("gfx/skullEmoji")
|
local imgSkull = gfx.image.new("gfx/skullEmoji")
|
||||||
local imgLightning = gfx.image.new("gfx/lightning")
|
local imgLightning = gfx.image.new("gfx/lightning")
|
||||||
|
@ -86,13 +91,17 @@ if playdate.file.exists("levels") == false then
|
||||||
playdate.file.mkdir("levels")
|
playdate.file.mkdir("levels")
|
||||||
end
|
end
|
||||||
|
|
||||||
if playdate.file.exists("levels/ROCKETBYTES LEVEL 1.json") == false then
|
if playdate.file.exists("levels/BONUS LEVEL 1.json") == false then
|
||||||
local data = json.decodeFile("data/.bl1")
|
local data = json.decodeFile("bl1.json")
|
||||||
playdate.datastore.write(data,"levels/ROCKETBYTES LEVEL 1")
|
playdate.datastore.write(data,"levels/BONUS LEVEL 1")
|
||||||
data = json.decodeFile("data/.bl2")
|
data = json.decodeFile("bl2.json")
|
||||||
playdate.datastore.write(data,"levels/ROCKETBYTES LEVEL 2")
|
playdate.datastore.write(data,"levels/BONUS LEVEL 2")
|
||||||
|
data = json.decodeFile("bl3.json")
|
||||||
|
playdate.datastore.write(data,"levels/BONUS LEVEL 3")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
song:play(0)
|
||||||
|
|
||||||
function playdate.update()
|
function playdate.update()
|
||||||
if mode == "menu" then
|
if mode == "menu" then
|
||||||
updateMenu()
|
updateMenu()
|
||||||
|
|
|
@ -2,6 +2,7 @@ paused = false
|
||||||
playbackRate = 1.0
|
playbackRate = 1.0
|
||||||
local timeRate = true
|
local timeRate = true
|
||||||
songTitle = "AAA"
|
songTitle = "AAA"
|
||||||
|
local number = math.random(1000,9999)
|
||||||
|
|
||||||
local imgDither = playdate.graphics.image.new("gfx/dither")
|
local imgDither = playdate.graphics.image.new("gfx/dither")
|
||||||
local imgCover = playdate.graphics.image.new("gfx/cover1bit")
|
local imgCover = playdate.graphics.image.new("gfx/cover1bit")
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
import "CoreLibs/math"
|
|
||||||
import "CoreLibs/animation"
|
|
||||||
import "CoreLibs/animator"
|
|
||||||
import "CoreLibs/timer"
|
|
||||||
import "CoreLibs/easing"
|
|
||||||
|
|
||||||
local velocity = {x=0,y=0}
|
local velocity = {x=0,y=0}
|
||||||
local lerpmnt <const> = 0.5
|
local lerpmnt <const> = 0.5
|
||||||
local grav <const> = 0.2
|
local grav <const> = 0.2
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import "CoreLibs/animator"
|
|
||||||
import "CoreLibs/animation"
|
|
||||||
local gfx <const> = playdate.graphics
|
local gfx <const> = playdate.graphics
|
||||||
|
|
||||||
local imgSaw = gfx.imagetable.new("gfx/sawblades")
|
local imgSaw = gfx.imagetable.new("gfx/sawblades")
|
||||||
|
@ -133,6 +131,7 @@ function updateSaws()
|
||||||
b = blades[b]
|
b = blades[b]
|
||||||
b.saw:setImage(loopSaws:image())
|
b.saw:setImage(loopSaws:image())
|
||||||
local pos = playdate.geometry.point.new(b.saw:getPosition())
|
local pos = playdate.geometry.point.new(b.saw:getPosition())
|
||||||
|
|
||||||
if pos == b.start then
|
if pos == b.start then
|
||||||
local a = gfx.animator.new(b.speed*1000, b.start, b.ends)
|
local a = gfx.animator.new(b.speed*1000, b.start, b.ends)
|
||||||
|
|
||||||
|
@ -149,16 +148,21 @@ function updateSaws()
|
||||||
local s = spinblades[spinner]
|
local s = spinblades[spinner]
|
||||||
|
|
||||||
s.time += s.speed
|
s.time += s.speed
|
||||||
print(s.time)
|
|
||||||
|
|
||||||
for len = 1, #s.layers, 1 do
|
for len = 1, #s.layers, 1 do
|
||||||
local arc = s.layers[len].curve
|
local arc = s.layers[len].curve
|
||||||
|
|
||||||
for arm = 1, #s.layers[len].saws, 1 do
|
for arm = 1, #s.layers[len].saws, 1 do
|
||||||
local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (s.time * len))
|
|
||||||
if s.time > arc:length() / 4 or s.time < -arc:length() / 4 then s.time = 0 end
|
if s.time > arc:length() / 4 or s.time < -arc:length() / 4 then s.time = 0 end
|
||||||
|
if s.speed > 0 then
|
||||||
|
local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (s.time * len))
|
||||||
|
|
||||||
s.layers[len].saws[arm]:moveTo(sawPos.x,sawPos.y)
|
s.layers[len].saws[arm]:moveTo(sawPos.x,sawPos.y)
|
||||||
|
else
|
||||||
|
local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (-s.time * len))
|
||||||
|
|
||||||
|
s.layers[len].saws[arm]:moveTo(s.mid.x -(s.mid.y - sawPos.y) ,s.mid.y -(s.mid.x - sawPos.x))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
3087
Source/bl3.json
Normal file
Before Width: | Height: | Size: 981 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2 KiB |
|
@ -1,3 +0,0 @@
|
||||||
loopCount=0
|
|
||||||
frames = 33x4,32x4
|
|
||||||
introFrames=1,2,3,4,5,6,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
|
|
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2 KiB |