AR experiences are engaging, yet challenging in both technical and UX aspects. 

Many experts suggest keeping apps simple in order to deliver high-end quality. They recommend limiting the number of steps users need to take to let the fun begin. 

This helps attract new users. They try AR apps and give positive reviews. 

But the reality is that too few Augmented Reality games are long-term successes. They fail to provide a variety of activities. Users are keen and clever. If they can meet the challenge of a limited app, they then move on. Users open the app once or twice, then shut it down, and delete it to gain free space. 

 

As a result, many Augmented Reality mobile games face THE big challenge: retaining users.

In particular, Augmented Reality games lose their replay value when being simple single players. How can Augmented Reality game apps retain users? 

This is possible with introduction of a multiplayer mode. 

IT Craft’s R&D team has long experimented with AR technology offering different free AR apps. This time, the team decided to expand the new app AR Balloon Shooter game with multiplayer mode. 

There are reviews from developers who have already launched multiplayer games. What if we go one step further and improve UX by letting users connect automatically? Too few apps in the Apple Store support automated connection. 

So, the development team succeeded in building it within the app.  

Briefly: 

  • automated connectivity works
  • competitiveness is added to the game; hence, the app is more fun
  • accomplished by a high skill level from developers

 

In this post, we: 

  • compare single player and multiplayer game flow
  • discuss how AR multiplayer technology works
  • analyze challenges of implementing automation for AR multiplayer
  • propose key takeaways for starting an AR multiplayer with an automated player connection

 

AR Balloon Shooter Game flow

AR Balloon Shooter is a simple AR game where users shoot flying balloons by tapping on smartphone screens. 

This is how version 1.0 was:

The game had two modes: arcade and waves

Rules were simple: 

  1. The player started a session by tapping on either the waves mode or arcade mode. 
  2. Balloons appeared on the smartphone screen. The player shot the balloons.
  3. The game session ended when the user lost all the shots or when the time was up. 

Until recently, both waves and arcane modes had only a single player version.  

This is what has changed in version 1.4:

With the new update, a multiplayer version of AR Balloon Shooter game became available for arcade mode. 

Multiplayer functionality works the following way: 

  1. Upon launching the multiplayer mode, users scan the physical environment.
  2. The app connects with another user automatically based on their proximity. 
  3. After a successful connection, the app invites users to start a balloon hunt. 
  4. A balloon appears in the same spot for both users. Users need to detect it and take a shot. 
  5. By shooting successfully, users get points and extra shots. The game lasts until users are out of shots or time. 

Only two users can play simultaneously. All they need is to switch on Wi-Fi. No Bluetooth connection or connection to any network, no GPS positioning is required.

 

How AR multiplayer technology works

The team designed the AR Balloon shooter based on Apple’s guidelines for creating AR games

Encourage movement – Balloons appear in different, random places. Players must actively look for them. 

Do not make users move too much – Users do not need to walk around the entire room. They can make a visual sweep of the room to detect them.

Promote social engagement – Users compete with each other. They see points they gain after the round ends.

Offer short, varying games – Balloons appear randomly all the time. Rounds last 60 seconds.

The hallmark of AR Balloon Shooter’s multiplayer mode lies in connection. The users do not have to search through a list of active users when launching the multiplayer mode. This app searches for similar instances to it and tries to establish a connection. 

What does this mean in practice? Users only need to launch the multiplayer mode when sharing the same location. The app does the rest.

The following powers up the app:

Basic app stack:

– Swift – is used for native iOS app development

– Foundation – provides a base layer of functionality for apps and frameworks

– UIKit – is used to construct and manage graphic, event-driven user interface

Basic AR stack:

– ARKit – responsible for camera and motion features to produce augmented reality experiences

– SceneKit – high-performance rendering engine with a descriptive API that powers up the app

– SpriteKit – general-purpose framework used for drawing shapes, particles, texts, images, and videos in two dimensions

Multiplayer stack:

– Custom implementation of MultipeerSession built on top of Apple’s MultipeerConnectivity library – supports both discovery of services provided by nearby devices and communication with those services through message-based data, streaming data, and resources. 

– Codable/Decodable extensions for ARKit/UIKit classes – synchronizes players’ actions instantly by providing archived SCNVector3/SCNMatrix4 values.

 

Challenges of implementing automation for AR multiplayer 

ARKit, namely ARKit 2 is the key to successful AR game development.

ARKit solved a difficult challenge. It made new, multi-person mode for AR games possible.

Apple presented AR multiplayer feature for the first time at WWDC 2018 as a shared experience. 

Through shared experiences, ARKit 2 makes relocalization possible. Different AR models can be put into the same spot. The app learns their positions and orientations then readjusts it for the second user. Users can see these objects exactly in the same place, at the same time. 

The Augmented Reality game app also provides several challenges that—we believe—we can solve in the future: 

  • No Android version

AR Balloon Shooter game is only available for iOS devices. There is no app for Android because ARKit does not support the Android platform. In order to launch the AR Balloon Shooter for Android, we need to use ARCore. ARCore is built on different mechanisms because iPhones and Android smartphones have different types of cameras. Moreover, an AR experience is not even available for all Android phones! 

Hence, because the mechanisms are different, it seems that we cannot create the same AR experience for Android users. 

  • Relocalization 

Users demand quality. The app must synchronize graphics—namely synchronize the positions of all objects and motion vectors. This must be done respecting the frame rates 60fps. Fortunately, AR development libraries help. 

  • Connection and user limits

Wi-Fi is essential for the multiplayer mode as it makes it possible for  users to find each other. Users can experience problems with auto connection. In this case, users need to restart the app and ensure they have switched on the Wi-Fi module. In Wi-Fi mode, they need not connect to any network.

Currently, the number of players is limited to two. A third player can neither join nor kick an already-connected player out of the game. The app does not break the session even after users quit the multiplayer mode. 

However, whenever players restart their apps, they can easily connect with new users. The key is to restart the app when the player wants a new connection.

 

Key takeaways

To sum up, multiplayer is a great, valuable feature for every Augmented Reality mobile game. It increases the fun and adds variability to any app. 

What should you keep in mind when you want a multiplayer/multiuser mode for your AR app?

When planning a multiplayer AR game or a multiuser AR app, consider the following points:

  • ARKit offers a decent tool for creating multiplayer experiences.
  • Automated connection simplifies UX while eliminating extra steps.
    This attracts and retains users. 
  • iOS’s and Android’s detection mechanisms vary.
    UX might differ greatly on the platforms.
  • Respect the number of users being able to interact simultaneously.
    Provide them with prompts on how to connect/reconnect properly.

 

Thanks for reading!