marcojakob / tutorial-dart-treasure-hunt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dart Treasure Hunt

Build Status

This is an example implementation of a treasure hunt game in Dart. It is meant for educational purposes to learn programming in Dart.

Demo

You can try the following example application in your browser:

Treasure Hunt Demo

Features

  • Predefined treasure destinations (in latitude and longitude). User can choose a destination.
  • Uses HTML5 Geolocation API (GPS, etc.) to get the position of the user.
  • Calculates distance between user and destination.
  • Displays a compass to indicate the direction of the destination.
  • If supported by the device, the compass is turned to always face the magnetic north.
  • When close enough (e.g. 30m) to the destination, a message and an imaage is displayed.

Alternative Scenarios

The treasure hunt app could easily be changed into various other scenarios:

Known Limitations

  • In iOS Safari the compass points in an arbitrary direction. North will point in the direction the device is facing when the app was loaded. This will be resolved when [Dart Issue 19119](is fixed).

Further Infos

About

License:Other


Languages

Language:Dart 82.0%Language:HTML 11.9%Language:Shell 4.5%Language:CSS 1.6%