AR Game Mechanics Development for Mobile Apps

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
AR Game Mechanics Development for Mobile Apps
Complex
~1-2 weeks
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    744
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

Imagine: you launch an AR game, enemies spawn on a real table, but after two seconds ARKit loses tracking – objects drift, physics breaks, and the player is furious. We've encountered this dozens of times over 5 years, having delivered over 30 AR projects. Developing stable AR mechanics requires accounting for many nuances: from RealityKit physics to optimization for devices with 3 GB RAM. Our team guarantees stable 60 FPS even on iPhone 11. Typical problems: tracking loss, unstable physics under changing lighting, gesture control anomalies, and pathfinding difficulties on AR surfaces. Payback for such a solution is under 6 months. Contact us to discuss your task and get a consultation.

How to choose a physics tool for AR?

RealityKit is the first choice for new projects. PhysicsBodyComponent + CollisionComponent provide native physics through ARKit's scene understanding:

var physicsBody = PhysicsBodyComponent(massProperties: .default, material: nil, mode: .dynamic)
physicsBody.isAffectedByGravity = true
entity.components[PhysicsBodyComponent.self] = physicsBody

var collision = CollisionComponent(shapes: [.generateBox(size: entity.visualBounds(relativeTo: nil).extents)])
entity.components[CollisionComponent.self] = collision

With arView.environment.sceneUnderstanding.options = [.physics] enabled, AR objects correctly interact with real surfaces. A ball rolls on a real table, a box stands on a real shelf.

The problem with RealityKit is limited control. You don't have access to individual physics engine steps or custom force generators. For simple mechanics, it's sufficient. For complex game physics (ragdoll, fluid simulation, rope physics), you need SceneKit with PhysicsWorld or Unity with AR Foundation.

Tool Simplicity Control Performance
RealityKit ★★★★ ★★ ★★★★
SceneKit ★★★ ★★★ ★★★
Unity AR Foundation ★★ ★★★★★ ★★★★★

RealityKit Physics

AR controls: gestures vs. aiming

Tap to place, pinch to scale, rotation – standard. But in AR, gestures compete with camera movement. The user wants to rotate an object – ARKit interprets it as hand tracking.

Solution via UIGestureRecognizer with shouldRequireFailure(of:): tap is recognized only if swipe has not started. For rotation – UIPanGestureRecognizer with a minimum displacement of 20 points before activation, so accidental camera movement doesn't trigger rotation.

A separate mechanic is 'aiming' via the screen center instead of tap. In shooters and strategies, it's more convenient: raycast from arView.center every frame, the object under the reticle is highlighted, action on button press. Implemented via ARView.raycast(from:allowing:alignment:) in a CADisplayLink callback.

How to handle tracking loss?

Tracking loss during gameplay. ARKit transitions to .limited tracking state – objects drift. For AR games this is a disaster: an enemy teleports 30 cm, a ball passes through a wall. Strategy: at .limited we freeze physics, show an overlay 'Point the camera at a surface', resume after .normal. We don't interrupt the game loop – only pause physics (set arView.scene.paused = true or scene.physicsWorld.speed = 0). We preserve body velocities for realistic resumption.

AR objects out of view. The player turns around, an AR enemy behind them continues moving and attacking. Frustum culling is needed not for rendering (ARKit does that automatically) but for game logic: AI of enemies outside the viewport can run simplified or be paused.

Spawning on uneven surfaces. Raycast returns the surface normal via ARRaycastResult.worldTransform – the fourth column of the matrix gives the point, X/Y/Z give orientation. If the surface is sloped 30°, the spawned object tilts with it. For games with 'flat' objects (tokens, chips), we fix the vertical: take only Y from the normal, construct transform with up = (0,1,0).

How to optimize AR game performance?

Optimization is critical for older devices. We use LOD for distant objects: simplified meshes, disable shadows beyond 0.5 meters. Reduce pathfinding graph update frequency from 60 to 20 times per second and cache results. On iPhone 11 this raised FPS from 45 to 60 with 6+ units – a 33% gain. For devices with 3 GB RAM, we additionally reduce shadow resolution by 50%.

Technical details of LOD For iOS, we use `ModelIO` to generate LOD meshes. For each object we create 3 levels of detail: high (0-0.5 m), medium (0.5-1.5 m), low (>1.5 m). Switching by distance from camera. We attach a script to `ARView` that updates LOD in the `update` loop.

Case study from our practice

A mobile AR strategy game: towers, enemies, real table as map. Our client wanted 6 unit types, pathfinding on mesh surface. The main problem: ARMeshAnchor updates asynchronously – while the mesh is rebuilt, the pathfinding graph becomes outdated. Our solution: navigation graph updated every 3 seconds on a background thread via GCD, and units used the cached graph. A unit in motion checked collision with the current mesh via raycast – thus we caught situations where the mesh changed and the unit walked through a wall. This reduced development time by 40%.

FPS stayed at 60 on iPhone 13. On iPhone 11 it dropped to 45 with 6+ units. Solution: LOD for distant units (simplified meshes), disable shadows beyond 0.5 meters. Result: stable 60 FPS on both devices.

Step-by-step AR mechanics development process

  1. Analytics and prototyping: Define key mechanics, test on real device.
  2. Architecture design: Choose stack (RealityKit/SceneKit/Unity), design physics and AI.
  3. Implementation: Create mechanics, integrate gestures, work with tracking.
  4. Optimization: LOD, caching, FPS profiling.
  5. Testing: Verify on different devices, under various lighting conditions.
  6. Deployment: Publish to App Store/Google Play.

