Coder Social home page Coder Social logo

desk-mysteries-ar's Introduction

AR Desk Mysteries

3D augmented reality point and click game about finding a pen in a desk. Made in Unity with Google ARCore (not XR Foundation) as coursework for a module in University. As a result, a lot of functionality was implemented in code, rather than using the interface.

Running

Download

Only Android is supported. You must have enabled installing apps from untrusted sources.

Instructions provided on screen.

Scroll down for walkthrough!

Implementation

This project mostly uses ARCore's spatial tracking features. First, the player is asked to map out a scene, where ARCore will (hopefully) find a plane. The user can then pick out where they wish to place the desk, as represented by a cube. The player can go back to this stage at any time without losing their progress.

Summary

  • Event based structure.
  • Reusable components.
  • Specific functionality in managers.
  • Use of C# interfaces to provide reusable functionality (such as GameplayEventSender).
  • Queue of events is kept to restore state if the player remaps the scene.
  • Has sound effects.
  • Interface made to support one handed operation and existing design patterns.

The UML diagram is located in the source folder.

Interaction

The interaction technique was modelled after the camera app, along with a reticle in the middle to indicate what the player will interact with. This was done to enable one handed operation, as finding the buttons requires the player to kneel down.

The raycasting was implemented using ARCore's Frame.

Gameplay Logic Implementation

Specialized logic was implemented in 'manager' classes, which handle the game state. In turn, they interact with reusable components, such as ones which detect presses. These components use a custom event sender and receiver interface to communicate with each other.

In order to allow the player to resume after remapping the scene, a queue of gameplay events is kept constant between scenes. These events are then re-executed after the scene is loaded back in.

Walkthrough

1. Find the key in the large right drawer and click on it.
  1. Click on the lock which is on the top left of the screen.

  2. Find the pattern in the small bottom drawer.

  3. Enter the code “XXOXOXOO” using the buttons on the back of the desk.

Asset Credits

Icon was adapted. Pen compartment sounds were cut together. Sounds are all public domain.

Material.io. Available at: https://material.io/resources/icons/?style=baseline

https://freesound.org/people/Nox_Sound/sounds/486081/ - Drawer Sound

https://freesound.org/people/Breviceps/sounds/448080/ - Button Sound

https://freesound.org/people/dkiller2204/sounds/422971/ - Key Sound

Pen compartment sounds:

https://freesound.org/people/giddster/sounds/360519/

https://freesound.org/people/leytos/sounds/251003/

Notes

My phone struggles with recording while playing AR. You can fix this by employing me though.

desk-mysteries-ar's People

Contributors

giodestone avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.