diff --git a/charts/picoSongs.lua b/charts/picoSongs.lua
index ebdd453..aabb0c6 100644
--- a/charts/picoSongs.lua
+++ b/charts/picoSongs.lua
@@ -6,6 +6,7 @@ return {
"normal",
"hard"
},
+ icon = "dadpixel"
},
{
name = "fresh",
@@ -14,6 +15,7 @@ return {
"normal",
"hard"
},
+ icon = "dadpixel"
},
{
name = "dad-battle",
@@ -22,6 +24,7 @@ return {
"normal",
"hard"
},
+ icon = "dadpixel"
},
{
name = "south",
@@ -30,6 +33,7 @@ return {
"normal",
"hard"
},
+ icon = "spookypixel"
},
{
name = "pico",
@@ -38,6 +42,7 @@ return {
"normal",
"hard"
},
+ icon = "picopixel"
},
{
name = "philly-nice",
@@ -46,6 +51,7 @@ return {
"normal",
"hard"
},
+ icon = "picopixel"
},
{
name = "blammed",
@@ -54,6 +60,7 @@ return {
"normal",
"hard"
},
+ icon = "picopixel"
},
{
name = "cocoa",
@@ -62,6 +69,7 @@ return {
"normal",
"hard"
},
+ icon = "parents-christmaspixel"
},
{
name = "eggnog",
@@ -70,6 +78,7 @@ return {
"normal",
"hard"
},
+ icon = "parents-christmaspixel"
},
{
name = "guns",
@@ -77,6 +86,7 @@ return {
"easy",
"normal",
"hard"
- }
+ },
+ icon = "tankmanpixel"
}
}
\ No newline at end of file
diff --git a/charts/satin-panties/script.lua b/charts/satin-panties/script.lua
index f5dc910..4e2c97a 100644
--- a/charts/satin-panties/script.lua
+++ b/charts/satin-panties/script.lua
@@ -38,21 +38,29 @@ end
function module.onUpdate(dt, elapsed)
if enabled then
- for index, note in next, module.shared.notes do
- if note.mustPress then
- note.offset.x = math.sin(math.rad(degree)) * (note.position - elapsed) * module.shared.speed
- note.offset.y = (math.cos(math.rad(degree)) * (note.position - elapsed) * module.shared.speed) - (note.position - elapsed)
- -- note.sprite.rotation = degree
- end
- end
- for index, hold in next, module.shared.holds do
- if hold.mustPress then
- hold.offset.x = math.sin(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed
- hold.offset.y = (math.cos(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed) - (hold.position - elapsed)
- hold.sprite.rotation = degree
- end
- end
+ -- for index, note in next, module.shared.notes do
+ -- if note.mustPress then
+ -- note.offset.x = math.sin(math.rad(degree)) * (note.position - elapsed) * module.shared.speed
+ -- note.offset.y = (math.cos(math.rad(degree)) * (note.position - elapsed) * module.shared.speed) - (note.position - elapsed)
+ -- -- note.sprite.rotation = degree
+ -- end
+ -- end
+ -- for index, hold in next, module.shared.holds do
+ -- if hold.mustPress then
+ -- hold.offset.x = math.sin(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed
+ -- hold.offset.y = (math.cos(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed) - (hold.position - elapsed)
+ -- hold.sprite.rotation = degree
+ -- end
+ -- end
+
+ local evil = math.cos(elapsed / 100) * 100
+ local evilb = math.sin(elapsed / 100) * 100
+ love.window.setPosition(325 + evil, 180 + evilb)
end
end
+function module.onClose()
+ love.window.setPosition(325, 180)
+end
+
return module
\ No newline at end of file
diff --git a/charts/songs.lua b/charts/songs.lua
index f25aad5..a5f1642 100644
--- a/charts/songs.lua
+++ b/charts/songs.lua
@@ -6,6 +6,7 @@ return {
"normal",
"hard"
},
+ icon = "gfpixel"
},
{
name = "bopeebo",
@@ -15,6 +16,7 @@ return {
"hard",
"erect"
},
+ icon = "dadpixel"
},
{
name = "fresh",
@@ -24,6 +26,7 @@ return {
"hard",
"erect"
},
+ icon = "dadpixel"
},
{
name = "dad-battle",
@@ -33,6 +36,7 @@ return {
"hard",
"erect"
},
+ icon = "dadpixel"
},
{
name = "spookeez",
@@ -42,6 +46,7 @@ return {
"hard",
"erect"
},
+ icon = "spookypixel"
},
{
name = "south",
@@ -51,6 +56,7 @@ return {
"hard",
"erect"
},
+ icon = "spookypixel"
},
{
name = "monster",
@@ -59,6 +65,7 @@ return {
"normal",
"hard"
},
+ icon = "monsterpixel"
},
{
name = "pico",
@@ -68,6 +75,7 @@ return {
"hard",
"erect"
},
+ icon = "picopixel"
},
{
name = "philly-nice",
@@ -77,6 +85,7 @@ return {
"hard",
"erect"
},
+ icon = "picopixel"
},
{
name = "blammed",
@@ -86,6 +95,7 @@ return {
"hard",
"erect"
},
+ icon = "picopixel"
},
{
name = "satin-panties",
@@ -95,6 +105,7 @@ return {
"hard",
"erect"
},
+ icon = "mommypixel"
},
{
name = "high",
@@ -104,6 +115,7 @@ return {
"hard",
"erect"
},
+ icon = "mommypixel"
},
{
name = "milf",
@@ -112,6 +124,7 @@ return {
"normal",
"hard"
},
+ icon = "mommypixel"
},
{
name = "cocoa",
@@ -121,6 +134,7 @@ return {
"hard",
"erect"
},
+ icon = "parents-christmaspixel"
},
{
name = "eggnog",
@@ -130,6 +144,7 @@ return {
"hard",
"erect"
},
+ icon = "parents-christmaspixel"
},
{
name = "winter-horrorland",
@@ -138,6 +153,7 @@ return {
"normal",
"hard"
},
+ icon = "monsterpixel"
},
{
name = "ugh",
@@ -148,6 +164,7 @@ return {
"erect",
"nightmare"
},
+ icon = "tankmanpixel"
},
{
name = "guns",
@@ -156,6 +173,7 @@ return {
"normal",
"hard"
},
+ icon = "tankmanpixel"
},
{
name = "stress",
@@ -164,5 +182,6 @@ return {
"normal",
"hard"
},
+ icon = "tankmanpixel"
}
}
\ No newline at end of file
diff --git a/sprites/freeplay/freeplaySelector.json b/sprites/freeplay/freeplaySelector.json
new file mode 100644
index 0000000..ad1bd29
--- /dev/null
+++ b/sprites/freeplay/freeplaySelector.json
@@ -0,0 +1,112 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "arrow pointer loop0000",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0001",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0003",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0004",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0005",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0006",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0007",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0008",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0009",
+ "_x": "54",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0010",
+ "_x": "54",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0011",
+ "_x": "54",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0012",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0013",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0014",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ }
+ ],
+ "_imagePath": "freeplaySelector.png"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/freeplaySelector.png b/sprites/freeplay/freeplaySelector.png
new file mode 100644
index 0000000..1958267
Binary files /dev/null and b/sprites/freeplay/freeplaySelector.png differ
diff --git a/sprites/freeplay/freeplaySelector_pico.json b/sprites/freeplay/freeplaySelector_pico.json
new file mode 100644
index 0000000..a15be3b
--- /dev/null
+++ b/sprites/freeplay/freeplaySelector_pico.json
@@ -0,0 +1,112 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "arrow pointer loop0000",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0001",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0003",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0004",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0005",
+ "_x": "54",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0006",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0007",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0008",
+ "_x": "108",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0009",
+ "_x": "162",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0010",
+ "_x": "162",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0011",
+ "_x": "162",
+ "_y": "0",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0012",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0013",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ },
+ {
+ "_name": "arrow pointer loop0014",
+ "_x": "0",
+ "_y": "95",
+ "_width": "49",
+ "_height": "90"
+ }
+ ],
+ "_imagePath": "freeplaySelector_pico.png"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/freeplaySelector_pico.png b/sprites/freeplay/freeplaySelector_pico.png
new file mode 100644
index 0000000..9c9755c
Binary files /dev/null and b/sprites/freeplay/freeplaySelector_pico.png differ
diff --git a/sprites/freeplay/icons/bfpixel.json b/sprites/freeplay/icons/bfpixel.json
new file mode 100644
index 0000000..67dbff2
--- /dev/null
+++ b/sprites/freeplay/icons/bfpixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "44",
+ "_y": "0",
+ "_width": "42",
+ "_height": "28",
+ "_frameX": "-3",
+ "_frameY": "-12",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "44",
+ "_y": "0",
+ "_width": "42",
+ "_height": "28",
+ "_frameX": "-3",
+ "_frameY": "-12",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "44",
+ "_height": "25",
+ "_frameX": "-0",
+ "_frameY": "-19",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "86",
+ "_y": "0",
+ "_width": "33",
+ "_height": "37",
+ "_frameX": "-5",
+ "_frameY": "-6",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "0",
+ "_y": "25",
+ "_width": "37",
+ "_height": "31",
+ "_frameX": "-4",
+ "_frameY": "-9",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "0",
+ "_y": "25",
+ "_width": "37",
+ "_height": "31",
+ "_frameX": "-4",
+ "_frameY": "-9",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ }
+ ],
+ "_imagePath": "bfpixel.png",
+ "_width": "119",
+ "_height": "56"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/bfpixel.png b/sprites/freeplay/icons/bfpixel.png
new file mode 100644
index 0000000..b5fdba4
Binary files /dev/null and b/sprites/freeplay/icons/bfpixel.png differ
diff --git a/sprites/freeplay/icons/bfpixel.xml b/sprites/freeplay/icons/bfpixel.xml
new file mode 100644
index 0000000..080f4ff
--- /dev/null
+++ b/sprites/freeplay/icons/bfpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/dadpixel.json b/sprites/freeplay/icons/dadpixel.json
new file mode 100644
index 0000000..63dd782
--- /dev/null
+++ b/sprites/freeplay/icons/dadpixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "0",
+ "_y": "77",
+ "_width": "31",
+ "_height": "33",
+ "_frameX": "-12",
+ "_frameY": "-6",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "0",
+ "_y": "77",
+ "_width": "31",
+ "_height": "33",
+ "_frameX": "-12",
+ "_frameY": "-6",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "0",
+ "_y": "110",
+ "_width": "34",
+ "_height": "31",
+ "_frameX": "-11",
+ "_frameY": "-9",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "0",
+ "_y": "0",
+ "_width": "32",
+ "_height": "39",
+ "_frameX": "-11",
+ "_frameY": "-1",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "0",
+ "_y": "39",
+ "_width": "32",
+ "_height": "38",
+ "_frameX": "-12",
+ "_frameY": "-2",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "0",
+ "_y": "39",
+ "_width": "32",
+ "_height": "38",
+ "_frameX": "-12",
+ "_frameY": "-2",
+ "_frameWidth": "50",
+ "_frameHeight": "40"
+ }
+ ],
+ "_imagePath": "dadpixel.png",
+ "_width": "34",
+ "_height": "141"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/dadpixel.png b/sprites/freeplay/icons/dadpixel.png
new file mode 100644
index 0000000..481f9a6
Binary files /dev/null and b/sprites/freeplay/icons/dadpixel.png differ
diff --git a/sprites/freeplay/icons/dadpixel.xml b/sprites/freeplay/icons/dadpixel.xml
new file mode 100644
index 0000000..e3556e7
--- /dev/null
+++ b/sprites/freeplay/icons/dadpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/darnellpixel.png b/sprites/freeplay/icons/darnellpixel.png
new file mode 100644
index 0000000..7f5a8d0
Binary files /dev/null and b/sprites/freeplay/icons/darnellpixel.png differ
diff --git a/sprites/freeplay/icons/darnellpixel.xml b/sprites/freeplay/icons/darnellpixel.xml
new file mode 100644
index 0000000..835fefb
--- /dev/null
+++ b/sprites/freeplay/icons/darnellpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/gfpixel.json b/sprites/freeplay/icons/gfpixel.json
new file mode 100644
index 0000000..f75438b
--- /dev/null
+++ b/sprites/freeplay/icons/gfpixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "0",
+ "_y": "39",
+ "_width": "38",
+ "_height": "37",
+ "_frameX": "-5",
+ "_frameY": "-8",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "0",
+ "_y": "39",
+ "_width": "38",
+ "_height": "37",
+ "_frameX": "-5",
+ "_frameY": "-8",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "36",
+ "_height": "39",
+ "_frameX": "-6",
+ "_frameY": "-5",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "73",
+ "_y": "0",
+ "_width": "38",
+ "_height": "33",
+ "_frameX": "-6",
+ "_frameY": "-11",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "36",
+ "_y": "0",
+ "_width": "37",
+ "_height": "34",
+ "_frameX": "-6",
+ "_frameY": "-9",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm-hold0004",
+ "_x": "36",
+ "_y": "0",
+ "_width": "37",
+ "_height": "34",
+ "_frameX": "-6",
+ "_frameY": "-9",
+ "_frameWidth": "50",
+ "_frameHeight": "50"
+ }
+ ],
+ "_imagePath": "gfpixel.png",
+ "_width": "111",
+ "_height": "76"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/gfpixel.png b/sprites/freeplay/icons/gfpixel.png
new file mode 100644
index 0000000..68c03a7
Binary files /dev/null and b/sprites/freeplay/icons/gfpixel.png differ
diff --git a/sprites/freeplay/icons/gfpixel.xml b/sprites/freeplay/icons/gfpixel.xml
new file mode 100644
index 0000000..6ecc117
--- /dev/null
+++ b/sprites/freeplay/icons/gfpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/mommypixel.json b/sprites/freeplay/icons/mommypixel.json
new file mode 100644
index 0000000..017824d
--- /dev/null
+++ b/sprites/freeplay/icons/mommypixel.json
@@ -0,0 +1,86 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "232",
+ "_y": "1",
+ "_width": "42",
+ "_height": "44",
+ "_frameX": "-11",
+ "_frameY": "-9",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "94",
+ "_y": "1",
+ "_width": "43",
+ "_height": "45",
+ "_frameX": "-12",
+ "_frameY": "-8",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "1",
+ "_y": "1",
+ "_width": "44",
+ "_height": "48",
+ "_frameX": "-8",
+ "_frameY": "-9",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "186",
+ "_y": "1",
+ "_width": "43",
+ "_height": "44",
+ "_frameX": "-9",
+ "_frameY": "-13",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "48",
+ "_y": "1",
+ "_width": "43",
+ "_height": "47",
+ "_frameX": "-9",
+ "_frameY": "-10",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm0005",
+ "_x": "140",
+ "_y": "1",
+ "_width": "43",
+ "_height": "45",
+ "_frameX": "-9",
+ "_frameY": "-12",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "140",
+ "_y": "1",
+ "_width": "43",
+ "_height": "45",
+ "_frameX": "-9",
+ "_frameY": "-12",
+ "_frameWidth": "60",
+ "_frameHeight": "60"
+ }
+ ],
+ "_imagePath": "mommypixel.png",
+ "_width": "275",
+ "_height": "50"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/mommypixel.png b/sprites/freeplay/icons/mommypixel.png
new file mode 100644
index 0000000..2cb8475
Binary files /dev/null and b/sprites/freeplay/icons/mommypixel.png differ
diff --git a/sprites/freeplay/icons/mommypixel.xml b/sprites/freeplay/icons/mommypixel.xml
new file mode 100644
index 0000000..25a184f
--- /dev/null
+++ b/sprites/freeplay/icons/mommypixel.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/monsterpixel.json b/sprites/freeplay/icons/monsterpixel.json
new file mode 100644
index 0000000..1478496
--- /dev/null
+++ b/sprites/freeplay/icons/monsterpixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "85",
+ "_y": "0",
+ "_width": "38",
+ "_height": "25",
+ "_frameX": "-5",
+ "_frameY": "-2",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "85",
+ "_y": "0",
+ "_width": "38",
+ "_height": "25",
+ "_frameX": "-5",
+ "_frameY": "-2",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "45",
+ "_height": "22",
+ "_frameX": "-0",
+ "_frameY": "-6",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "45",
+ "_y": "0",
+ "_width": "40",
+ "_height": "31",
+ "_frameX": "-3",
+ "_frameY": "-0",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "0",
+ "_y": "22",
+ "_width": "40",
+ "_height": "27",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "0",
+ "_y": "22",
+ "_width": "40",
+ "_height": "27",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "45",
+ "_frameHeight": "31"
+ }
+ ],
+ "_imagePath": "monsterpixel.png",
+ "_width": "123",
+ "_height": "49"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/monsterpixel.png b/sprites/freeplay/icons/monsterpixel.png
new file mode 100644
index 0000000..ac7668b
Binary files /dev/null and b/sprites/freeplay/icons/monsterpixel.png differ
diff --git a/sprites/freeplay/icons/monsterpixel.xml b/sprites/freeplay/icons/monsterpixel.xml
new file mode 100644
index 0000000..747c0e9
--- /dev/null
+++ b/sprites/freeplay/icons/monsterpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/parents-christmaspixel.json b/sprites/freeplay/icons/parents-christmaspixel.json
new file mode 100644
index 0000000..bda45c2
--- /dev/null
+++ b/sprites/freeplay/icons/parents-christmaspixel.json
@@ -0,0 +1,86 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "0",
+ "_y": "43",
+ "_width": "57",
+ "_height": "44",
+ "_frameX": "-7",
+ "_frameY": "-3",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "0",
+ "_y": "43",
+ "_width": "57",
+ "_height": "44",
+ "_frameX": "-7",
+ "_frameY": "-3",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "122",
+ "_y": "0",
+ "_width": "59",
+ "_height": "45",
+ "_frameX": "-4",
+ "_frameY": "-2",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "61",
+ "_y": "42",
+ "_width": "59",
+ "_height": "43",
+ "_frameX": "-6",
+ "_frameY": "-2",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "61",
+ "_y": "0",
+ "_width": "61",
+ "_height": "42",
+ "_frameX": "-5",
+ "_frameY": "-4",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm0005",
+ "_x": "0",
+ "_y": "0",
+ "_width": "61",
+ "_height": "43",
+ "_frameX": "-5",
+ "_frameY": "-3",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "0",
+ "_y": "0",
+ "_width": "61",
+ "_height": "43",
+ "_frameX": "-5",
+ "_frameY": "-3",
+ "_frameWidth": "72",
+ "_frameHeight": "50"
+ }
+ ],
+ "_imagePath": "parents-christmaspixel.png",
+ "_width": "181",
+ "_height": "87"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/parents-christmaspixel.png b/sprites/freeplay/icons/parents-christmaspixel.png
new file mode 100644
index 0000000..a115dc9
Binary files /dev/null and b/sprites/freeplay/icons/parents-christmaspixel.png differ
diff --git a/sprites/freeplay/icons/parents-christmaspixel.xml b/sprites/freeplay/icons/parents-christmaspixel.xml
new file mode 100644
index 0000000..a2e6057
--- /dev/null
+++ b/sprites/freeplay/icons/parents-christmaspixel.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/picopixel.json b/sprites/freeplay/icons/picopixel.json
new file mode 100644
index 0000000..1fe0d64
--- /dev/null
+++ b/sprites/freeplay/icons/picopixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "0",
+ "_y": "0",
+ "_width": "33",
+ "_height": "29",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "0",
+ "_y": "0",
+ "_width": "33",
+ "_height": "29",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "33",
+ "_y": "0",
+ "_width": "33",
+ "_height": "29",
+ "_frameX": "-2",
+ "_frameY": "-3",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "99",
+ "_y": "0",
+ "_width": "32",
+ "_height": "28",
+ "_frameX": "-4",
+ "_frameY": "-2",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "66",
+ "_y": "0",
+ "_width": "33",
+ "_height": "29",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "66",
+ "_y": "0",
+ "_width": "33",
+ "_height": "29",
+ "_frameX": "-3",
+ "_frameY": "-2",
+ "_frameWidth": "36",
+ "_frameHeight": "32"
+ }
+ ],
+ "_imagePath": "picopixel.png",
+ "_width": "131",
+ "_height": "29"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/picopixel.png b/sprites/freeplay/icons/picopixel.png
new file mode 100644
index 0000000..0b16a4a
Binary files /dev/null and b/sprites/freeplay/icons/picopixel.png differ
diff --git a/sprites/freeplay/icons/picopixel.xml b/sprites/freeplay/icons/picopixel.xml
new file mode 100644
index 0000000..cd896c2
--- /dev/null
+++ b/sprites/freeplay/icons/picopixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/senpaipixel.png b/sprites/freeplay/icons/senpaipixel.png
new file mode 100644
index 0000000..86f0975
Binary files /dev/null and b/sprites/freeplay/icons/senpaipixel.png differ
diff --git a/sprites/freeplay/icons/senpaipixel.xml b/sprites/freeplay/icons/senpaipixel.xml
new file mode 100644
index 0000000..039d3f5
--- /dev/null
+++ b/sprites/freeplay/icons/senpaipixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/spiritpixel.png b/sprites/freeplay/icons/spiritpixel.png
new file mode 100644
index 0000000..878d5ec
Binary files /dev/null and b/sprites/freeplay/icons/spiritpixel.png differ
diff --git a/sprites/freeplay/icons/spiritpixel.xml b/sprites/freeplay/icons/spiritpixel.xml
new file mode 100644
index 0000000..651e1fa
--- /dev/null
+++ b/sprites/freeplay/icons/spiritpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/spookypixel.json b/sprites/freeplay/icons/spookypixel.json
new file mode 100644
index 0000000..34d1e52
--- /dev/null
+++ b/sprites/freeplay/icons/spookypixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "43",
+ "_y": "33",
+ "_width": "40",
+ "_height": "33",
+ "_frameX": "-7",
+ "_frameY": "-3",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "43",
+ "_y": "33",
+ "_width": "40",
+ "_height": "33",
+ "_frameX": "-7",
+ "_frameY": "-3",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "0",
+ "_y": "0",
+ "_width": "43",
+ "_height": "34",
+ "_frameX": "-7",
+ "_frameY": "-1",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "43",
+ "_y": "0",
+ "_width": "43",
+ "_height": "33",
+ "_frameX": "-4",
+ "_frameY": "-3",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "86",
+ "_y": "0",
+ "_width": "41",
+ "_height": "34",
+ "_frameX": "-6",
+ "_frameY": "-1",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "86",
+ "_y": "0",
+ "_width": "41",
+ "_height": "34",
+ "_frameX": "-6",
+ "_frameY": "-1",
+ "_frameWidth": "50",
+ "_frameHeight": "36"
+ }
+ ],
+ "_imagePath": "spookypixel.png",
+ "_width": "127",
+ "_height": "66"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/spookypixel.png b/sprites/freeplay/icons/spookypixel.png
new file mode 100644
index 0000000..7c8c0d3
Binary files /dev/null and b/sprites/freeplay/icons/spookypixel.png differ
diff --git a/sprites/freeplay/icons/spookypixel.xml b/sprites/freeplay/icons/spookypixel.xml
new file mode 100644
index 0000000..2588df3
--- /dev/null
+++ b/sprites/freeplay/icons/spookypixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sprites/freeplay/icons/tankmanpixel.json b/sprites/freeplay/icons/tankmanpixel.json
new file mode 100644
index 0000000..0a5def1
--- /dev/null
+++ b/sprites/freeplay/icons/tankmanpixel.json
@@ -0,0 +1,75 @@
+{
+ "TextureAtlas": {
+ "SubTexture": [
+ {
+ "_name": "idle0001",
+ "_x": "103",
+ "_y": "0",
+ "_width": "32",
+ "_height": "26",
+ "_frameX": "-6",
+ "_frameY": "-2",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ },
+ {
+ "_name": "confirm0001",
+ "_x": "103",
+ "_y": "0",
+ "_width": "32",
+ "_height": "26",
+ "_frameX": "-6",
+ "_frameY": "-2",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ },
+ {
+ "_name": "confirm0002",
+ "_x": "69",
+ "_y": "0",
+ "_width": "34",
+ "_height": "24",
+ "_frameX": "-6",
+ "_frameY": "-4",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ },
+ {
+ "_name": "confirm0003",
+ "_x": "0",
+ "_y": "0",
+ "_width": "35",
+ "_height": "27",
+ "_frameX": "-5",
+ "_frameY": "-0",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ },
+ {
+ "_name": "confirm0004",
+ "_x": "35",
+ "_y": "0",
+ "_width": "34",
+ "_height": "26",
+ "_frameX": "-6",
+ "_frameY": "-1",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ },
+ {
+ "_name": "confirm-hold0001",
+ "_x": "35",
+ "_y": "0",
+ "_width": "34",
+ "_height": "26",
+ "_frameX": "-6",
+ "_frameY": "-1",
+ "_frameWidth": "40",
+ "_frameHeight": "28"
+ }
+ ],
+ "_imagePath": "tankmanpixel.png",
+ "_width": "135",
+ "_height": "27"
+ }
+}
\ No newline at end of file
diff --git a/sprites/freeplay/icons/tankmanpixel.png b/sprites/freeplay/icons/tankmanpixel.png
new file mode 100644
index 0000000..d94fc66
Binary files /dev/null and b/sprites/freeplay/icons/tankmanpixel.png differ
diff --git a/sprites/freeplay/icons/tankmanpixel.xml b/sprites/freeplay/icons/tankmanpixel.xml
new file mode 100644
index 0000000..1632d9b
--- /dev/null
+++ b/sprites/freeplay/icons/tankmanpixel.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main.lua b/src/main.lua
index 91d5ecd..d639ee9 100644
--- a/src/main.lua
+++ b/src/main.lua
@@ -1,5 +1,9 @@
+-- This is pretty much the menustate code, i might put it into a different module in some time.
+
local gamePath = love.filesystem.getSourceBaseDirectory() -- Assuming it's always in fused mode.
-local mounted = love.filesystem.mount(gamePath, "") -- Mounting the game directory, should be accessible like if normal.
+local dataFolder = love.filesystem.getSaveDirectory()
+
+local mounted = love.filesystem.mount(gamePath, "") -- Mounting the game directory, should be accessible like if normal.
assert(mounted, "Couldn't mount the game directory.")
@@ -14,12 +18,54 @@ local logging = require("modules.logging")
require("modules.loveanimate") -- Start loveanimate
local songs = require("charts.songs")
+local unparsedData = files.read_file("Saves.json")
+print(dataFolder, unparsedData)
+local data = unparsedData and json.parse(unparsedData) or
+{
+ songs = {
+ tutorial = {
+ hard = {
+ accuracy = 100,
+ score = 100000,
+ rank = "Perfect"
+ }
+ }
+ }
+}
+
+print(logging.dump(data))
+
+local icons = {}
+
+local function setupIcons()
+ for index, icon in next, icons do
+ icon:Destroy()
+ end
+
+ for index, song in next, songs do
+ local icon = song.icon
+ if not icon then goto evilgoto end
+
+ local spriteicon = myTypes.Sprite(string.format("sprites/freeplay/icons/%s.png", icon), string.format("sprites/freeplay/icons/%s.json", icon))
+ spriteicon:PlayAnimation("idle", .005, false)
+ spriteicon.frame = 1
+ spriteicon.layer = 10
+
+ icons[song.name] = spriteicon
+
+ ::evilgoto::
+ end
+end
+
curChar = "bf" --this needs to be global
local flip = false
local lastChange = 0
+local startedPlaying = 0
+local start = false
+
local curSong = songs[1]
local curIndex = 1
local evilCurIndex = 1
@@ -33,12 +79,12 @@ local curDiffInd = 1
local diffIMG
local charIcon
-local iconNum = math.random(1,3)
+local iconNum = math.random(1, 3)
local curState = nil
local stateLoaded = false
-local pressed = {false,false,false}
+local pressed = { false, false, false }
local bg
local logo
@@ -49,8 +95,10 @@ local charSwapSND = love.audio.newSource("sounds/CS_select.ogg", "stream")
charSwapSND:setVolume(0.25)
local left
+local arrow
local function setup()
+ start = false
bg = myTypes.Image("images/menuBG.png", 0)
bg.ui = false
bg.layer = -10
@@ -61,21 +109,31 @@ local function setup()
left.layer = 0
left.resize = myTypes.Vector2(2, 1)
- local arrow = myTypes.Image("images/eventArrow.png")
+ arrow = myTypes.Sprite("sprites/freeplay/freeplaySelector.png", "sprites/freeplay/freeplaySelector.json")
arrow.position.y = 330
+ arrow.position.x = 20
arrow.layer = 1
- arrow.resize = myTypes.Vector2(.5,.5)
+ arrow.resize = myTypes.Vector2(.5, .5)
+ arrow.flipX = true
+ arrow:PlayAnimation("arrow pointer loop", 24, true)
- diffIMG = myTypes.Sprite("images/diff/diffList.png", "images/diff/diffList.json") --look there was a different plan going in
+ -- myTypes.render.preLoad(
+ -- "sprites/freeplay/freeplaySelector_pico.png",
+ -- "sprites/freeplay/freeplaySelector.json"
+ -- )
+
+ myTypes.render.preLoad("sprites/freeplay/freeplaySelector_pico.png", "sprites/freeplay/freeplaySelector_pico.json")
+
+ diffIMG = myTypes.Sprite("images/diff/diffList.png", "images/diff/diffList.json") --look there was a different plan going in
diffIMG:PlayAnimation(curDiff, 24, false)
diffIMG.position = myTypes.Vector2(200, 320)
diffIMG.layer = 2
charIcon = myTypes.Sprite("sprites/menu/charIcons.png", "sprites/menu/charIcons.json")
- charIcon:PlayAnimation(curChar..iconNum, 24, false)
+ charIcon:PlayAnimation(curChar .. iconNum, 24, false)
charIcon.position = myTypes.Vector2(175, 100)
- charIcon.resize = myTypes.Vector2(0.25, 0.25) --this doesnt work and idk why
- charIcon.layer = 2 --since they won't overlap this is ok i think
+ charIcon.resize = myTypes.Vector2(0.25, 0.25) --this doesnt work and idk why
+ charIcon.layer = 2 --since they won't overlap this is ok i think
freaky:play()
@@ -93,9 +151,12 @@ local function setup()
bfAtlas:play("pico cs idle")
end
+
+ setupIcons()
end
local font = love.graphics.newFont("fonts/FridayNightFunkin-Regular.ttf", 40)
+local smallerFont = love.graphics.newFont("fonts/FridayNightFunkin-Regular.ttf", 20)
local gettingKey
@@ -109,19 +170,26 @@ function love.update(dt)
if stateLoaded then
curState.update(dt)
else
- stateLoaded = true -- skipping this update frame
+ stateLoaded = true -- skipping this update frame
curState.finish()
end
elseif not curState then
+ if start then
+ startedPlaying = startedPlaying + dt
+ if startedPlaying > 2 then
+ run()
+ end
+ end
+
lastChange = lastChange + dt
- if lastChange > .25 and bfAtlas.symbol == curChar.." slide in" then
- bfAtlas:play(curChar.." cs idle")
+ if lastChange > .25 and bfAtlas.symbol == curChar .. " slide in" then
+ bfAtlas:play(curChar .. " cs idle")
if curChar == "pico" then
flip = true
end
end
bfAtlas:update(dt)
- myTypes.render.cameraTarget = myTypes.Vector2(0,0)
+ myTypes.render.cameraTarget = myTypes.Vector2(0, 0)
myTypes.updateSprites(dt)
end
end
@@ -130,173 +198,266 @@ function love.draw()
if curState and stateLoaded then
curState.draw()
else
-
+ love.graphics.setDefaultFilter("nearest", "nearest")
myTypes.drawSprites()
evilCurIndex = myMath.lerp(evilCurIndex, curIndex, .3)
for index, song in next, songs do
- love.graphics.print({{0,0,0}, song.name}, font, 300 + (8 * (index - evilCurIndex)), love.graphics:getHeight()/2 + (50 * (index - evilCurIndex - .7)), 0, 1, 1, 200)
+ local color = index == curIndex and { 50, 50, 50 } or { 0, 0, 0 }
+ love.graphics.print({color , song.name }, font, 300 + (8 * (index - evilCurIndex)), love.graphics:getHeight() / 2 + (50 * (index - evilCurIndex - .7)), 0, 1, 1, 200)
+
+ local icon = icons[song.name]
+ if icon then
+ icon.position = myTypes.Vector2(5 * (index - evilCurIndex) + 80 + (song.name:len() * 10), love.graphics:getHeight() / 4 + (25 * (index - evilCurIndex - .5)))
+ end
end
+ arrow.position = myTypes.Vector2(30 + 8 * (evilCurIndex - curIndex), love.graphics:getHeight() / 4 + (evilCurIndex - curIndex - 1) * 25)
+
--love.graphics.print({{0,0,0}, curDiff}, font, 400, 660)
love.graphics.print(
- {{0,0,0}, string.format("Left: %s, Down: %s, Up: %s, Right: %s \nDownscroll: %s",
- keybinds[1],
- keybinds[2],
- keybinds[3],
- keybinds[4],
- settings.Downscroll
- )})
- love.graphics.print({{0,0,0}, "Press 1 to change LEFT \nPress 2 to change DOWN \nPress 3 to change UP \nPress 4 to change RIGHT \nPress 0 to toggle DOWNSCROLL \nPress P to SWAP CHARACTERS"}, 500, 0)
- if bfAtlas.symbol == curChar.." slide in" then
+ {
+ { 0, 0, 0 },
+ string.format(
+ "Left: %s, Down: %s, Up: %s, Right: %s \nDownscroll: %s",
+ keybinds[1],
+ keybinds[2],
+ keybinds[3],
+ keybinds[4],
+ settings.Downscroll
+ )
+ }
+ )
+ love.graphics.print(
+ {
+ { 0, 0, 0 },
+ "Press 1 to change LEFT \nPress 2 to change DOWN \nPress 3 to change UP \nPress 4 to change RIGHT \nPress 0 to toggle DOWNSCROLL \nPress P to SWAP CHARACTERS"
+ },
+ 500,
+ 0
+ )
+ if bfAtlas.symbol == curChar .. " slide in" then
bfAtlas:draw(curChar == "bf" and 695 or 690, curChar == "bf" and 315 or 320, 0, flip and -1 or 1, 1)
else
bfAtlas:draw(curChar == "bf" and 700 or 1150, curChar == "bf" and 300 or 190, 0, flip and -1 or 1, 1)
end
+
+ if data.songs[curSong.name] and data.songs[curSong.name][curDiff] then
+ local text = string.format("Accuracy: %s, Score: %s, Rank: %s", tostring(data.songs[curSong.name][curDiff].accuracy):sub(1, 5), data.songs[curSong.name][curDiff].score, data.songs[curSong.name][curDiff].rank)
+ love.graphics.print({{ 0, 0, 0 }, text}, smallerFont, 1280 - text:len() * 10, 0)
+ end
end
end
-function run()
- confirm:stop()
- confirm:play()
+local rankingWindows = {
+ {
+ name = "Bad",
+ window = 50
+ },
+ {
+ name = "Good",
+ window = 70
+ },
+ {
+ name = "Sick",
+ window = 90
+ },
+ {
+ name = "Perfect",
+ window = 100
+ },
+}
+local function getRank(accuracy)
+ local rank = "Ass"
+ for index, newRank in next, rankingWindows do
+ if accuracy >= newRank.window then
+ rank = newRank.name
+ end
+ end
+
+ return rank
+end
+
+function run()
myTypes.destroyAllSprites()
freaky:stop()
curState = state(curSong.name, curDiff)
- curState.quit = function()
+ curState.quit = function(accuracy, score)
+ if accuracy then
+ if not data.songs[curSong.name] then
+ data.songs[curSong.name] = {}
+ data.songs[curSong.name][curDiff] = {
+ accuracy = accuracy,
+ score = score,
+ rank = getRank(accuracy)
+ }
+ end
+ if data.songs[curSong.name][curDiff] and accuracy > data.songs[curSong.name][curDiff].accuracy or not data.songs[curSong.name][curDiff] then
+ data.songs[curSong.name][curDiff] = {
+ accuracy = accuracy,
+ score = score,
+ rank = getRank(accuracy)
+ }
+ end
+ end
+ files.write_file("Saves.json", json.stringify(data))
curState = nil
stateLoaded = false
myTypes.destroyAllSprites()
- setup()
+ setup()
end
curState.restart = function()
curState = nil
stateLoaded = false
myTypes.destroyAllSprites()
-
+
run()
end
curState.load()
end
function love.keypressed(key, un, is)
- if curState and stateLoaded then
- curState.keypressed(key, un, is)
- elseif not curState then
- if not gettingKey then
- if key == "return" then
- run()
- elseif key == "down" then
- curIndex, curSong = next(songs, curIndex)
- if not curSong then
- curIndex, curSong = next(songs)
- curDiffList = curSong.difficulties
- else
- curDiffList = curSong.difficulties
- end
- curDiffInd = 1
- curDiff = curDiffList[1]
- diffIMG:PlayAnimation(curDiff, 24, true)
- scroll:stop()
- scroll:play()
- elseif key == "up" then --the solution was so stupid easy
- if songs[curIndex - 1] then
- curSong = songs[curIndex - 1]
- curDiffList = songs[curIndex - 1].difficulties
- curDiffInd = 1
- curDiff = curDiffList[curDiffInd]
- curIndex = curIndex - 1
- else
- curSong = songs[#songs]
- curIndex = #songs
- curDiffList = songs[curIndex].difficulties
- curDiffInd = 1
- curDiff = curDiffList[curDiffInd]
- end
- curDiffInd = 1
- curDiff = curDiffList[1]
- diffIMG:PlayAnimation(curDiff, 24, true)
- scroll:stop()
- scroll:play()
- elseif key == "right" then
- if curDiffList[curDiffInd + 1] then
- curDiff = curDiffList[curDiffInd + 1]
- curDiffInd = curDiffInd + 1
- else
- curDiff = curDiffList[1]
- curDiffInd = 1
- end
- diffIMG:PlayAnimation(curDiff, 24, true)
- scroll:stop()
- scroll:play()
- elseif key == "left" then
- if curDiffList[curDiffInd - 1] then
- curDiff = curDiffList[curDiffInd - 1]
- curDiffInd = curDiffInd - 1
- else
- curDiff = curDiffList[#curDiffList]
- curDiffInd = #curDiffList
- end
- diffIMG:PlayAnimation(curDiff, 24, true)
- scroll:stop()
- scroll:play()
- elseif key == "p" then --changes character to/from pico hopefully
- if curChar == "bf" then
- songs = require("charts.picoSongs") --change which catalogue is available
- curChar = "pico"
- bfAtlas:stop()
- bfAtlas:load("sprites/charSelect/picoChill")
- bfAtlas:play("pico slide in")
- -- flip = true
- else
- songs = require("charts.songs")
- curChar = "bf"
- bfAtlas:stop()
- bfAtlas:load("sprites/charSelect/bfChill")
- bfAtlas:play("bf slide in")
- end
- flip = false
- --reset the index's nd shit
- curSong = songs[1]
- curIndex = 1
- evilCurIndex = 1
- curDiffInd = 1
- curDiffList = songs[curIndex].difficulties
- curDiff = curDiffList[1]
- diffIMG:PlayAnimation(curDiff, 24, true)
- iconNum = math.random(1,3)
- charIcon:PlayAnimation(curChar..iconNum, 24, false)
- charSwapSND:stop()
- charSwapSND:play()
- lastChange = 0
-
- elseif tonumber(key) and tonumber(key) < 5 then
- if key == "0" then
- settings.Downscroll = not settings.Downscroll
- files.write_file("settings.json", json.stringify(settings))
- else
- gettingKey = tonumber(key)
- end
- end
- else
- keybinds[gettingKey] = key
- gettingKey = nil
-
- files.write_file("settings.json", json.stringify(settings))
-
+ if curState and stateLoaded then
+ curState.keypressed(key, un, is)
+ elseif not curState and not start then
+ if not gettingKey then
+ if key == "return" then
+ start = true
+ startedPlaying = 0
+ icons[curSong.name]:PlayAnimation("confirm", 24, false)
confirm:stop()
confirm:play()
+ bfAtlas:play(string.format("%s cs confirm", curChar))
+ elseif key == "down" then
+ curIndex, curSong = next(songs, curIndex)
+ if not curSong then
+ curIndex, curSong = next(songs)
+ curDiffList = curSong.difficulties
+ else
+ curDiffList = curSong.difficulties
+ end
+ curDiffInd = 1
+ curDiff = curDiffList[1]
+ diffIMG:PlayAnimation(curDiff, 24, true)
+ scroll:stop()
+ scroll:play()
+ elseif key == "up" then --the solution was so stupid easy
+ if songs[curIndex - 1] then
+ curSong = songs[curIndex - 1]
+ curDiffList = songs[curIndex - 1].difficulties
+ curDiffInd = 1
+ curDiff = curDiffList[curDiffInd]
+ curIndex = curIndex - 1
+ else
+ curSong = songs[#songs]
+ curIndex = #songs
+ curDiffList = songs[curIndex].difficulties
+ curDiffInd = 1
+ curDiff = curDiffList[curDiffInd]
+ end
+ curDiffInd = 1
+ curDiff = curDiffList[1]
+ diffIMG:PlayAnimation(curDiff, 24, true)
+ scroll:stop()
+ scroll:play()
+ elseif key == "right" then
+ if curDiffList[curDiffInd + 1] then
+ curDiff = curDiffList[curDiffInd + 1]
+ curDiffInd = curDiffInd + 1
+ else
+ curDiff = curDiffList[1]
+ curDiffInd = 1
+ end
+ diffIMG:PlayAnimation(curDiff, 24, true)
+ scroll:stop()
+ scroll:play()
+ elseif key == "left" then
+ if curDiffList[curDiffInd - 1] then
+ curDiff = curDiffList[curDiffInd - 1]
+ curDiffInd = curDiffInd - 1
+ else
+ curDiff = curDiffList[#curDiffList]
+ curDiffInd = #curDiffList
+ end
+ diffIMG:PlayAnimation(curDiff, 24, true)
+ scroll:stop()
+ scroll:play()
+ elseif key == "p" then --changes character to/from pico hopefully
+ arrow:Destroy()
+ if curChar == "bf" then
+ -- flip = true
+ songs = require("charts.picoSongs") --change which catalogue is available
+ curChar = "pico"
+ bfAtlas:stop()
+ bfAtlas:load("sprites/charSelect/picoChill")
+ bfAtlas:play("pico slide in")
+ arrow = myTypes.Sprite(
+ "sprites/freeplay/freeplaySelector_pico.png",
+ "sprites/freeplay/freeplaySelector_pico.json"
+ )
+ arrow.position.y = 330
+ arrow.position.x = 20
+ arrow.layer = 1
+ arrow.resize = myTypes.Vector2(.5, .5)
+ arrow.flipX = true
+ arrow:PlayAnimation("arrow pointer loop", 24, true)
+
+ else
+ arrow = myTypes.Sprite("sprites/freeplay/freeplaySelector.png", "sprites/freeplay/freeplaySelector.json")
+ arrow.position.y = 330
+ arrow.position.x = 20
+ arrow.layer = 1
+ arrow.resize = myTypes.Vector2(.5, .5)
+ arrow.flipX = true
+ arrow:PlayAnimation("arrow pointer loop", 24, true)
+ songs = require("charts.songs")
+ curChar = "bf"
+ bfAtlas:stop()
+ bfAtlas:load("sprites/charSelect/bfChill")
+ bfAtlas:play("bf slide in")
+ end
+ flip = false
+ --reset the index's nd shit
+ curSong = songs[1]
+ curIndex = 1
+ evilCurIndex = 1
+ curDiffInd = 1
+ curDiffList = songs[curIndex].difficulties
+ curDiff = curDiffList[1]
+ diffIMG:PlayAnimation(curDiff, 24, true)
+ iconNum = math.random(1, 3)
+ charIcon:PlayAnimation(curChar .. iconNum, 24, false)
+ charSwapSND:stop()
+ charSwapSND:play()
+ lastChange = 0
+ setupIcons()
+ elseif tonumber(key) and tonumber(key) < 5 then
+ if key == "0" then
+ settings.Downscroll = not settings.Downscroll
+ files.write_file("settings.json", json.stringify(settings))
+ else
+ gettingKey = tonumber(key)
+ end
end
+ else
+ keybinds[gettingKey] = key
+ gettingKey = nil
+
+ files.write_file("settings.json", json.stringify(settings))
+
+ confirm:stop()
+ confirm:play()
end
+ end
end
-love.window.setMode(1280, 720, { fullscreen = false , resizable = false})
-
+love.window.setMode(1280, 720, { fullscreen = false, resizable = false })
function love.load()
setup()
-end
\ No newline at end of file
+end
diff --git a/src/modules/states/playstate.lua b/src/modules/states/playstate.lua
index 0735cdc..680262d 100644
--- a/src/modules/states/playstate.lua
+++ b/src/modules/states/playstate.lua
@@ -151,6 +151,19 @@ local function state(songName, songDifficulty)
local deadBF
local restart = false
+ local countDownAudio = {
+ love.audio.newSource("sounds/countdown/introONE.ogg", "static"),
+ love.audio.newSource("sounds/countdown/introTWO.ogg", "static"),
+ love.audio.newSource("sounds/countdown/introTHREE.ogg", "static"),
+ love.audio.newSource("sounds/countdown/introGO.ogg", "static")
+ }
+ local curCD = 0
+ local counting = true -- Before the round starts it will be true
+ local cdLength = 0
+ for i, audio in next, countDownAudio do
+ cdLength = cdLength + audio:getDuration() * 1000
+ end
+
local sharedVars = {
canStart = true,
screenSize = myTypes.Vector2(1280, 720),
@@ -175,7 +188,8 @@ local function state(songName, songDifficulty)
zoom = zoom,
notes = notes, -- only spawned notes
holds = holdNotes,
- characters = characters
+ characters = characters,
+ shouldCountdown = true,
}
local function quit()
@@ -212,7 +226,7 @@ local function state(songName, songDifficulty)
gameOverEnd:stop()
end
- state.quit()
+ state.quit(not dead and math.abs(score) > 0 and accuracy, not dead and math.abs(score) > 0 and score)
end
local function die()
@@ -340,11 +354,36 @@ local function state(songName, songDifficulty)
end
-- playing isn't supposed to work like "paused", it's there to keep the game from working during loading
+ if counting and sharedVars.shouldCountdown then
+ if not countDownAudio[curCD] or not countDownAudio[curCD]:isPlaying() then
+ if not countDownAudio[curCD + 1] then
+ counting = false -- Ended the countdown
+ inst:play()
+ if chart.needsVoices then
+ voices:play()
+ end
+
+ elapsed = 0
+
+ playing = true --countdown now
+
+ startTime = socket.gettime()
+ cdLength = 0
+
+ else
+ curCD = curCD + 1
+ countDownAudio[curCD]:play()
+ end
+ end
+ elseif not sharedVars.shouldCountdown then
+ counting = false
+ end
+
if paused then goto continue end -- if paused then skip this cycle
local currentTime = socket.gettime()
- elapsed = (currentTime - startTime) * 1000 - pauseTime
+ elapsed = (currentTime - startTime) * 1000 - pauseTime - cdLength
conductor.songPosition = elapsed
@@ -407,6 +446,9 @@ local function state(songName, songDifficulty)
local currentSingVector = sharedVars.singVectors[characters.gf.animation] or myTypes.Vector2()
myTypes.render.cameraTarget = myTypes.Vector2(stage.camera_girlfriend[1], stage.camera_girlfriend[2]):Add(characters.gf.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
end
+ else
+ local currentSingVector = sharedVars.singVectors[characters.dad.animation] or myTypes.Vector2()
+ myTypes.render.cameraTarget = myTypes.Vector2(stage.camera_opponent[1], stage.camera_opponent[2]):Add(characters.dad.stageCamera:Negate()):Add(myTypes.Vector2(0, -200))
end
myTypes.updateSprites(dt)
@@ -461,18 +503,22 @@ local function state(songName, songDifficulty)
note.sprite.position = myTypes.Vector2(opponentReceptors[note.direction].position.x + note.offset.x, settings.Downscroll and opponentReceptors[note.direction].position.y - (note.position-elapsed) * speed or opponentReceptors[note.direction].position.y + (note.position - elapsed) * speed)
if (note.position - elapsed) * speed < 10 then
notes[index] = nil
- if section.gfSection or chart.song == "Tutorial" then
- if section.altAnim or note.altAnim then
- characters.gf:PlayAnimation("sing"..directions[note.direction].."-alt")
+ if section then
+ if section.gfSection or chart.song == "Tutorial" then
+ if section.altAnim or note.altAnim then
+ characters.gf:PlayAnimation("sing"..directions[note.direction].."-alt")
+ else
+ characters.gf:PlayAnimation("sing"..directions[note.direction])
+ end
else
- characters.gf:PlayAnimation("sing"..directions[note.direction])
+ if section.altAnim or note.altAnim then
+ characters.dad:PlayAnimation("sing"..directions[note.direction].."-alt")
+ else
+ characters.dad:PlayAnimation("sing"..directions[note.direction])
+ end
end
else
- if section.altAnim or note.altAnim then
- characters.dad:PlayAnimation("sing"..directions[note.direction].."-alt")
- else
- characters.dad:PlayAnimation("sing"..directions[note.direction])
- end
+ characters.dad:PlayAnimation("sing"..directions[note.direction])
end
note:destroy()
note = nil
@@ -556,7 +602,7 @@ local function state(songName, songDifficulty)
health = 2
end
- if inst and not inst:isPlaying() then
+ if inst and not inst:isPlaying() and not counting then
quit()
end
@@ -773,8 +819,8 @@ local function state(songName, songDifficulty)
local newEvent = {
time = note[1],
name = string.lower(note[3]),
- var1 = string.lower(note[4]),
- var2 = string.lower(note[5])
+ var1 = string.lower(note[4] or ""),
+ var2 = string.lower(note[5] or "")
}
events[#events+1] = newEvent
@@ -889,13 +935,13 @@ local function state(songName, songDifficulty)
if sharedVars.canStart then
sharedVars.canStart = false -- already started
- inst:play()
- if chart.needsVoices then
- voices:play()
- end
+ -- inst:play()
+ -- if chart.needsVoices then
+ -- voices:play()
+ -- end
- while not inst:isPlaying() do
- end --waiting till the song actually plays.
+ -- while not inst:isPlaying() do
+ -- end --waiting till the song actually plays.
elapsed = 0
diff --git a/src/modules/types/render.lua b/src/modules/types/render.lua
index 8aa5383..2fc09de 100644
--- a/src/modules/types/render.lua
+++ b/src/modules/types/render.lua
@@ -10,6 +10,7 @@ local Image = {}
Image.__index = Image
local cachedQuads = {}
+local cachedImages = {}
local loadedShaders = {}
@@ -413,8 +414,12 @@ function module.destroyAllSprites()
end
function module.Image(path, scrollFactor)
+ if not cachedImages[path] then
+ cachedImages[path] = love.graphics.newImage(path)
+ end
+
local newImage = setmetatable({
- image = love.graphics.newImage(path),
+ image = cachedImages[path],
resize = module.myTypes.Vector2(1,1),
position = module.myTypes.Vector2(),
modifier = scrollFactor or 1,
@@ -462,6 +467,10 @@ function module.preLoad(imagePath, sheetPath)
cachedQuads[sheetPath] = {quads = quads, image = image}
end
+function module.preLoadImage(path)
+ cachedImages[path] = love.graphics.newImage(path)
+end
+
function module.loadShader(name)
local file = files.read_file(string.format("shaders/%s", name))