summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Romeo <vittorio.romeo@outlook.com>2020-07-15 21:57:36 +0100
committerVittorio Romeo <vittorio.romeo@outlook.com>2020-07-15 21:57:36 +0100
commitfca592dc132554837fe7ac0746bae217c08aed3e (patch)
treeda31af930e3e7985f5759df83c188c888326a021
parent93abcc7c018cbaaed3997586dfdd728c242feeea (diff)
Add timescale debug setting and strip some difficultiespostrelease_minor_improvements
-rw-r--r--_RELEASE/Packs/cube/Levels/commando.json6
-rw-r--r--_RELEASE/Packs/cube/Levels/euclideanpc.json6
-rw-r--r--_RELEASE/Packs/cube/Levels/flatteringshape.json6
-rw-r--r--_RELEASE/Packs/cube/Levels/labyrinth.json6
-rw-r--r--_RELEASE/Packs/cube/Levels/pi.json6
-rw-r--r--_RELEASE/Packs/cube/Levels/pointless.json4
-rw-r--r--_RELEASE/Packs/cube/Levels/seconddimension.json6
-rw-r--r--_RELEASE/Packs/cube/Scripts/Levels/flatteringshape.lua4
-rw-r--r--_RELEASE/Packs/cube/Scripts/Levels/pointless.lua4
-rw-r--r--_RELEASE/Packs/cube/Scripts/Levels/seconddimension.lua4
-rw-r--r--_RELEASE/config.json3
-rw-r--r--include/SSVOpenHexagon/Global/Config.hpp2
-rw-r--r--misc/default_config.json5
-rw-r--r--src/SSVOpenHexagon/Core/HGUpdate.cpp2
-rw-r--r--src/SSVOpenHexagon/Core/MenuGame.cpp16
-rw-r--r--src/SSVOpenHexagon/Global/Config.cpp11
16 files changed, 56 insertions, 35 deletions
diff --git a/_RELEASE/Packs/cube/Levels/commando.json b/_RELEASE/Packs/cube/Levels/commando.json
index d6a849b4..75be3489 100644
--- a/_RELEASE/Packs/cube/Levels/commando.json
+++ b/_RELEASE/Packs/cube/Levels/commando.json
@@ -2,11 +2,11 @@
"id": "commando",
"name": "commando",
"description": "exponential difficulty \nfor exponential entertainment",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 50,
"selectable": true,
"styleId": "commando",
"musicId": "commandoSteve",
"luaFile": "Scripts/Levels/commando.lua",
- "difficultyMults": [1.25, 1.50, 0.75, 0.5, 0.25]
-} \ No newline at end of file
+ "difficultyMults": [1.25, 1.50, 0.75, 0.5]
+}
diff --git a/_RELEASE/Packs/cube/Levels/euclideanpc.json b/_RELEASE/Packs/cube/Levels/euclideanpc.json
index 5bb046e4..20d44ad0 100644
--- a/_RELEASE/Packs/cube/Levels/euclideanpc.json
+++ b/_RELEASE/Packs/cube/Levels/euclideanpc.json
@@ -2,11 +2,11 @@
"id": "euclideanpc",
"name": "euclidean plane crash",
"description": "special level of difficulty",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 60,
"selectable": true,
"styleId": "euclideanpc",
"musicId": "steampunkWarlord",
"luaFile": "Scripts/Levels/euclideanpc.lua",
- "difficultyMults": [1.25, 1.50, 1.70, 1.80, 0.75, 0.5, 0.25]
-} \ No newline at end of file
+ "difficultyMults": [1.25, 1.50, 1.80, 0.75, 0.5]
+}
diff --git a/_RELEASE/Packs/cube/Levels/flatteringshape.json b/_RELEASE/Packs/cube/Levels/flatteringshape.json
index e645348f..febb4713 100644
--- a/_RELEASE/Packs/cube/Levels/flatteringshape.json
+++ b/_RELEASE/Packs/cube/Levels/flatteringshape.json
@@ -2,11 +2,11 @@
"id": "flatteringshape",
"name": "flattering shape",
"description": "normal level of difficulty",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 20,
"selectable": true,
"styleId": "flatteringshape",
"musicId": "starshipShowdown",
"luaFile": "Scripts/Levels/flatteringshape.lua",
- "difficultyMults": [1.5, 2, 2.5, 0.5, 3, 4, 5, 6]
-} \ No newline at end of file
+ "difficultyMults": [1.5, 2, 2.5, 0.5, 3, 4]
+}
diff --git a/_RELEASE/Packs/cube/Levels/labyrinth.json b/_RELEASE/Packs/cube/Levels/labyrinth.json
index 9a9acae6..373cb5e1 100644
--- a/_RELEASE/Packs/cube/Levels/labyrinth.json
+++ b/_RELEASE/Packs/cube/Levels/labyrinth.json
@@ -2,11 +2,11 @@
"id": "labyrinth",
"name": "labyrinth",
"description": "forever trapped",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 80,
"selectable": true,
"styleId": "labyrinth",
"musicId": "commandoSteve",
"luaFile": "Scripts/Levels/labyrinth.lua",
- "difficultyMults": [1.25, 1.50, 0.75, 0.5, 0.25]
-} \ No newline at end of file
+ "difficultyMults": [1.25, 1.50, 0.75, 0.5]
+}
diff --git a/_RELEASE/Packs/cube/Levels/pi.json b/_RELEASE/Packs/cube/Levels/pi.json
index 95330095..cb28dab7 100644
--- a/_RELEASE/Packs/cube/Levels/pi.json
+++ b/_RELEASE/Packs/cube/Levels/pi.json
@@ -2,11 +2,11 @@
"id": "pi",
"name": "3.141592653589793238462643383279502884197169399375105820974944592307816406286",
"description": "do you like pi?",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 70,
"selectable": true,
"styleId": "pi",
"musicId": "callMeKatla",
"luaFile": "Scripts/Levels/pi.lua",
- "difficultyMults": [1.25, 1.50, 0.75, 0.5, 0.25, 1.8]
-} \ No newline at end of file
+ "difficultyMults": [1.25, 1.50, 0.75, 0.5, 1.8]
+}
diff --git a/_RELEASE/Packs/cube/Levels/pointless.json b/_RELEASE/Packs/cube/Levels/pointless.json
index b6705f15..e3bf33d7 100644
--- a/_RELEASE/Packs/cube/Levels/pointless.json
+++ b/_RELEASE/Packs/cube/Levels/pointless.json
@@ -8,5 +8,5 @@
"styleId": "pointless",
"musicId": "jackRussel",
"luaFile": "Scripts/Levels/pointless.lua",
- "difficultyMults": [1.5, 2, 2.5, 3, 0.5, 4, 5, 6]
-} \ No newline at end of file
+ "difficultyMults": [1.5, 2, 2.5, 3, 0.5, 4, 5]
+}
diff --git a/_RELEASE/Packs/cube/Levels/seconddimension.json b/_RELEASE/Packs/cube/Levels/seconddimension.json
index 96d2d43b..de74414b 100644
--- a/_RELEASE/Packs/cube/Levels/seconddimension.json
+++ b/_RELEASE/Packs/cube/Levels/seconddimension.json
@@ -2,11 +2,11 @@
"id": "seconddimension",
"name": "second dimension",
"description": "hard level of difficulty",
- "author": "vittorio romeo",
+ "author": "vittorio romeo",
"menuPriority": 30,
"selectable": true,
"styleId": "seconddimension",
"musicId": "mazeOfMayonnaise",
"luaFile": "Scripts/Levels/seconddimension.lua",
- "difficultyMults": [1.4, 0.75, 0.6, 1.8, 2.2, 2.6]
-} \ No newline at end of file
+ "difficultyMults": [1.4, 0.75, 0.6, 1.8, 2.2]
+}
diff --git a/_RELEASE/Packs/cube/Scripts/Levels/flatteringshape.lua b/_RELEASE/Packs/cube/Scripts/Levels/flatteringshape.lua
index 84346ae9..04dc6e39 100644
--- a/_RELEASE/Packs/cube/Scripts/Levels/flatteringshape.lua
+++ b/_RELEASE/Packs/cube/Scripts/Levels/flatteringshape.lua
@@ -50,8 +50,8 @@ function onInit()
l_setBeatPulseMax(17)
l_setBeatPulseDelayMax(23.8)
- enableSwapIfDMGreaterThan(4)
- disableIncIfDMGreaterThan(5)
+ enableSwapIfDMGreaterThan(3)
+ disableIncIfDMGreaterThan(3)
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
diff --git a/_RELEASE/Packs/cube/Scripts/Levels/pointless.lua b/_RELEASE/Packs/cube/Scripts/Levels/pointless.lua
index 5c27e640..f0c9f0ff 100644
--- a/_RELEASE/Packs/cube/Scripts/Levels/pointless.lua
+++ b/_RELEASE/Packs/cube/Scripts/Levels/pointless.lua
@@ -46,8 +46,8 @@ function onInit()
l_setBeatPulseMax(17)
l_setBeatPulseDelayMax(24.8)
- enableSwapIfDMGreaterThan(4)
- disableIncIfDMGreaterThan(5)
+ enableSwapIfDMGreaterThan(3)
+ disableIncIfDMGreaterThan(4)
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
diff --git a/_RELEASE/Packs/cube/Scripts/Levels/seconddimension.lua b/_RELEASE/Packs/cube/Scripts/Levels/seconddimension.lua
index ff607c20..cb2c0b80 100644
--- a/_RELEASE/Packs/cube/Scripts/Levels/seconddimension.lua
+++ b/_RELEASE/Packs/cube/Scripts/Levels/seconddimension.lua
@@ -13,11 +13,11 @@ function addPattern(mKey)
elseif mKey == 5 then pInverseBarrage(0)
elseif mKey == 6 then pTunnel(math.random(1, 3))
elseif mKey == 7 then pMirrorWallStrip(1, 0)
- elseif mKey == 8 then
+ elseif mKey == 8 then
if l_getSides() > 5 then
pWallExVortex(0, 1, 1)
end
- elseif mKey == 9 then pDMBarrageSpiral(math.random(4, 7), 0.4, 1)
+ elseif mKey == 9 then pDMBarrageSpiral(math.random(4, 7), 0.4 * (u_getDifficultyMult() ^ 0.3), 1)
elseif mKey == 10 then pRandomBarrage(math.random(2, 4), 2.25)
end
end
diff --git a/_RELEASE/config.json b/_RELEASE/config.json
index 63fbb93d..508d676c 100644
--- a/_RELEASE/config.json
+++ b/_RELEASE/config.json
@@ -96,9 +96,10 @@
"text_padding" : 8.0,
"text_scaling" : 0.9999999403953552,
"timer_static" : true,
+ "timescale" : 1.000000119209290,
"vsync" : false,
"windowed_auto_resolution" : false,
"windowed_height" : 900,
- "windowed_width" : 1600,
+ "windowed_width" : 1440,
"zoom_factor" : 0.8533333539962769
}
diff --git a/include/SSVOpenHexagon/Global/Config.hpp b/include/SSVOpenHexagon/Global/Config.hpp
index 92d00c47..43a1acd9 100644
--- a/include/SSVOpenHexagon/Global/Config.hpp
+++ b/include/SSVOpenHexagon/Global/Config.hpp
@@ -66,6 +66,7 @@ void setRotateToStart(bool mX);
void setJoystickDeadzone(float mX);
void setTextPadding(float mX);
void setTextScaling(float mX);
+void setTimescale(float mX);
[[nodiscard]] bool getOnline();
[[nodiscard]] bool getOfficial();
@@ -126,6 +127,7 @@ void setTextScaling(float mX);
[[nodiscard]] float getJoystickDeadzone();
[[nodiscard]] float getTextPadding();
[[nodiscard]] float getTextScaling();
+[[nodiscard]] float getTimescale();
[[nodiscard]] ssvs::Input::Trigger getTriggerRotateCCW();
[[nodiscard]] ssvs::Input::Trigger getTriggerRotateCW();
diff --git a/misc/default_config.json b/misc/default_config.json
index 90857278..dc008546 100644
--- a/misc/default_config.json
+++ b/misc/default_config.json
@@ -14,8 +14,8 @@
"flash_enabled" : true,
"fullscreen" : false,
"fullscreen_auto_resolution" : false,
- "fullscreen_height" : 900,
- "fullscreen_width" : 1440,
+ "fullscreen_height" : 600,
+ "fullscreen_width" : 800,
"invincible" : false,
"limit_fps" : true,
"max_fps" : 200,
@@ -96,6 +96,7 @@
"text_padding" : 8.0,
"text_scaling" : 1.0,
"timer_static" : true,
+ "timescale" : 1.0,
"vsync" : false,
"windowed_auto_resolution" : false,
"windowed_height" : 900,
diff --git a/src/SSVOpenHexagon/Core/HGUpdate.cpp b/src/SSVOpenHexagon/Core/HGUpdate.cpp
index ed3f8daa..90c77d77 100644
--- a/src/SSVOpenHexagon/Core/HGUpdate.cpp
+++ b/src/SSVOpenHexagon/Core/HGUpdate.cpp
@@ -23,6 +23,8 @@ namespace hg
void HexagonGame::update(ssvu::FT mFT)
{
+ mFT *= Config::getTimescale();
+
// TODO: refactor to avoid repetition, and truncate floating point number
// TODO: also show best record (here) and last run + best record (in menu)
steamManager.set_rich_presence_in_game(
diff --git a/src/SSVOpenHexagon/Core/MenuGame.cpp b/src/SSVOpenHexagon/Core/MenuGame.cpp
index aac22d6d..fbd1eaa4 100644
--- a/src/SSVOpenHexagon/Core/MenuGame.cpp
+++ b/src/SSVOpenHexagon/Core/MenuGame.cpp
@@ -174,8 +174,12 @@ void MenuGame::initMenus()
main.create<i::Goto>("audio", sfx);
main.create<i::Goto>("debug", debug) | whenNotOfficial;
main.create<i::Goto>("local profiles", localProfiles) | whenLocal;
- main.create<i::Single>("login screen", [this] { state = States::MWlcm; });
- main.create<i::Toggle>("online", &Config::getOnline, &Config::setOnline);
+
+ // TODO:
+ // main.create<i::Single>("login screen", [this] { state = States::MWlcm;
+ // });
+ // main.create<i::Toggle>("online", &Config::getOnline, &Config::setOnline);
+
main.create<i::Toggle>(
"official mode", &Config::getOfficial, &Config::setOfficial);
main.create<i::Single>("exit game", [this] { window.stop(); });
@@ -291,10 +295,8 @@ void MenuGame::initMenus()
"autorestart", &Config::getAutoRestart, &Config::setAutoRestart);
play.create<i::Toggle>("rotate to start", &Config::getRotateToStart,
&Config::setRotateToStart);
- play.create<i::Slider>(
- "joystick deadzone", &Config::getJoystickDeadzone,
- [](float mValue) { Config::setJoystickDeadzone(mValue); }, 0.f, 100.f,
- 1.f);
+ play.create<i::Slider>("joystick deadzone", &Config::getJoystickDeadzone,
+ &Config::setJoystickDeadzone, 0.f, 100.f, 1.f);
play.create<i::GoBack>("back");
localProfiles.create<i::Single>("change local profile", [this] {
@@ -310,6 +312,8 @@ void MenuGame::initMenus()
debug.create<i::Toggle>("debug mode", &Config::getDebug, &Config::setDebug);
debug.create<i::Toggle>(
"invincible", &Config::getInvincible, &Config::setInvincible);
+ debug.create<i::Slider>("timescale", &Config::getTimescale,
+ &Config::setTimescale, 0.1f, 2.f, 0.05f);
debug.create<i::GoBack>("back");
friends.create<i::Single>("add friend", [this] {
diff --git a/src/SSVOpenHexagon/Global/Config.cpp b/src/SSVOpenHexagon/Global/Config.cpp
index 2700090b..0d6f8bc1 100644
--- a/src/SSVOpenHexagon/Global/Config.cpp
+++ b/src/SSVOpenHexagon/Global/Config.cpp
@@ -74,6 +74,7 @@ using namespace ssvu;
X(joystickDeadzone, float, "joystick_deadzone") \
X(textPadding, float, "text_padding") \
X(textScaling, float, "text_scaling") \
+ X(timescale, float, "timescale") \
X(triggerRotateCCW, Trigger, "t_rotate_ccw") \
X(triggerRotateCW, Trigger, "t_rotate_cw") \
X(triggerFocus, Trigger, "t_focus") \
@@ -479,6 +480,11 @@ void setTextScaling(float mX)
textScaling() = mX;
}
+void setTimescale(float mX)
+{
+ timescale() = mX;
+}
+
bool SSVU_ATTRIBUTE(pure) getOnline()
{
return online();
@@ -769,6 +775,11 @@ float SSVU_ATTRIBUTE(pure) getTextScaling()
return textScaling();
}
+float SSVU_ATTRIBUTE(pure) getTimescale()
+{
+ return getOfficial() ? 1.f : timescale();
+}
+
Trigger getTriggerRotateCCW()
{
return triggerRotateCCW();