From d7afb06e8f0487d39a7b79fbeeafee3c5225c99d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arvid=20Sj=C3=B6blom?= Date: Mon, 11 Dec 2023 11:03:28 +0100 Subject: [PATCH] Balance changes --- assets/data.json | 54 ++++++++++++++++++++++---------------------- assets/highscore.csv | 10 ++++---- src/_main.cc | 5 ++-- src/constants.h | 6 ++--- 4 files changed, 38 insertions(+), 37 deletions(-) diff --git a/assets/data.json b/assets/data.json index a235262..79aed33 100644 --- a/assets/data.json +++ b/assets/data.json @@ -1,14 +1,14 @@ { "player": { "start_pos": [ - 200, - 200 + 500, + 500 ], "scale": [ - 0.5, - 0.5 + 0.6, + 0.6 ], - "max_speed": 5, + "max_speed": 7, "degrees_per_second": 360, "sack": { "offset": [ @@ -16,20 +16,20 @@ -5 ], "scale": [ - 0.3, - 0.3 + 0.4, + 0.4 ], "angle": -25 } }, "helper": { "start_pos": [ - 1000, + 1500, 50 ], "scale": [ - 0.3, - 0.3 + 0.4, + 0.4 ], "max_speed": 2, "direction": [ @@ -37,20 +37,20 @@ 1 ], "stop_top": 50, - "stop_bot": 500 + "stop_bot": 700 }, "bottle": { "scale": [ - 0.5, - 0.5 + 0.7, + 0.7 ] }, "game_constants": { "scoreboard": 5, - "bottles_per_second": 1.5, - "game_time": 30, - "yf_per_second": 0.125, - "bikes_per_second": 0.17, + "bottles_per_second": 1, + "game_time": 90, + "yf_per_second": 0.25, + "bikes_per_second": 0.25, "point_scale_div": 3.0, "highscore_file": "assets/highscore.csv" }, @@ -71,22 +71,22 @@ }, "main_enemy": { "scale": [ - 0.35, - 0.35 + 0.40, + 0.40 ], "start_pos": [ 50, 600 ], - "max_speed": 2.0, + "max_speed": 4, "degrees_per_second": 360 }, "yf": { "scale": [ - 1, - 1 + 1.25, + 1.25 ], - "max_speed": 2.0, + "max_speed": 4.5, "direction": [ 0, -1 @@ -94,15 +94,15 @@ }, "bike_enemy": { "scale": [ - 0.25, - 0.25 + 0.35, + 0.35 ], - "max_speed": 5.0, + "max_speed": 9, "direction": [ 0, 1 ], - "sin_amplitude": 50, + "sin_amplitude": 100, "sin_omega": 5 }, "game_state_assets": { diff --git a/assets/highscore.csv b/assets/highscore.csv index 39e2483..70069af 100644 --- a/assets/highscore.csv +++ b/assets/highscore.csv @@ -1,5 +1,5 @@ -, 9 -Nils, 6 -Nisseboi, 5 -Lukas is KUNG, 5 -NissePisse, 4 +NissePisse is KING, 51 +Lukas IS king, 50 +NissePisse, 30 +, 25 +arre, 15 diff --git a/src/_main.cc b/src/_main.cc index f6a529b..127f552 100644 --- a/src/_main.cc +++ b/src/_main.cc @@ -20,8 +20,9 @@ using json = nlohmann::json; int main () { sf::RenderWindow window{ - sf::VideoMode{S_WIDTH, S_HEIGHT}, - "DespYrat" + sf::VideoMode{S_WIDTH, S_HEIGHT}, + "DespYrat", + sf::Style::Fullscreen }; //skapar en start meny Context game_context{}; diff --git a/src/constants.h b/src/constants.h index b76a1b5..0f6845e 100644 --- a/src/constants.h +++ b/src/constants.h @@ -1,10 +1,10 @@ #ifndef CONSTANTS_H #define CONSTANTS_H -const unsigned int S_WIDTH {1280}; -const unsigned int S_HEIGHT {720}; +const unsigned int S_WIDTH {1920}; +const unsigned int S_HEIGHT {1080}; -const double S_SCALE_KOEFF {S_WIDTH / 1920.0}; +const double S_SCALE_KOEFF {1}; const unsigned int FPS {60}; -- 2.30.2