diff --git a/.env b/.env index d7b4e6a..9e83b2f 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ # Godot -GODOT_VERSION=4.3-stable +GODOT_VERSION=4.4-beta1 # Game diff --git a/.github/renovate.json b/.github/renovate.json index 5762821..b769436 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,24 +2,15 @@ "customManagers": [ { "customType": "regex", - "fileMatch": ["^plug\\.gd$"], + "fileMatch": ["^\\.godot-deps\\.json$"], "matchStrings": [ - "\\s+plug\\(\\s*\"(?.*)\",\\s+{\\s*\"commit\":\\s*\"(?.*)\",\\s*\"renovate-branch\":\\s*\"(?.*)\"" + "\\s+{\\s*\"owner\":\\s*\"(?.*)\",\\s*\"repo\":\\s*\"(?.*)\",\\s*\"commit\":\\s*\"(?.*)\",\\s*\"renovate-branch\":\\s*\"(?.*)\"" ], - "packageNameTemplate": "https://github.com/{{{depName}}}.git", + "depNameTemplate": "{{{depOwner}}}/{{{depRepo}}}", + "packageNameTemplate": "https://github.com/{{{depOwner}}}/{{{depRepo}}}.git", "versioningTemplate": "git", "datasourceTemplate": "git-refs" }, - { - "customType": "regex", - "fileMatch": ["^plug\\.gd$"], - "matchStrings": [ - "\\s+plug\\(\"(?.*?)\",\\ \\{\\s*\"tag\":\\ \"(?.*)\"" - ], - "packageNameTemplate": "https://github.com/{{{depName}}}.git", - "versioningTemplate": "git", - "datasourceTemplate": "git-tags" - }, { "customType": "regex", "fileMatch": ["^.env$"], diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 0000000..5d8531b --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,23 @@ +name: Nix Build + +on: + workflow_dispatch: + # Ensure the build works on main + push: + branches: [main] + tags: ['*'] + # Ensure the build works on each pull request + pull_request: + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Build and run + run: nix run . -- --headless --quit diff --git a/.godot-deps.json b/.godot-deps.json new file mode 100644 index 0000000..37bcd9d --- /dev/null +++ b/.godot-deps.json @@ -0,0 +1,18 @@ +{ + "addons": [ + { + "owner": "godot-extended-libraries", + "repo": "godot-debug-menu", + "commit": "3211673efc9d1e41f94bbd74705eaed2d2b8bdd7", + "hash": "sha256-1vUBulNYW0y58KOyBCyhPSa19v2HfUmvxncsSb1XxgQ=", + "renovate-branch": "master" + }, + { + "owner": "KoBeWi", + "repo": "Godot-Universal-Fade", + "commit": "f091514bba652880f81c5bc8809e0ee4498988ea", + "hash": "sha256-hAbrZuGrlQxth6oIfpU6vKFqv1iI2hiFrQo2BiY5ElI=", + "renovate-branch": "master" + } + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bb60e7..1163fb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- Add nix packaging support ([#88](https://github.com/MechanicalFlower/Marble/pull/88)) ### Changed - Correctly end the race if all marble are not exploded ([#57](https://github.com/MechanicalFlower/Marble/pull/57)) +- Use the Jolt Physics Engine ([#89](https://github.com/MechanicalFlower/Marble/pull/89)) ### Deprecated ### Removed ### Fixed @@ -14,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bump `extractions/setup-just` from 1 to 2 ([#56](https://github.com/MechanicalFlower/Marble/pull/56)) - Bump `dawidd6/action-download-artifact` from 3 to 6 ([#65](https://github.com/MechanicalFlower/Marble/pull/65), [#68](https://github.com/MechanicalFlower/Marble/pull/68), [#70](https://github.com/MechanicalFlower/Marble/pull/70)) - Bump `godot` from 4.2 to 4.3 ([#76](https://github.com/MechanicalFlower/Marble/pull/76)) +- Bump `godot` from 4.2 to 4.4 ([#89](https://github.com/MechanicalFlower/Marble/pull/89)) ## [1.6.1] ### Added diff --git a/Justfile b/Justfile index 8d800ae..0c50749 100644 --- a/Justfile +++ b/Justfile @@ -22,8 +22,9 @@ cache_dir := main_dir / "cache" bin_dir := main_dir / "bin" # Local directories for game exports -build_dir := justfile_directory() / "build" -dist_dir := justfile_directory() / "dist" +work_dir := env_var_or_default('WORKDIR', justfile_directory()) +build_dir := work_dir / "build" +dist_dir := work_dir / "dist" # Godot variables godot_version := env_var('GODOT_VERSION') @@ -52,7 +53,6 @@ game_itchio_key := env_var_or_default('GAME_ITCHIO_KEY', "") # Build info datetime := `date '+%Y%m%d'` short_version := replace_regex(game_version, "([0-9]+).([0-9]+).[0-9]+", "$1.$2") -commit_hash := `git log --pretty=format:"%H" -1` # Python virtualenv venv_dir := justfile_directory() / "venv" @@ -241,7 +241,7 @@ export: export-windows export-mac export-linux # Remove game plugins clean-addons: rm -rf .plugged - [ -f plug.gd ] && (cd addons/ && git clean -f -X -d) || true + [[ -f plug.gd && -d .git ]] && (cd addons/ && git clean -f -X -d) || true # Remove files created by Godot clean-resources: diff --git a/README.md b/README.md index f9bae5f..cf2b888 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A marble race minigame, made with [Godot Engine](https://godotengine.org/). Download on itch.io Get it from the Snap Store Download as AppImage +Packaged for nixpkgs @@ -78,6 +79,18 @@ The AppImage is available on the Github More details on how to run an AppImage, on the [official documentation](https://docs.appimage.org/introduction/quickstart.html#how-to-run-an-appimage). +### From Nix + +With the [Nix command line](https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix), run: +``` +nix run github:MechanicalFlower/Marble +``` + +Or if you don't have flakes enabled: +``` +nix run --extra-experimental-features "flakes nix-command" github:MechanicalFlower/Marble +``` + ### From source > [!IMPORTANT] diff --git a/addons/export-build-info/build_info.gd.uid b/addons/export-build-info/build_info.gd.uid new file mode 100644 index 0000000..d5c67e9 --- /dev/null +++ b/addons/export-build-info/build_info.gd.uid @@ -0,0 +1 @@ +uid://b3syvh073cpna diff --git a/addons/export-build-info/export_plugin.gd.uid b/addons/export-build-info/export_plugin.gd.uid new file mode 100644 index 0000000..3079e18 --- /dev/null +++ b/addons/export-build-info/export_plugin.gd.uid @@ -0,0 +1 @@ +uid://d1ixrbagbqk2a diff --git a/addons/export-build-info/label.gd.uid b/addons/export-build-info/label.gd.uid new file mode 100644 index 0000000..4a33e45 --- /dev/null +++ b/addons/export-build-info/label.gd.uid @@ -0,0 +1 @@ +uid://c4n1po3i52owo diff --git a/addons/export-build-info/plugin.gd.uid b/addons/export-build-info/plugin.gd.uid new file mode 100644 index 0000000..d68e204 --- /dev/null +++ b/addons/export-build-info/plugin.gd.uid @@ -0,0 +1 @@ +uid://b7wtalm73m8yn diff --git a/addons/gd-plug/plug.gd.uid b/addons/gd-plug/plug.gd.uid new file mode 100644 index 0000000..097fbbf --- /dev/null +++ b/addons/gd-plug/plug.gd.uid @@ -0,0 +1 @@ +uid://dem7wosb45k0s diff --git a/assets/blocks/finish_line.obj.import b/assets/blocks/finish_line.obj.import index 823bea8..7207142 100644 --- a/assets/blocks/finish_line.obj.import +++ b/assets/blocks/finish_line.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/finish_line.obj-68148e473b312a92e041d73d4b95e [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/forward.obj.import b/assets/blocks/forward.obj.import index 4ed0656..1d2b8e5 100644 --- a/assets/blocks/forward.obj.import +++ b/assets/blocks/forward.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/forward.obj-445d77b49ba74ed9a8c19f7dcb406dbe. [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/forward_down.obj.import b/assets/blocks/forward_down.obj.import index a6860b9..3450c04 100644 --- a/assets/blocks/forward_down.obj.import +++ b/assets/blocks/forward_down.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/forward_down.obj-260a9f3d98c1b78d7b99931c4b44 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/forward_up.obj.import b/assets/blocks/forward_up.obj.import index 0b4e702..604fd8a 100644 --- a/assets/blocks/forward_up.obj.import +++ b/assets/blocks/forward_up.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/forward_up.obj-c76cd590264498bcbf6dd0e97494d0 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/hopper.obj.import b/assets/blocks/hopper.obj.import index ea9d0b7..81b50a0 100644 --- a/assets/blocks/hopper.obj.import +++ b/assets/blocks/hopper.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/hopper.obj-f608e83bd546ba28ae5837a6f15daa47.m [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/hopper2.obj.import b/assets/blocks/hopper2.obj.import index 38171db..102f57a 100644 --- a/assets/blocks/hopper2.obj.import +++ b/assets/blocks/hopper2.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/hopper2.obj-30494c802f03d6927b75a8291f6d1803. [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/hopper3.obj.import b/assets/blocks/hopper3.obj.import index 9d0f10a..d554b57 100644 --- a/assets/blocks/hopper3.obj.import +++ b/assets/blocks/hopper3.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/hopper3.obj-76ebc29ceecc3591fdb2a0635f164ab9. [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/looping.obj.import b/assets/blocks/looping.obj.import index d4cf2bc..0667020 100644 --- a/assets/blocks/looping.obj.import +++ b/assets/blocks/looping.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/looping.obj-5769ee2e40efd752be175227a45aec6d. [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/start_line.obj.import b/assets/blocks/start_line.obj.import index 0ec379c..01a7a77 100644 --- a/assets/blocks/start_line.obj.import +++ b/assets/blocks/start_line.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/start_line.obj-892c20103a4fa50cd54f3b56ecf1f3 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/tube_vertical_to_horizontal.obj.import b/assets/blocks/tube_vertical_to_horizontal.obj.import index 718faa2..dd859ec 100644 --- a/assets/blocks/tube_vertical_to_horizontal.obj.import +++ b/assets/blocks/tube_vertical_to_horizontal.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/tube_vertical_to_horizontal.obj-99f35dca5c522 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_left2.obj.import b/assets/blocks/turn_left2.obj.import index f7594c8..28905e3 100644 --- a/assets/blocks/turn_left2.obj.import +++ b/assets/blocks/turn_left2.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_left2.obj-75d6b32008778f230873814f14428a [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_left3.obj.import b/assets/blocks/turn_left3.obj.import index 3110134..e594e93 100644 --- a/assets/blocks/turn_left3.obj.import +++ b/assets/blocks/turn_left3.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_left3.obj-a8b482e6a8182e57ee0a0f631bd9ec [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_left_covered.obj.import b/assets/blocks/turn_left_covered.obj.import index 49a5ddf..eacd994 100644 --- a/assets/blocks/turn_left_covered.obj.import +++ b/assets/blocks/turn_left_covered.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_left_covered.obj-6fc39e478ebbc1fcccc1a3f [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_right2.obj.import b/assets/blocks/turn_right2.obj.import index e9fd2a6..c16b452 100644 --- a/assets/blocks/turn_right2.obj.import +++ b/assets/blocks/turn_right2.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_right2.obj-f61620a053b3ab62886b5196d1e9d [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_right3.obj.import b/assets/blocks/turn_right3.obj.import index 7d17fa2..60a676b 100644 --- a/assets/blocks/turn_right3.obj.import +++ b/assets/blocks/turn_right3.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_right3.obj-3c3fae834c68c8f07f0d11a3a0cb8 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/blocks/turn_right_covered.obj.import b/assets/blocks/turn_right_covered.obj.import index d5a82bd..01aece3 100644 --- a/assets/blocks/turn_right_covered.obj.import +++ b/assets/blocks/turn_right_covered.obj.import @@ -16,7 +16,10 @@ dest_files=["res://.godot/imported/turn_right_covered.obj-d72406c70a16857ae69010 [params] generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 scale_mesh=Vector3(1, 1, 1) offset_mesh=Vector3(0, 0, 0) -optimize_mesh=true force_disable_mesh_compression=false diff --git a/assets/fonts/box_pixies.ttf.import b/assets/fonts/box_pixies.ttf.import index ed350d2..d036806 100644 --- a/assets/fonts/box_pixies.ttf.import +++ b/assets/fonts/box_pixies.ttf.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/box_pixies.ttf-5316cd25b172c7ecac5f7c9b962d13 Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 @@ -22,6 +23,7 @@ allow_system_fallback=true force_autohinter=false hinting=1 subpixel_positioning=1 +keep_rounding_remainders=true oversampling=0.0 Fallbacks=null fallbacks=[] diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..3a39945 --- /dev/null +++ b/default.nix @@ -0,0 +1,47 @@ +{ + pkgs ? import {}, + system ? builtins.currentSystem, +}: let + # Parse .env file into a key-value pair + envVars = builtins.listToAttrs (map (line: let + # Split the line by the first '=' to separate key and value + parts = pkgs.lib.strings.splitString "=" line; + in { + name = builtins.elemAt parts 0; + value = builtins.elemAt parts 1; + }) ( + builtins.filter + (line: (builtins.match ".+=.+" line) != null) + (pkgs.lib.strings.splitString "\n" (builtins.readFile ./.env)) + )); + + # Export presets by Arch/OS + presets = {"x86_64-linux" = "Linux/X11";}; + + # Parse plug.gd file and dynamically create addon derivations + addons = let + sources = builtins.fromJSON (pkgs.lib.strings.fileContents ./.godot-deps.json); + in + builtins.map(u: pkgs.mkPlug { + inherit (u) owner repo hash; + rev = u.commit; + }) sources.addons; +in pkgs.godotpkgs."${envVars.GODOT_VERSION}".mkGodot rec { + inherit addons; + + pname = envVars.GAME_NAME; + version = envVars.GAME_VERSION; + src = ./.; + preset = presets.${system} or (throw "Unsupported system: ${system}"); + + preBuildPhase = '' + # TODO: ensure to patch game version + substituteInPlace ./public/packaging/org.mechanicalflower.Marble.desktop --replace-fail 'Icon=org.mechanicalflower.Marble' '$out/share/icons/hicolor/apps/marble.png' + substituteInPlace ./public/packaging/org.mechanicalflower.Marble.desktop --replace-fail 'Exec=marble-wrapper' 'Exec=$out/bin/${pname}' + ''; + + preInstallPhase = '' + install -D -m 644 -t $out/share/applications ./public/packaging/org.mechanicalflower.Marble.desktop + install -D -m 644 -T ./assets/icon.png $out/share/icons/hicolor/apps/marble.png + ''; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d28ea4e --- /dev/null +++ b/flake.lock @@ -0,0 +1,104 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "godot": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1737101400, + "narHash": "sha256-7R7nBKAjYNeINSmfvxe+tVjYE97TN3L8dNBiR2nE5jI=", + "owner": "florianvazelle", + "repo": "godot-overlay", + "rev": "ac54ab1cccda17972a5b480be260c68f3d727531", + "type": "github" + }, + "original": { + "owner": "florianvazelle", + "repo": "godot-overlay", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1737569578, + "narHash": "sha256-6qY0pk2QmUtBT9Mywdvif0i/CLVgpCjMUn6g9vB+f3M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "47addd76727f42d351590c905d9d1905ca895b82", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "godot": "godot", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "godot", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736154270, + "narHash": "sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "13c913f5deb3a5c08bb810efd89dc8cb24dd968b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f23c692 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Marble flake."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + godot.url = "github:florianvazelle/godot-overlay"; + godot.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { + self, + nixpkgs, + godot, + ... + }: let + system = "x86_64-linux"; + pkgs = import nixpkgs { + inherit system; + overlays = [ godot.overlays.default ]; + }; + + in { + packages.x86_64-linux.default = import ./default.nix { + inherit pkgs system; + }; + + apps.default = { + type = "app"; + program = "${self.packages.x86_64-linux.default}/bin/Marble"; + }; + + # devShells.x86_64-linux.default = pkgs.mkShell { + # packages = [pkgs.godot_"${envVars.GODOT_VERSION}"]; + # }; + }; +} diff --git a/plug.gd b/plug.gd index a42184c..39f15c3 100644 --- a/plug.gd +++ b/plug.gd @@ -2,11 +2,7 @@ extends "res://addons/gd-plug/plug.gd" func _plugging(): - plug( - "godot-extended-libraries/godot-debug-menu", - {"commit": "3211673efc9d1e41f94bbd74705eaed2d2b8bdd7", "renovate-branch": "master"} - ) - plug( - "KoBeWi/Godot-Universal-Fade", - {"commit": "f091514bba652880f81c5bc8809e0ee4498988ea", "renovate-branch": "master"} - ) + var deps_str = FileAccess.get_file_as_string("./.godot-deps.json") + var deps = JSON.parse_string(deps_str) + for addon in deps["addons"]: + plug("%s/%s" % [addon["owner"], addon["repo"]], addon) diff --git a/plug.gd.uid b/plug.gd.uid new file mode 100644 index 0000000..4988a94 --- /dev/null +++ b/plug.gd.uid @@ -0,0 +1 @@ +uid://o0qs3k5ypc5i diff --git a/project.godot b/project.godot index bdbc03c..88cecff 100644 --- a/project.godot +++ b/project.godot @@ -18,7 +18,7 @@ config/name="Marble" config/version="1.6.1" run/main_scene="res://scenes/main.tscn" config/project_settings_override="override.cfg" -config/features=PackedStringArray("4.3") +config/features=PackedStringArray("4.4") run/max_fps=60 config/icon="res://assets/icon.png" @@ -40,8 +40,8 @@ source/commit="41b766d42997fc9af1af4cb8680329bf02d0833f" [custom_options] -build_info/commit="996e6018e05b70ef54ee9990d8b600588ed2ff3a" -build_info/date="2024/08/17" +build_info/commit="a15d491ab3844ed4d9aebe7be21dd05e8e15fe29" +build_info/date="2025/01/23" [display] @@ -83,6 +83,7 @@ wav={ [physics] +3d/physics_engine="Jolt Physics" common/enable_object_picking=false common/enable_pause_aware_picking=true diff --git a/public/publishing/store/nix-badge-dark.svg b/public/publishing/store/nix-badge-dark.svg new file mode 100644 index 0000000..cf9062e --- /dev/null +++ b/public/publishing/store/nix-badge-dark.svg @@ -0,0 +1,131 @@ + + diff --git a/resources/default_env.tres b/resources/default_env.tres index 8c77c05..1433720 100644 --- a/resources/default_env.tres +++ b/resources/default_env.tres @@ -1,6 +1,6 @@ [gd_resource type="Environment" load_steps=4 format=3 uid="uid://bo6iebn27wylo"] -[ext_resource type="Shader" path="res://shaders/sky.gdshader" id="1_cakj1"] +[ext_resource type="Shader" uid="uid://ckxjpyju8kg6h" path="res://shaders/sky.gdshader" id="1_cakj1"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_o0uin"] shader = ExtResource("1_cakj1") diff --git a/scenes/main.tscn b/scenes/main.tscn index 1b56a2e..6d341a1 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=9 format=3 uid="uid://bxmtpk5gebd06"] -[ext_resource type="Script" path="res://scripts/main.gd" id="1"] +[ext_resource type="Script" uid="uid://cgp2khllgr3sa" path="res://scripts/main.gd" id="1"] [ext_resource type="PackedScene" uid="uid://1ni00kklpf4b" path="res://scenes/gui/overlay.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://b8obdevmnmamd" path="res://scenes/race.tscn" id="3"] [ext_resource type="PackedScene" uid="uid://4g5aorgnd1hu" path="res://scenes/marble.tscn" id="5"] diff --git a/scripts/blocks/bumper.gd.uid b/scripts/blocks/bumper.gd.uid new file mode 100644 index 0000000..a704cca --- /dev/null +++ b/scripts/blocks/bumper.gd.uid @@ -0,0 +1 @@ +uid://pvi407kraspw diff --git a/scripts/blocks/checkpoint.gd.uid b/scripts/blocks/checkpoint.gd.uid new file mode 100644 index 0000000..0d5eb1d --- /dev/null +++ b/scripts/blocks/checkpoint.gd.uid @@ -0,0 +1 @@ +uid://caijtn2mkii3i diff --git a/scripts/blocks/finish_line.gd.uid b/scripts/blocks/finish_line.gd.uid new file mode 100644 index 0000000..4da5277 --- /dev/null +++ b/scripts/blocks/finish_line.gd.uid @@ -0,0 +1 @@ +uid://bxf340ywqu7ur diff --git a/scripts/blocks/piece.gd.uid b/scripts/blocks/piece.gd.uid new file mode 100644 index 0000000..496d7fb --- /dev/null +++ b/scripts/blocks/piece.gd.uid @@ -0,0 +1 @@ +uid://b3jh2p2m5o0aw diff --git a/scripts/camera/cinematic_camera.gd.uid b/scripts/camera/cinematic_camera.gd.uid new file mode 100644 index 0000000..b00b9ce --- /dev/null +++ b/scripts/camera/cinematic_camera.gd.uid @@ -0,0 +1 @@ +uid://daffy8yhxbbdl diff --git a/scripts/camera/marble_camera.gd.uid b/scripts/camera/marble_camera.gd.uid new file mode 100644 index 0000000..e4f7b4c --- /dev/null +++ b/scripts/camera/marble_camera.gd.uid @@ -0,0 +1 @@ +uid://cb8nyv2w1r88u diff --git a/scripts/camera/rotation_camera.gd.uid b/scripts/camera/rotation_camera.gd.uid new file mode 100644 index 0000000..24d9c41 --- /dev/null +++ b/scripts/camera/rotation_camera.gd.uid @@ -0,0 +1 @@ +uid://bksvbgukomwa8 diff --git a/scripts/camera/spectator_camera.gd.uid b/scripts/camera/spectator_camera.gd.uid new file mode 100644 index 0000000..90c02ae --- /dev/null +++ b/scripts/camera/spectator_camera.gd.uid @@ -0,0 +1 @@ +uid://sn58h607so6h diff --git a/scripts/constants/collision_layers.gd.uid b/scripts/constants/collision_layers.gd.uid new file mode 100644 index 0000000..cda4bc3 --- /dev/null +++ b/scripts/constants/collision_layers.gd.uid @@ -0,0 +1 @@ +uid://csf7yfima3b82 diff --git a/scripts/constants/groups.gd.uid b/scripts/constants/groups.gd.uid new file mode 100644 index 0000000..1f0634c --- /dev/null +++ b/scripts/constants/groups.gd.uid @@ -0,0 +1 @@ +uid://eunjsjaqrk0u diff --git a/scripts/constants/piece_list.gd.uid b/scripts/constants/piece_list.gd.uid new file mode 100644 index 0000000..0ec7b96 --- /dev/null +++ b/scripts/constants/piece_list.gd.uid @@ -0,0 +1 @@ +uid://cdowr24arfeuq diff --git a/scripts/framework/settings_manager.gd.uid b/scripts/framework/settings_manager.gd.uid new file mode 100644 index 0000000..2e66f0f --- /dev/null +++ b/scripts/framework/settings_manager.gd.uid @@ -0,0 +1 @@ +uid://duxl5ohugcpbl diff --git a/scripts/gui/countdown.gd.uid b/scripts/gui/countdown.gd.uid new file mode 100644 index 0000000..0174cdf --- /dev/null +++ b/scripts/gui/countdown.gd.uid @@ -0,0 +1 @@ +uid://cqy5l8gdda4am diff --git a/scripts/gui/menu.gd.uid b/scripts/gui/menu.gd.uid new file mode 100644 index 0000000..1b47b8b --- /dev/null +++ b/scripts/gui/menu.gd.uid @@ -0,0 +1 @@ +uid://ikndveosld50 diff --git a/scripts/gui/overlay.gd.uid b/scripts/gui/overlay.gd.uid new file mode 100644 index 0000000..f4789b8 --- /dev/null +++ b/scripts/gui/overlay.gd.uid @@ -0,0 +1 @@ +uid://dkwnlvly1cwuw diff --git a/scripts/gui/participant.gd.uid b/scripts/gui/participant.gd.uid new file mode 100644 index 0000000..2f8c234 --- /dev/null +++ b/scripts/gui/participant.gd.uid @@ -0,0 +1 @@ +uid://bd1kwjk8je7pn diff --git a/scripts/gui/ranking.gd.uid b/scripts/gui/ranking.gd.uid new file mode 100644 index 0000000..665461f --- /dev/null +++ b/scripts/gui/ranking.gd.uid @@ -0,0 +1 @@ +uid://bn6k6m8q1af4w diff --git a/scripts/gui/transition.gd.uid b/scripts/gui/transition.gd.uid new file mode 100644 index 0000000..624ba8a --- /dev/null +++ b/scripts/gui/transition.gd.uid @@ -0,0 +1 @@ +uid://cbo1vvab8gif3 diff --git a/scripts/main.gd.uid b/scripts/main.gd.uid new file mode 100644 index 0000000..2007f55 --- /dev/null +++ b/scripts/main.gd.uid @@ -0,0 +1 @@ +uid://cgp2khllgr3sa diff --git a/scripts/marble.gd.uid b/scripts/marble.gd.uid new file mode 100644 index 0000000..d375bc4 --- /dev/null +++ b/scripts/marble.gd.uid @@ -0,0 +1 @@ +uid://c7sxt2avkpbsi diff --git a/scripts/mouse_look.gd.uid b/scripts/mouse_look.gd.uid new file mode 100644 index 0000000..2cfa9d7 --- /dev/null +++ b/scripts/mouse_look.gd.uid @@ -0,0 +1 @@ +uid://d0girts7nyf21 diff --git a/scripts/podium.gd.uid b/scripts/podium.gd.uid new file mode 100644 index 0000000..9a0a2e6 --- /dev/null +++ b/scripts/podium.gd.uid @@ -0,0 +1 @@ +uid://ddnbch8ot6wkp diff --git a/scripts/power.gd.uid b/scripts/power.gd.uid new file mode 100644 index 0000000..284255c --- /dev/null +++ b/scripts/power.gd.uid @@ -0,0 +1 @@ +uid://cx0wfrculibpv diff --git a/scripts/race.gd.uid b/scripts/race.gd.uid new file mode 100644 index 0000000..e1c20ea --- /dev/null +++ b/scripts/race.gd.uid @@ -0,0 +1 @@ +uid://6l8wnxwkijav diff --git a/scripts/roll_sound.gd.uid b/scripts/roll_sound.gd.uid new file mode 100644 index 0000000..e15cd08 --- /dev/null +++ b/scripts/roll_sound.gd.uid @@ -0,0 +1 @@ +uid://c56te8yphbcl3 diff --git a/scripts/shake.gd.uid b/scripts/shake.gd.uid new file mode 100644 index 0000000..570abb5 --- /dev/null +++ b/scripts/shake.gd.uid @@ -0,0 +1 @@ +uid://dte8krpf5lakf diff --git a/scripts/utils/name_generator.gd.uid b/scripts/utils/name_generator.gd.uid new file mode 100644 index 0000000..f0bd2bc --- /dev/null +++ b/scripts/utils/name_generator.gd.uid @@ -0,0 +1 @@ +uid://b0mw0ukrylygn diff --git a/shaders/energy_shield.gdshader.uid b/shaders/energy_shield.gdshader.uid new file mode 100644 index 0000000..722d3b5 --- /dev/null +++ b/shaders/energy_shield.gdshader.uid @@ -0,0 +1 @@ +uid://dx0ayis2iyxi5 diff --git a/shaders/explosion.gdshader.uid b/shaders/explosion.gdshader.uid new file mode 100644 index 0000000..58b5491 --- /dev/null +++ b/shaders/explosion.gdshader.uid @@ -0,0 +1 @@ +uid://dm3gj4bbdmiuu diff --git a/shaders/sky.gdshader.uid b/shaders/sky.gdshader.uid new file mode 100644 index 0000000..e28df1d --- /dev/null +++ b/shaders/sky.gdshader.uid @@ -0,0 +1 @@ +uid://ckxjpyju8kg6h