From ecf1106d703c8e5ff33276949fb9ef0f86b1b63d Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Sun, 1 Dec 2024 15:19:14 +0100 Subject: [PATCH] chore: update README (#66) * chore: Update README * fix: played time --- README.md | 77 ++++++++++++++++++++++++++++++++++++++++----- scripts/scenario.gd | 4 ++- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3e0a6fd..7846a9c 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,12 @@ Explore and interact with object to figure out how to unblock your way at the cr Keep it simple and straight: -- WASD: Move around, just like in real life. -- Mouse: Look around, because that's what you'd do. -- Shift: Speed things up with a good old sprint. -- Space: Jump – because life's full of unexpected obstacles. -- ESC: Press this when you need a breather, to fiddle with settings or take a break. - -It's not the fanciest game, but hey, neither is life. So, go on, tackle that crossroads puzzle, and let's see if you've got what it takes to outsmart a stubborn barrier. Good luck! +- WASD: Movement +- Mouse: Look +- Shift: Sprint +- Space: Jump +- E/Left Click: Interact +- ESC: Pause Menu ### Screenshots @@ -39,6 +38,70 @@ It's not the fanciest game, but hey, neither is life. So, go on, tackle that cro +## Installation + +### From a release + +Released binaries are available +on the Github repository, in the release section. + +Download the zip archive, accordingly to your OS, and unzip it. + +- **Windows**: Double click on `HazyRoad.exe`. +- **MacOS**: Double click on `HazyRoad.app`. +- **Linux**: In a terminal, run `./HazyRoad.x86_64`. + +### From source + +> [!IMPORTANT] +> For this installation, you need to have +> the Godot Editor installed. + +Clone the source locally: +``` +git clone https://github.com/MechanicalFlower/HazyRoad.git +``` + +You need to install addons first: +``` +godot --headless --script plug.gd install +``` + +And simply run the game as any Godot project: +``` +godot +``` + +## Development + +The project use: +- [`just`](https://just.systems/man/en/) as command runner, +- [`pre-commit`](https://pre-commit.com/) to run formatters, this requires [Python 3](https://docs.python.org/3/). + +> [!IMPORTANT] +> Actually, `just` recipes only support Linux. + +To check all available recipes, run: +``` +just +``` + +To run formatters: +``` +just fmt +``` + +To install, and run the game: +``` +just install-addons +just godot +``` + +> [!TIP] +> In `just` recipes, the Godot Editor is installed +> automatically. This ensure that you +> use the right version of the engine. + ## Contributing ![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg) diff --git a/scripts/scenario.gd b/scripts/scenario.gd index 38649d7..b16616e 100644 --- a/scripts/scenario.gd +++ b/scripts/scenario.gd @@ -47,7 +47,9 @@ func _on_Scenario_animation_finished(anim_name: StringName): var outro_ui = $"../UI/Outro" var scores = outro_ui.get_node("CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer2") - scores.get_node("PlayingTimeScore").set_text("%fm" % playing_time) + scores.get_node("PlayingTimeScore").set_text( + "%02d:%02d" % [playing_time / 60, fmod(playing_time, 60)] + ) scores.get_node("CollectableFoundedScore").set_text( "%s / 5" % GameState.collectable_founded )