Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Dynamic AR Game Development Using Apple ARKit

DZone's Guide to

Dynamic AR Game Development Using Apple ARKit

ARKit allows iOS developers to create augmented reality apps for mobile devices. Learn about its features and how to get started.

· Mobile Zone ·
Free Resource

ARKit is a new, free set of software tools that allows anyone to build powerful and dynamic apps and experiences on the iPhone and iPad. iOS 11 was launched in Sep 2017 that allows people to download and try AR for themselves. We are now heading towards 2018, and this year can certainly be termed as the year of dynamic augmented solutions.

Dynamic AR uses the effects of lighting, audio, and animatronics. Visions is an innovative platform that generated virtual AR ghosts, leveraging the power of the Skeleton Key Rooms, combining a bit of virtual reality with real practical startle scares and effects. Some of the upcoming VR powered games that are set to grow big in 2018 are HoloGrid Monster Battle AR (Happy Giant), which is a hybrid of a board game, a collectible card game, a mobile game, and an augmented reality game — all in one; and PuzzlAR World Tour (Bica Studios), which offers three landscapes for players to piece together. The three available landscapes are the Statue of Liberty, Taj Mahal, and Saint Basil Cathedral. The landmark sprouts up on a patch of land, and when players complete the puzzle, it shows off a victory animation, such as fireworks for the Statue of Liberty.

ARKit Features That Support Dynamic Game Development

Apple AR Kit has some great features that offer easy development of dynamic AR gaming. ARKit uses Visual Inertial Odometry (VIO) to accurately track motion, leveraging the power of camera sensor data. VIO helps to fuse the camera sensor data with the Core Motion data. It allows for "fast and stable motion tracking," where objects are allowed to interact with and look as if they are actually being placed in reality—in lieu of its current state.

ARKit’s advanced feature allows the accurate detection of horizontal planes and effective integration with screen rendering frameworks such as Metal and SceneKit. ARKit runs on the Apple A9, A10, and A11 processors. Powerful processors like these help to deliver breakthrough performance that offers a real-life performance with fast scene understanding. Game developers can build detailed and compelling virtual content on top of real-world scenes. Advanced iPhone X cameras allow for proper detection of 50+ muscle movements. The True Depth camera makes it easy to apply live selfie effects or uses facial expressions to drive a 3D character.

How to Create a New AR App Project Template in Xcode

Click “File,” “New,” and select “Project.” You will see a grid of options as shown in the below screenshot.

Now, click on “Augmented Reality App.”

Add the product name, choose the content technology, and fill in the other required fields as shown in the below screenshot.

 

In Xcode on your Mac, select “Window” from the top menu bar and click on “Devices and Simulators”. Now, double-click your iOS device after checking the box that says “Show as run destination.” 

 

Ensure your iOS device is selected in the device picker drop-down menu in the top left-hand corner of Xcode. Choose “Product,”  and then click “Run.”  

If you want to stop the demo app then go back to “Product” in Xcode and scroll down to “Stop.” 

That’s it! You can now start using ARKit. ARKit is Apple’s big bet on bringing AR to mainstream consumers by baking it directly into the iPhone and iOS. ARKit provides huge opportunities to game developers in 2018 and ahead.

Topics:
arkit ,game dev ,mobile ,mobile app development ,augmented reality ,xcode

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}