Metal should get iOS gamers very excited about the future

Apple unveils Metal, a promising new tool for game developers, at WWDC 2014. Photo: Roberto Baldwin/The Next Web

As a professional game developer, the big news coming out of Apple’s WWDC keynote wasn’t Swift or iCloud Drive — it was Metal.

In an onstage demo, Epic showed off the power of its Unreal engine after it had been modified to make use of this new Apple framework. Hundreds of fish reacted dynamically to a finger drawn on the screen. Leaves were shaken from a tree, and butterflies flew through the screen.

It was a very pretty demo. But what does it mean for the games you’ll be playing on your iOS device?

From what Apple promised Monday at its Worldwide Developers Conference, Metal will greatly optimize 3-D engines like Unreal, which many of us use to power our modern games. What this means for you is that Unreal games will have more complex rigs, better special effects and more enemies on screen.

At a technical level, Metal is a new developer tool from Apple that will bypass OpenGL and access your iOS device’s processor directly. This is important because running OpenGL, a widely used API for rendering vector graphics, comes at a significant cost to your iOS device’s processing power. Now, Unreal will skip all that and just go straight to “the metal.” (Fun fact: The term “Metal” comes from the gamedev practice of skipping higher-level languages, like Apple’s newly announced Swift, and optimizing by writing in actual assembly code, meaning 1s and 0s.)

Metal solves the problem of letting an iPad draw more shards of glass.

Metal should solve some of the biggest technical limitations Unreal developers like myself face on iOS. For example, in my game Revolution 60 a character turns and fires at a cyborg hibernating in a tube. The bullet flies through the glass, and the cyborg smashes through the top of the tube. When we first made the visual effect, we had 50 shards of glass spraying as she smashed through the tube. It looked great on modern iPads, but when we installed it on an iPhone 4S, the frame rate slowed to a crawl.

And so, 50 shards of glass became a dozen. And what could have been a cool visual moment became a question of just trying to make the action look passable.

Metal could change all that.

Visual effects are what make a game feel epic. Smoke pours from fired guns, embers spark from fire. Rays of light emanate from strikes — all these examples will be bigger, better and more immersive with Metal.

Transparency is another aspect of game production where Metal could be very helpful. Have you ever played a Final Fantasy game and marveled at the main characters’ elaborate hair? Game developers cheat hair with “Alpha Blades,” planes of texture with transparency making it look like there are many individual strands.

Her hair looks complicated, but it’s just a cheat with layers of transparency.

This technique looks great, but it’s not currently viable on iOS. Transparency is extremely expensive, involving two draw calls every time we use it on an object. On a character like Lightning, the draw calls would quickly grind your iPad to a halt. But, if Metal is as optimized as Apple’s keynote made it seem, developers could use this method.

What’s really promising about Metal are the additional kinds of materials developers might be able to use. The 2013 Tomb Raider reboot was a particularly great showcase of a method called the specular map. As Lara Croft crawled up rocks, they glistened as light bounced off them. Specular maps make guns shine like metal should. They make things that should be wet sparkle as light hits it.

For Revolution 60, we simply can’t use specular maps — they’re too expensive. But what struck me most about Epic’s demo at WWDC was the extensive use of these specular maps. The round metal ball in the scene? The spraying water? All of these effects made use of specular maps.

The great thing about specular maps is that they don’t take a significant amount of development time to make. Typically, you’ll simply modify one from a texture map. This could mean a big increase in the visual fidelity of Unreal games on iOS with relatively little effort from developers.

With Metal, all kinds of things are suddenly a lot more possible on iOS. Did you enjoy Left 4 Dead, a game that has you facing hordes of zombies? Well, Metal should allow more draw calls, meaning game developers can put more enemies on screen.

Do you enjoy games with lots of emotion and narrative? Metal could allow game developers to make even more complex facial and body rigs on iOS. Currently, any Unreal game that uses more than 75 mesh-influencing bones for a character requires a second draw call, meaning you can’t have many characters on screen at once if their faces animate. Again, Metal could change this.

To be fair, this is just speculation based on the WWDC demo. I have not played with a version of Unreal based on Metal, and I don’t have any inside knowledge from either Apple or Epic. But, as someone who fights against the limits of Unreal on iOS on a daily basis, I’m extremely excited.