Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use jolt physics #90

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Godot

GODOT_VERSION=4.3-stable
GODOT_VERSION=4.4-beta1

# Game

Expand Down
17 changes: 4 additions & 13 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,15 @@
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^plug\\.gd$"],
"fileMatch": ["^\\.godot-deps\\.json$"],
"matchStrings": [
"\\s+plug\\(\\s*\"(?<depName>.*)\",\\s+{\\s*\"commit\":\\s*\"(?<currentDigest>.*)\",\\s*\"renovate-branch\":\\s*\"(?<currentValue>.*)\""
"\\s+{\\s*\"owner\":\\s*\"(?<depOwner>.*)\",\\s*\"repo\":\\s*\"(?<depRepo>.*)\",\\s*\"commit\":\\s*\"(?<currentDigest>.*)\",\\s*\"renovate-branch\":\\s*\"(?<currentValue>.*)\""
],
"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\\(\"(?<depName>.*?)\",\\ \\{\\s*\"tag\":\\ \"(?<currentValue>.*)\""
],
"packageNameTemplate": "https://github.com/{{{depName}}}.git",
"versioningTemplate": "git",
"datasourceTemplate": "git-tags"
},
{
"customType": "regex",
"fileMatch": ["^.env$"],
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions .godot-deps.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A marble race minigame, made with [Godot Engine](https://godotengine.org/).
<a href="https://mechanical-flower.itch.io/marble" target="_blank"><img src="public/publishing/store/itchio.webp" alt="Download on itch.io" height="40px" ></a>
<a href="https://snapcraft.io/marble-race"><img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" height="40px"/></a>
<a href="https://github.com/mechanicalflower/Marble/releases/"><img alt="Download as AppImage" src="https://docs.appimage.org/_images/download-appimage-banner.svg" height="40px"/></a>
<a href="#nix" target="_blank"><img src="public/publishing/store/nix-badge-dark.svg" alt="Packaged for nixpkgs" height="40px"></a>
<!-- <a href="https://flathub.org/apps/details/org.mechanicalflower.Marble" target="_blank"><img src="https://flathub.org/assets/badges/flathub-badge-en.png" alt="Download on Flathub" height="40px"></a> -->

</div>
Expand Down Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions addons/export-build-info/build_info.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b3syvh073cpna
1 change: 1 addition & 0 deletions addons/export-build-info/export_plugin.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://d1ixrbagbqk2a
1 change: 1 addition & 0 deletions addons/export-build-info/label.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://c4n1po3i52owo
1 change: 1 addition & 0 deletions addons/export-build-info/plugin.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b7wtalm73m8yn
1 change: 1 addition & 0 deletions addons/gd-plug/plug.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://dem7wosb45k0s
5 changes: 4 additions & 1 deletion assets/blocks/finish_line.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/forward.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/forward_down.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/forward_up.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/hopper.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/hopper2.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/hopper3.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/looping.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/start_line.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/tube_vertical_to_horizontal.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_left2.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_left3.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_left_covered.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_right2.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_right3.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion assets/blocks/turn_right_covered.obj.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions assets/fonts/box_pixies.ttf.import
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ 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
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Expand Down
Loading
Loading