Skip to content

open-ecosystem-development/Mouse-Defense

Repository files navigation

Mouse Defense - (Wonderland Engine Demo)

Table of Contents

Introduction

This Wonderland Engine project is meant to demonstrate the capabilities of WebXR on a VR device such as the Meta Quest or Huawei VR Glass.

The game is set in a farm and the objective is to shoot all the mice that appear.

Please note that all development and testing was conducted with Google Chrome, Meta Quest, and Huawei VR Glass.

You can play this game on HeyVR.io.

Setup

Initial

This part is common to both the Quest and HVR Glass.

  1. Clone this project.
  2. Download and install the Wonderland Engine Editor.
  3. Open the project in the Wonderland Editor.
  4. Open the Chrome Inspect Devices page.
  5. Enable both Discover USB devices and Discover network targets
  6. Click on the Port forwarding... button
    1. Add 8080 as the Port value .
    2. Add localhost:8080 as the IP address and port value.
    3. Check the Enable port forwarding option.
  7. Click on the Configure... button
    1. Add localhost:8080 as a new value for IP address and port
    2. Check the Enable port forwarding option.
  8. Back in the Wonderland Editor, package and start the server.

Meta Quest

  1. Enable Developer Mode on the Meta Quest phone app.
  2. Plug the Quest into the computer.
  3. On the Quest, accept the "allow debugging" prompt.
  4. The Quest should now show up on adb devices. Additionally, the device should also show up under Remote Targets on Chrome Inspect.
  5. Launch either the Oculus Browser or Wolvic VR Browser and connect to http://localhost:8080/index.html
  6. The VR experience should be available.

Huawei VR Glass

Unlike the Meta Quest, which is a standalone device, the HVR glass works in conjunction with a VR compatible Huawei phone. The HVR glass takes up the USB port of the phone, which means ADB over USB is not possible and we have to use ADB over Wi-FI.

  1. Enable USB debugging on your HVR compatible Huawei phone.
  2. Enable ADB over Wi-Fi
    1. Connect both the phone and the computer to the same Wi-Fi network.
    2. Plug the phone into the computer.
    3. On the computer command line enter: adb tcpip 5555
    4. On the computer command line enter: adb shell ip addr show wlan0 and copy the IP address after the "inet" until the "/". Alternatively, you can also go inside the phone settings to retrieve the IP address in Settings → About → Status.
    5. On the computer command line enter: adb connect <ip-address-of-device>:5555
    6. You can now disconnect the USB cable and check adb devices that the device is still detected. The device should also show up under Remote Targets on Chrome Inspect.
    7. Back on the Wonderland Editor, navigate to Views > Preferences > Server
      1. Check SSL enabled
      2. Get OpenSSL (also available with Git)
      3. Generate an SSL certificate file: openssl genrsa -des3 -out domain.key 2048. Process overview.
      4. Generate an SSL key file: openssl req -key domain.key -new -out domain.csr.
      5. Generate an SSL dh parameters file: openssl dhparam -out dhparam.pem 1024.
      6. Add the SSL certificate, key, passphrase, and dh params file to the server page.
    8. On the HVR Glass, launch either the Wolvic VR Browser and connect to https://localhost:8080/index.html
    9. The VR experience should be available.

License

This Wonderland Engine sample code is licensed under the Apache License, version 2.0

Acknowledgements

The code in this project was based off the Wonderland Engine Wastepaperbin AR game.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •