User experience and app states

As explained in the Vuforia documentation, there are three phases of a Smart Terrain experience:

  • A staging phase, where the user sets up a staging area, adding props and the initialization target
  • A scanning phase, where the stage and props use in the setting are captured and reconstructed by the Smart Terrain tracker
  • A tracking phase, in which the terrain is augmented in real time by the Unity scene you developed

In order to support the Smart Terrain phases and scanning we'll give the app one of a set of states and coach the player through them to set up the playing area. We will have the following states:

  • OVERLAY_OUTLINE: During the detection phase, display instructions to the user to Find Target with the camera.
  • INIT_ANIMATION: The animation that is played when the trackable is found the first time - then jump to the SCANNING phase.
  • SCANNING: During the scanning phase, display the wire frame mesh in the scene, and show instructions to the user to Pull back the device slowly and display the Done button.
  • GAME_RENDERING: when the user taps Done, before the game can be played, hide the wire frame mesh, invoke OnStartGame, and jump to the GAME_PLAY state.
  • GAME_PLAY: this is where the user can throw the ball -- Hide the screen instructions, and show the Reset button.
  • RESET_ALL: user taps the Reset button, reloads the level - User has pressed the Reset button, reload the level and reset the app state.

Keep this in mind when we implement the AppStateManager in the following section.

We can now start adding Smart Terrain to our game.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset