Skip to content

Commit

Permalink
feat: basic VR implementation (#442)
Browse files Browse the repository at this point in the history
* feat: vr with lobby

* remove openxr by default

* ignores to format

* check

* check

* checkpoint

* openxr custom build

* remove player

* wip

* w

* wip

* lint and format

* add ci

* add ui texture protocol

* fix ci

* clippy

* try fix tests

* meta quest ci workflow

* remove no-needed changes

* lint ci yml

* apply review

* remove
  • Loading branch information
kuruk-mm authored Sep 19, 2024
1 parent 17cfaeb commit 46384e8
Show file tree
Hide file tree
Showing 575 changed files with 34,535 additions and 99 deletions.
5 changes: 5 additions & 0 deletions .gdformatrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
excluded_directories: !!set
.git: null
.godot: null
android: null
addons: null
51 changes: 51 additions & 0 deletions .gdlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
class-definitions-order:
- tools
- classnames
- extends
- docstrings
- signals
- enums
- consts
- exports
- pubvars
- prvvars
- onreadypubvars
- onreadyprvvars
- staticvars
- others
class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
class-name: ([A-Z][a-z0-9]*)+
class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
comparison-with-itself: null
constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*
disable: []
duplicated-load: null
enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*'
enum-name: ([A-Z][a-z0-9]*)+
excluded_directories: !!set
.git: null
.godot: null
android: null
addons: null
expression-not-assigned: null
function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
function-arguments-number: 10
function-name: (_on_([A-Z][a-z0-9]*)+(_[a-z0-9]+)*|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
function-preload-variable-name: ([A-Z][a-z0-9]*)+
function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*)
loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
max-file-lines: 1000
max-line-length: 9999
max-public-methods: 40
max-returns: 6
mixed-tabs-and-spaces: null
no-elif-return: null
no-else-return: null
private-method-call: null
signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
sub-class-name: _?([A-Z][a-z0-9]*)+
tab-characters: 1
trailing-whitespace: null
unnecessary-pass: null
unused-argument: null
93 changes: 53 additions & 40 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
on:
push:
branches:
- main
- main

workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true
default: 'main'

name: Android Build
name: Quest & Android Builds

jobs:
build:
runs-on: bigrunner
container:
image: docker://kuruk/dcl-godot-android-builder:latest
volumes:
- /home/user/.cache/devgodot:/github/home/.cache/devgodot

- /home/user/.cache/devgodot:/github/home/.cache/devgodot
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'push' && github.ref || github.event.inputs.branch }}
- name: Install Android targets
run: |
echo $PATH
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.2
override: true
components: clippy, rustfmt

- name: Install Android targets
run: |
rustup target add aarch64-linux-android
rustup target add x86_64-linux-android
- name: Build
run: |
bash build-android-apk.sh
# if libdclgodot.so does not exist, the build failed, nothing to upload
- name: Copy artifacts
if: success() || failure()
run: |
mkdir -p android-artifacts
mv godot/lib/android/arm64/libdclgodot.so android-artifacts/
mv android.apk android-artifacts/ || true
mv android-unsigned.aab android-artifacts/ || true
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: Android APK
path: android-artifacts/
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'push' && github.ref || github.event.inputs.branch }}
- name: Install Android targets
run: |
echo $PATH
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.2
override: true
components: clippy, rustfmt

- name: Install Android targets
run: |
rustup target add aarch64-linux-android
rustup target add x86_64-linux-android
- name: Build
run: |
bash build-android-apk.sh
# if libdclgodot.so does not exist, the build failed, nothing to upload
- name: Copy Android Artifacts
if: success() || failure()
run: |
mkdir -p android-artifacts
mv godot/lib/android/arm64/libdclgodot.so android-artifacts/
mv android.apk android-artifacts/ || true
mv android-unsigned.aab android-artifacts/ || true
- name: Copy Meta Quest Artifacts
if: success() || failure()
run: |
mkdir -p meta-quest-artifacts
mv godot/lib/android/arm64/libdclgodot.so meta-quest-artifacts/
mv meta-quest.apk meta-quest-artifacts/ || true
mv meta-quest-unsigned.aab meta-quest-artifacts/ || true
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Android APK
path: android-artifacts/

- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Meta Quest APK
path: meta-quest-artifacts/
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:

- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: snapshots
path: tests/snapshots/comparison/**/*
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
- name: Export
run: cargo run -- export

- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: decentraland-godot-${{ matrix.os }}
path: |
Expand Down
2 changes: 2 additions & 0 deletions build-android-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cd ${EXPLORER_PATH}/godot/
# Build the .aab without x86_64 architecture
echo "Export Godot android.apk"
${EXPLORER_PATH}/.bin/godot/godot4_bin -e --headless --export-debug Android ${EXPLORER_PATH}/android.apk || true
${EXPLORER_PATH}/.bin/godot/godot4_bin -e --headless --export-debug Quest ${EXPLORER_PATH}/meta-quest.apk || true


# Build the .aab without x86_64 architecture
Expand All @@ -61,5 +62,6 @@ sed -i 's/package\/signed=true/package\/signed=false/' ${EXPLORER_PATH}/godot/ex
# Build the .aab without x86_64 architecture
echo "Export Godot AAB"
${EXPLORER_PATH}/.bin/godot/godot4_bin -e --headless --export-release Android ${EXPLORER_PATH}/android-unsigned.aab || true
${EXPLORER_PATH}/.bin/godot/godot4_bin -e --headless --export-release Quest ${EXPLORER_PATH}/meta-quest-unsigned.aab || true

echo "Finished"
4 changes: 4 additions & 0 deletions godot/.godot/extension_list.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
res://dclgodot.gdextension
res://addons/godotopenxrvendors/khronos/plugin.gdextension
res://addons/godotopenxrvendors/lynx/plugin.gdextension
res://addons/godotopenxrvendors/meta/plugin.gdextension
res://addons/godotopenxrvendors/pico/plugin.gdextension
Loading

0 comments on commit 46384e8

Please sign in to comment.