Order turnkey AR game mechanics development – get a free consultation for your project.

What's included in the work

  • Physics of AR objects interacting with real surfaces (RealityKit / SceneKit)
  • Control system: gestures, aiming, UI buttons
  • Game loop with ARKit tracking loss handling
  • AI and pathfinding on AR surfaces
  • LOD optimization for support of devices from iPhone 11
  • Testing under real lighting conditions
  • Guaranteed result and free support for one month after delivery

Timelines

Mechanic Timeline
Simple AR mini-games (tap, shoot) 2–4 weeks
Strategy / tower defense with AI 8–14 weeks
Full AR shooter with multiplayer 16–24 weeks

Cost is calculated after a detailed discussion of mechanics. Get a consultation – contact us for an assessment.

We develop AR applications on ARKit and ARCore that work stably even in challenging conditions. Our experience: 7+ years in mobile development and 30+ delivered AR projects. Guaranteed: tracking won't be lost, lighting will be realistic, and the user won't feel discomfort. Certified Apple and Google developers.

Why does tracking get lost and how to fix it?

ARKit and ARCore use VIO (Visual-Inertial Odometry) — a combined processing of camera data and IMU. Tracking fails in three scenarios: illumination below ~50 lux, texture-homogeneous surfaces (white wall, glass), and fast camera movements.

In practice, if the product is intended for furniture try-on, we add an explicit UI warning when ARCamera.TrackingState.limited(.insufficientFeatures). An app that silently loses tracking gets 2-star reviews — we don't allow that.

Plane detection is configured via ARWorldTrackingConfiguration.planeDetection = [.horizontal, .vertical]. Important: ARKit continues to refine plane geometry through ARSCNViewDelegate.renderer(_:didUpdate:for:) — if you don't handle updates, the object starts floating when the anchor is refined. Our team solves this at the architecture stage, not during testing.

AR Foundation: cross-platform with nuances

Unity AR Foundation is an abstraction layer over ARKit and ARCore. It reduces development time by 40% compared to separate native codebases. But some features (e.g., ARBodyTrackingConfiguration for body tracking) are unavailable and require a native plugin.

For React Native and Flutter, direct AR Foundation is missing. We use ViroReact (React Native) or ar_flutter_plugin for simple scenarios, but for production quality — native modules with a bridge. Hybrid approach: AR scene rendered in native ARKit/ARCore view, control from JS/Dart via method channel. Included in our standard delivery.

Task iOS Android Cross-Platform
Plane detection ARKit ARCore AR Foundation, Unity
Face tracking ARKit (TrueDepth) ARCore Augmented Faces Banuba, Snap Camera Kit
Image tracking ARKit (Vision) ARCore Augmented Images AR Foundation
Object detection ARKit 3D Object Scanning ARCore no unified SDK
Persistence (saving anchors) ARKit World Map ARCore Cloud Anchors

Platform comparison: ARKit outperforms ARCore in tracking stability and feature set (30% fewer failures in low-light scenarios), but ARCore is cheaper in device support. AR Foundation is a compromise: loses up to 20% performance on complex scenes but pays off with a single codebase.

Try-on: product fitting via AR

Fitting glasses, jewelry, cosmetics — a separate class of tasks. Here, face tracking is needed, not plane detection.

ARKit provides ARFaceTrackingConfiguration — 52 blend shape coefficients for expressions, 3D face mesh, position and orientation in space. Works only on devices with TrueDepth camera (iPhone with Face ID).

For Android, the equivalent is ML Kit Face Mesh Detection or Google ARCore Augmented Faces (Pixel and some flagships). For cross-platform try-on, we use Banuba Face AR SDK (Banuba Face AR SDK documentation) — covers both devices, provides ready-made masks and stable tracking even on mid-range Android.

Try-on quality critically depends on 3D product models. Models must be optimized for real-time: no more than 10-15K polygons for jewelry, PBR materials with correct roughness/metallic maps, LOD for long distances. Within our engagement, we provide ready-made optimization guides.

How to achieve realistic lighting in AR?

ARKit with modern iOS versions supports Environmental Texturing — automatic creation of an environment map from the camera for realistic reflections. Enabled via ARWorldTrackingConfiguration.environmentTexturing = .automatic. Without it, metallic and glass materials look plastic.

ARCore provides Light Estimation — intensity and color temperature of ambient light, applied to the shader of virtual objects. In practice, it's the difference between an object that blends into the scene and an obviously overlaid 3D model. We guarantee that the final image doesn't betray virtuality.

What's included

  • AR solution architecture (stack choice, module design)
  • 3D pipeline: model optimization for real-time, PBR materials, LOD
  • Tracking integration (planes, faces, images, objects)
  • Testing on 10+ real devices (iOS and Android)
  • Documentation for SDK usage and ready components
  • Post-launch support (1 month bug fixing)

Timeline and estimation

Simple AR scene with placing one 3D model on a plane — 1-2 weeks. Face try-on with product catalog — from 6 weeks (3D pipeline, tracking integration, selection and saving UI). Full AR shopping with cloud anchors and multiplayer — from 3 months. We'll estimate your project in 1 day — contact us to discuss your AR idea.