Creating A Feature-Rich AR Based Game Using Flutter: A Case Study

Creating A Feature-Rich AR Based Game Using Flutter: A Case Study


AR-Based Game Development Using Flutter

Augmented Reality(AR)

Augmented reality provides an interactive and immersive experience using technology by using computer-generated content and hardware designed for AR. Multiple inputs such as audio, visuals, and tactile content is presented to the user to give a “lifelike experience”.

While undergoing a well-designed AR experience the user will feel like he is part of an experience and he or she is actually there and not experiencing it virtually. AR can be used for many B2B and B2C industries and for entertainment or as part of medical treatments and for training.


What Is a Quick Response code (QR)


  • A QR code, short for Quick Response code, is a two-dimensional barcode that contains information that can be easily scanned and read by a smartphone or QR code reader. When scanned, the QR code can quickly provide access to various types of data, such as website URLs, contact information, text messages, Wi-Fi network credentials, product information, and more.
  • QR codes consist of black square modules arranged on a white background. They can store a large amount of data compared to traditional barcodes. QR codes are widely used in advertising, marketing, ticketing, product packaging, and various other applications to provide a quick and convenient way for users to access information
QR Code scanning in the app

Treasure Hunt Game using Flutter AR: A Case Study

AR Treasure Hunt Game is the all new experience of playing treasure hunt games using QR and AR. So the flow of this game is like a player scanning the QR code, on scanning the right QR next clue hint is given to the player in the form of audio. And when the user scans the wrong QR code then wrong audio is played. Timeline is also there so that player can get idea like currently where the player is and how much the player need to win the treasure.

We recently developed a treasure hunt game that utilized both AR and Qr codes for the game participants. Players will use the QR code to scan well hidden bar codes, find the clue in the form of an audio message and hunt for the next code. Scanning the right QR codes leads towards the completion of game while scanning the wrong QR code can lead a user to wrong clues.

The main purpose behind developing this game is to take normal treasure hunt game to the next level and to integrate the magic of the AR in this game. AR is revolutionizing the gaming world. Users can now enjoy a more immersive, competitive, and engaging experience. A totally new level of the treasure hunt game.

How To Develop The Game In Flutter

To implement the AR in flutter application one needs to follow the below steps:

Step 1:

To achieve the AR using flutter there are two ways, either you can use the ar_flutter_plugin (Supports both platform no need to add any other plugin) or you can use the native plugins i.e arcore_flutter (for Android platform) and arkit_plugin (for iOS platform).


To to show AR model it is important to add permissions in the respected platforms:

  1. For the android platform:


  1. For the iOS platform:

Step 3: 


You need to add a sceneform plugin in the android build gradle file.

Apart from this you need to add dependencies and the animated model in build.gradle file.

Main Features

  1. Quick AR.
  • The idea of augmented reality is to blend digital content into the real world with the use of your smartphone.
  1. Clue wrapped in  QR Code.
  • A new way to show clues i.e in the form of QR code.


  1. Clues in the form of audio.
  • Instead of showing clues in the form of text, an audio clip is played which tells the user regarding the next clue.
  1. Timeline to track player status.
  • Users can also track their path with the help of timelines. It shows their current status and the path remaining for getting the treasure.

Game Timeline: Timeline of the game and progress of each user is displayed in the game.


Winner Section: The winner section will contain a list of all the winners and losers and the time they took.


Challenges Faced While Developing This Game


  • The ar_flutter_plugin does not support animated models to render. To overcome this problem the use of native plugins is done. In android again the same problem was there like it doesn’t allow to animate the object so to render animated model arcore_flutter(version 0.0.11) is used.
  • And the other challenge was to manage the camera like after scanning the qr code camera should not get stuck or close to overcome with this problem we have used stack so that when the QR code is scanned after that it gets disposed of and the ar camera gets started.
Winner interface


Major Benefits of AR Game

Minimal Technology

This is one of the most favorable Augmented Reality features. AR-based game development can be accomplished by acquiring minimal technology.

More Customization

The main principle of AR is to match the gaming experience with the real world. AR game let users visualize the game character in real life.Social Features

You can play this game whenever there is a party, get together, etc.

Universal Adaptability

The main feature of this game is it’s not limited to a particular age limit. Like anyone can play this game. From a child to old age who has a smartphone and supports AR can play AR game and have fun.


A well-designed and user-friendly game provides users a platform on which they can play this game and relieve their stress. It becomes more interesting as it is based on AR. As it is supported in both the platforms i.e. android and iOS so that users who are using android platform play this game without any issue and same for the iOS users.

Posted on June 26, 2023 by Keyur Patel
Keyur Patel