Skip to content

Commit 25d61f5

Browse files
Meta Quest 2 / 3 support (#219)
* Android Support for The Mirror for Meta Quest 2/3 What does this do: - Major engine upgrade to a much newer version of Godot Engine, with the fixes we helped with on the meta quest 3. (https://github.com/the-mirror-gdp/godot/tree/gordon/rebase-rc-2 to be merged) - Adds performance advantages for quest2/quest3 and low end hardware. - In theory fixes the intel crashing issues thanks to us removing our blur shader for the UI. (it was a huge performance hit) - Allows the Game UI to be used from within VR, renders all existing UI. (Doesn't allow the build menu but this was out of scope for this work) - Ensures the player is not visible for themselves on the local client, this will ensure no weird clipping happens. - The mirror can run in standalone mode on the quest 2 and quest 3. - Android doesn't flicker anymore. (Thanks to the Godot team for their amazing help ❤️) Use a spec constant to control whether the MultiMesh branch is used in the vertex shader. godotengine/godot#94289 - GameUI had to be moved to GameUI.instance as GameUI.instance is set based on if you are using VR or if you are using the Desktop UI, they are very different. GameUI.instance is useful because it ensures that you point at the correct UI and that you don't need to delete/readd the game UI, this was a major refactor and hugely painful to get working, there may be issues we do not know about without wider testing. - Forces glow and various graphical settings off when using VR, this is because it must be disabled officially any post processing except MSAA should be disabled for VR, baring foveation and some settings under OpenXR. - Removes the GameUI autoload and replaces it with the GameUI singleton using GameUI.instance. This was a combination of the GodotEngine team's rendering fixes. Special thanks to them.
1 parent afe6630 commit 25d61f5

File tree

258 files changed

+3000
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+3000
-973
lines changed

.github/workflows/client-build-tool.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ on:
102102
template-download-url:
103103
required: true
104104
type: string
105+
keep-openxr-binaries:
106+
required: false
107+
type: boolean
105108
outputs:
106109
url:
107110
value: ${{ jobs.client-build-tool.outputs.url }}
@@ -158,6 +161,11 @@ jobs:
158161
mv ./app-clone/mirror-godot-app/* .
159162
ls -lah
160163
164+
- name: Remove VR contents if not required
165+
if: ${{ !inputs.keep-openxr-binaries }}
166+
run: |
167+
rm -rf addons/godotopenxrvendors
168+
161169
- name: Use custom project file (required for custom splash screen)
162170
if: ${{ inputs.custom-project-file }}
163171
run: |

.github/workflows/deployment-pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
bucket-name: no-bucket
3636
os: ${{ github.event.repository.name != 'the-mirror' && 'windows-mirror' || 'windows-latest' }}
3737
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
38-
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorWindows.exe
39-
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/windows_release_x86_64.exe
38+
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorWindows.exe
39+
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/windows_release_x86_64.exe
4040
build-macos-client:
4141
name: 🍎 Build MacOS Dev PR
4242
uses: ./.github/workflows/client-build-tool.yml
@@ -61,8 +61,8 @@ jobs:
6161
bucket-name: no-bucket
6262
os: ${{ github.event.repository.name != 'the-mirror' && 'macos-mirror' || 'macos-latest' }}
6363
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
64-
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorMac.app.zip
65-
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/macos_template.app.zip
64+
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorMac.app.zip
65+
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/macos_template.app.zip
6666
build-linux-client:
6767
name: 🐧 Build Linux Dev PR
6868
uses: ./.github/workflows/client-build-tool.yml
@@ -85,5 +85,5 @@ jobs:
8585
bucket-name: no-bucket
8686
os: ${{ github.event.repository.name != 'the-mirror' && 'linux-mirror' || 'ubuntu-22.04' }}
8787
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
88-
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorLinux.x86_64
89-
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/linux_release.x86_64
88+
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorLinux.x86_64
89+
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/linux_release.x86_64

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ jobs:
102102
bucket-name: no-bucket
103103
os: ${{ github.event.repository.name != 'the-mirror' && 'linux-mirror' || 'ubuntu-22.04' }}
104104
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/MirrorGodotEditorLinux.x86_64
105-
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/linux_release.x86_64
105+
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/linux_release.x86_64

.github/workflows/engine.yml

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ on:
88
self-hosted-runner:
99
required: true
1010
type: boolean
11+
deploy-to-gcp:
12+
required: false
13+
type: boolean
14+
default: true
1115
secrets:
1216
GCP_BUCKET_UPLOAD:
13-
required: true
17+
required: false
1418
outputs:
1519
commit_hash:
1620
value: ${{ jobs.build-windows.outputs.commit_hash }}
@@ -128,10 +132,12 @@ jobs:
128132
name: ${{ matrix.artifact-name }}.exe
129133

130134
- uses: 'google-github-actions/auth@v2'
135+
if: ${{ inputs.deploy-to-gcp }}
131136
with:
132137
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'
133138

134139
- name: Upload binary
140+
if: ${{ inputs.deploy-to-gcp }}
135141
uses: 'google-github-actions/upload-cloud-storage@v2'
136142
with:
137143
path: ./godot-engine/bin/${{ matrix.artifact-name }}.exe
@@ -269,10 +275,12 @@ jobs:
269275
path: "./godot-engine/bin/${{ matrix.artifact-name }}.zip"
270276

271277
- uses: 'google-github-actions/auth@v2'
278+
if: ${{ inputs.deploy-to-gcp }}
272279
with:
273280
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'
274281

275282
- name: Upload binary
283+
if: ${{ inputs.deploy-to-gcp }}
276284
uses: 'google-github-actions/upload-cloud-storage@v2'
277285
with:
278286
path: ./godot-engine/bin/${{ matrix.artifact-name }}.zip
@@ -381,10 +389,121 @@ jobs:
381389
name: ${{ matrix.artifact-name }}
382390

383391
- uses: 'google-github-actions/auth@v2'
392+
if: ${{ inputs.deploy-to-gcp }}
393+
with:
394+
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'
395+
396+
- name: Upload binary
397+
if: ${{ inputs.deploy-to-gcp }}
398+
uses: 'google-github-actions/upload-cloud-storage@v2'
399+
with:
400+
path: ./godot-engine/bin/${{ matrix.artifact-name }}
401+
destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/
402+
build-android-linux:
403+
runs-on: ${{ inputs.self-hosted-runner && 'linux-mirror' || 'ubuntu-22.04' }}
404+
name: ${{ matrix.name }}
405+
environment: ${{ inputs.environment }}
406+
strategy:
407+
fail-fast: false
408+
matrix:
409+
include:
410+
- name: Android Template
411+
cache-name: android-template
412+
target: template_debug
413+
strip: true
414+
sconsflags: debug_symbols=no optimize=speed
415+
bin: "./bin/godot.linuxbsd.template_debug.x86_64"
416+
artifact-name: "android-template"
417+
artifact: true
418+
tests: no
419+
bucket-name: mirror_native_client_builds/Engine
420+
421+
steps:
422+
- uses: actions/checkout@v4
423+
with:
424+
submodules: recursive
425+
426+
- name: Ninja 🥷
427+
run: |
428+
sudo apt-get install ninja-build
429+
ninja --version
430+
431+
- name: Set up Java 17
432+
uses: actions/setup-java@v4
433+
with:
434+
distribution: temurin
435+
java-version: 17
436+
437+
- name: Check versions of the compiler
438+
run: |
439+
ldd --version
440+
gcc --version
441+
cmake --version
442+
443+
- name: Get short commit hash
444+
id: vars
445+
run: |
446+
echo "Git hash: $(git rev-parse --short=8 HEAD)"
447+
echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT
448+
449+
- name: Ensuring git hash exists (or will fail job)
450+
if: steps.vars.outputs.sha_short == ''
451+
run: exit 1
452+
453+
- name: Setup Godot build cache
454+
uses: ./godot-engine/.github/actions/godot-cache
455+
with:
456+
cache-name: ${{ matrix.cache-name }}
457+
continue-on-error: true
458+
459+
- name: Setup scons
460+
shell: bash
461+
run: |
462+
python -c "import sys; print(sys.version)"
463+
python -m pip install scons==4.4.0
464+
scons --version
465+
466+
- name: Setup GCC problem matcher
467+
uses: ammaraskar/gcc-problem-matcher@master
468+
469+
- name: Compilation (arm64)
470+
uses: ./.github/actions/godot-build
471+
with:
472+
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm64
473+
platform: android
474+
target: ${{ matrix.target }}
475+
tests: ${{ matrix.tests }}
476+
477+
- name: Compilation (arm32)
478+
uses: ./.github/actions/godot-build
479+
with:
480+
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm32
481+
platform: android
482+
target: ${{ matrix.target }}
483+
tests: ${{ matrix.tests }}
484+
485+
- name: Generate Godot templates
486+
run: |
487+
cd platform/android/java
488+
./gradlew generateGodotTemplates
489+
cd ../../..
490+
ls -l bin/
491+
zip -r android-template.zip bin/
492+
493+
- name: Upload artifact
494+
uses: ./.github/actions/upload-artifact
495+
if: ${{ matrix.artifact }}
496+
with:
497+
path: ./godot-engine/android-template.zip
498+
name: ${{ matrix.artifact-name }}
499+
500+
- uses: 'google-github-actions/auth@v2'
501+
if: ${{ inputs.deploy-to-gcp }}
384502
with:
385503
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'
386504

387505
- name: Upload binary
506+
if: ${{ inputs.deploy-to-gcp }}
388507
uses: 'google-github-actions/upload-cloud-storage@v2'
389508
with:
390509
path: ./godot-engine/bin/${{ matrix.artifact-name }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ This repo is The Mirror's source code: the Godot app (client/server), the web se
6060
1. Git clone the repository (you do **not** need to clone with submodules; they are optional)
6161
2. Download the precompiled Mirror fork of Godot engine (required to use)
6262

63-
- Windows: [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorWindows.exe)
64-
- Mac: **v buggy**; taking contributions for fixes :) [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorMac.app.zip). On Mac you will see a zip file; extract it and open the editor binary with CMD + Right-Click then select the Open option.
65-
- Linux: [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/f2020817/MirrorGodotEditorLinux.x86_64)
63+
- Windows: [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorWindows.exe)
64+
- Mac: **v buggy**; taking contributions for fixes :) [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorMac.app.zip). On Mac you will see a zip file; extract it and open the editor binary with CMD + Right-Click then select the Open option.
65+
- Linux: [Download](https://storage.googleapis.com/mirror_native_client_builds/Engine/35021301/MirrorGodotEditorLinux.x86_64)
6666

6767
1. Open the Godot editor (The Mirror fork), click import, and choose the `project.godot` from the `/mirror-godot-app` folder.
6868
Note that if you see this popup, you can safely ignore it and proceed.

mirror-docs/.github/workflows/bump-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
- name: 'Output Step'
3535
env:
3636
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
37-
run: echo "new tag $NEW_TAG"
37+
run: echo "new tag $NEW_TAG"

mirror-godot-app/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ node_modules
2323

2424
# Voxel terrain
2525
voxels.db
26+
27+
# Fix broken files from being checked into the repo
28+
# caused by the openxr modules
29+
~*.dll
30+
*.tmp

mirror-godot-app/addons/compressed_build_exporter/export_compressed_binary.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ func _export_end() -> void:
2424
print("finished export - making cicd specific binaries")
2525
assert(not _path.is_empty())
2626
assert(not _features.is_empty())
27-
if _export_platform.is_empty():
27+
if _export_platform.is_empty() or _export_platform == "android":
2828
return
29+
print("Export platform: ", _export_platform)
2930
# We compress platforms we support, but not game server builds
3031
# The game server builds are a special case and are uploaded in two files.
3132
# They are uncompressed to gcp.
3233
build_single_platform_for_distribution(_export_platform, _path)
34+
print("Finished Exporting the compressed builds")
3335

3436

3537
static func _get_platform_name(platform: EditorExportPlatform) -> String:
@@ -48,6 +50,8 @@ static func _get_platform_name(platform: EditorExportPlatform) -> String:
4850
return "windows"
4951
elif platform is EditorExportPlatformMacOS:
5052
return "macos"
53+
elif platform is EditorExportPlatformAndroid:
54+
return "android"
5155
return ""
5256

5357

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)