Kick off the game development sessions of WWDC 2014 by gaining insight into the key ingredients needed to create a great game for iOS. Understand the importance of harnessing the full capabilities of the platform to create a richer gameplay experience. Get practical guidance about game production and distribution, and learn the design and platform conventions that will make your game even more engaging.
What we're going to talk about today is some things that you can do in your game to make it really, really great.
Because having a fun game is simply not enough.
There are things that great games do. What I mean is, games that are recognized as industry leading in the games industry. Things that they do that you should be doing or what you really need to be doing to make your game great. And there's a massive opportunity.
As Tim talked about yesterday, there's 75 billion downloads of applications. And as everyone in this room knows, a huge portion of those are games.
Game Center also reinforces this with 130 million monthly active users last month. That is a huge audience that you can tap into for your game.
But, and to do that, you need to start with a great idea, obviously put in hard work, and you need to follow some really, really important key tips to make your game great.
So over the last couple days, yesterday and this morning, we've been talking about technology.
And so technology like OpenGL ES 3.0, which was introduced since WWDC last year, and is the most advanced OpenGL ES out there.
We also have Metal, our low level highly optimized GPU API.
We have Game Center, which provides that social connection for your players.
SpriteKit and SceneKit.
You know, let us do the heavy lifting for you.
If you don't need to go right to OpenGL or Metal, you can use SpriteKit and SceneKit.
It'll allow you to do less programming and let us build out efficient API underneath your game.
And Game Controllers: open your game up to many forms of input.
Of course, there's also Xcode 6 with Swift and Playground.
We have tools like the Metal or OpenGL Debuggers.
We have SceneKit and SpriteKit editors.
And, also this week, we have a mass amount of sessions about games. We have three on Metal, two on SceneKit, two on SpriteKit. We have labs on all of these technologies all week, and we have sessions about developer tools.
But technology alone is not enough.
You can't just take the technology, build a game on top of it, and expect it to be successful.
You have to go about the games business and the business of building a game with the same passion that you would go about your game design or choosing your technology or your graphics API.
If you look at the winners from the Apple Design Awards last night, like "Threes", "Leo's Fortune", "DEVICE 6", "Blek", or "Monument Valley", they have some common traits that attract, engage and retain their players. And this engagement is key to success.
So what we find are there are some common threads among these successful games. Things like, make it easy to buy and play your game by reducing the friction.
Or refresh your content to continually be able to retain and engage those players. As I said, engagement is really key.
We've identified these and other traits among these games.
And I'd like to invite Allan Schaffer up on stage to talk about these key ingredients for great games.
Thank you, sir. Hello, everyone. Welcome to WWDC 2014 and games.
So my name is Allan Schaffer. I'm the Game Technologies Evangelist at Apple. And, as Geoff said, I'm here to talk to you about some of the things we see in some of the best games on iOS.
Now, there's a lot of things that go into making a great game. And a lot of different ways to describe that process, right? But to echo back to what he was saying, when we look at games and we think about the Apple Design Award winners over the years, we start to see common threads and the kind of key ingredients that all of these games get right. And that's what I want to talk to you about today.
So I'm going to go through a list of some of these things that just really stand out to me. There is a lot more than what I'm going to go through, but here is the first thing on my list: Okay, is to remove friction.
So I'm talking here about making a great first impression and a really frictionless first time experience in the game, really streamlining everything that gets in the way of the player getting into the game as they start. So what do I really mean by friction here? So here's our imaginary game, "Paddle Mania 3000". It is awesome, by the way.
But it has some of the problems with friction that I'm thinking of here. So let me show you first the start up experience of this game: Player comes in? Loading. So, yeah, still loading. And it's going to take it about a minute to load because that's how long it will take me to get through the slide. So, you know, the problem that I have or that I see here with a number of games is that they really take kind of a monolithic approach to loading their assets.
And they preload everything up front instead of, you know, trying to just do what they need just to get started.
So your goal should be to get interactive as quickly as you can. Load just enough of your assets so that you can get up and running to your first interactive screen. And then use technologies like Grand Central Dispatch, and so on, to move work off of your main thread and so, and let that continue asynchronously.
Then, also, use the Time Profiler to really take a look at your loading performance.
And it will show you in a lot of detail exactly what work the app is doing during that time.
But even before you get into the Time Profiler, I don't want to just punt to the Time Profiler as my advice.
You have to really think about it first, right? Why are so many things being loaded up front? And isn't there something that could be deferred and loaded asynchronously a little bit later? So, okay. So it's done loading. And now let's go on to now we're downloading some assets.
Okay. So, you know, a lot of you guys do this in the game. And it's fine. In many cases, it's a good thing.
But it doesn't have to be something where it makes the player wait.
So later in the talk I'm going to go through a couple of things that you can do to move this off to the side so the user doesn't even have to notice it.
Okay, next: registration. Would I like a "Paddle Mania" account? No, I would like to play "Paddle Mania".
So, you know, when you think about the registration, there's a couple of possibilities here.
You know, maybe, actually that registration is needed. Maybe you have a game that is server backed, and you need some way to uniquely identify this player.
If that's the case, then actually you could just use the Vendor ID that we provide to the game as the unique identifier for that player. And get it so that it's out of the player's way.
Handle it automatically.
But maybe the case isn't that you have a server backed game. Maybe you're just asking the user to sign up for an account because you want to give them news or special offers or just whatever the reason may be.
Well, the first-time experience in the game is not the right time to ask for this yet.
They don't who, you know, why you might be asking. So, of course, you would need to clearly explain it. Like, is it needed? Or is it just kind of extra? And if it's not really needed, then defer it until later.
So I want to play, I'm going to say, no thanks.
Next, configure my paddle.
It's "Paddle Mania".
But, so, let me be clear: If this is my first time playing the game, then I don't know the implications of any of these choices, right, to go and play.
So if they matter, then now is not the time to ask me because I don't know.
And if they don't matter, then don't put them in the way of user getting onboard into the game.
And, you know, not knowing either way sort of conveys to the players that it's not really-the experience here hadn't really been thought through. And so there's some real trouble with "Paddle Mania", actually.
And then, yeah, there we go.
The last one here: please leave a rating. You know, this is fine, right, we talk about this all the time.
But, you know, at this point, actually, I haven't even played the game yet. So, you know, now is not the best time to come and ask me about rating it.
But, you know, I think, you guys are getting it here, right. So let me give you the takeaways of this first section: So you've got to get the player into the game.
Reduce the load time and any blocking updates to get the game interactive as quickly as possible.
Then streamline the registration, right. Provide an escape from tutorials and long intros and all those things that might get in the way. And then don't force decisions about something that the player can't possibly know about yet.
And be patient, you know, show some restraint when you're asking for feedback.
So that's number one: remove friction from the first time experience.
Okay, here's number two: be a good teacher.
So being a good teacher is really all about thinking through that onboarding experience and really kind of making it fun.
Because if you can help your players get started, it's more likely that they'll become more deeply engaged into the game.
And, you know, it's almost easier to think of it on the other side.
If you just leave it to the player to figure out your game themselves, then you run a lot of risks. You risk people just failing a couple of times and getting frustrated and leaving the game.
Or maybe they'll miss something that was really important to the gameplay and would have captured their interest, but they just didn't see it. They didn't know to go down that path.
So yesterday during the design award ceremony, John was up here. He talked about "Leo's Fortune" as his example. I'm going to use a different example: Apple Design Award Winner from 2011, and that's "Cut the Rope".
So this was an awesome puzzle game. And it's kind of the perfect example here to use as an onboarding case study.
So right away what you see here is they're using coaching tips to explain the goal, which is to deliver candy to Om Nom, the little character.
And then they start to tell you about things like the primary interaction. In "Cut the Rope", you swipe with your finger to cut the rope.
Now you might be looking at this kind of going like, well, that's totally obvious.
But, no, it's only because you've seen this picture.
And so the, you know what people would do without this, they would tap the candy, they would tap Om Nom trying to get him to jump up and eat the candy. They don't know what to do.
And those aren't the right interactions, right? The correct one is to swipe, cut the rope.
So then once the player has that down, then they start introducing new interactions one at that time.
So each time there's another coaching tip.
So here you cut the rope, the candy flows down, it goes into the bubble, and then the bubble will start to lift it up.
And then there's another tip put right in context once that happens telling the player to pop the bubble with their finger and that will release it and it will come down to Om Nom.
Okay. And then more really sort of subtle thing is that a big part of the gameplay in Cut the Rope comes from trying to get the candy to touch all the stars before it gets down to Om Nom and kind of routing around that way. And to be successful at that usually takes some trial and error on every level when you're actually playing the game.
So it's actually really important to the Core Loop of this game to show players how they can try again, right. So in their onboarding, they call that out specifically. And you would think oh, that's just, you know, okay fine they're showing me around the buttons.
But, no, if they had left that to the player to discover on their own, some people might not have played around with all the buttons and the menus to go and play again. But really this is core to the gameplay so that's why they show it.
But, okay, so to summarize now: So start by bringing the player right into the game and show them how to get started. And then introduce more complex interactions one at that time.
Provide tips and context as you go along and then help them discover the things that will be important in the game as they play through it.
So that's number two: be a good teacher.
Now, I want to mention, also, we're having a related session. It's going to be on Thursday, very aptly named, "Making a Great First Impression with Strong Onboarding Design". We'll spend a whole hour going through some examples that really get this right. So be sure to catch that on Thursday.
All right, now I want to turn focus to the gameplay itself. So number three is to really tune and perfect your Core Loop. You know, I talk to people all the time. And people will ask me to take a look at their game, give them some feedback, you know stuff under development.
And a lot of times what I'm looking at is something, you know, they're saying, I just it doesn't really feel fun yet.
And what that really comes down to is the Core Loop.
So Core Loop is the term that wraps up how to describe the game mechanic in terms of, you know, the actions the player takes in the game; the reward that they receive, you know, as they're pursuing a goal; and the resulting expansion of the game or the growth of the character that motivated them to pursue that reward.
And just in games that aren't quite right, what I often find is that there's some disconnect in this cycle or some mismatch between the parts so they don't really line up well.
But, so let me just illustrate this by showing you some typical examples from different genres, just to set the stage. So, you know, here is a fantasy role playing game.
I explore the dungeon. I fight enemies. Defeating the enemies gets me treasure and experience.
And then I use that treasure and experience to level up and to buy things. And then that lets me go and fight more and more powerful enemies, okay? Very clear.
Or a platformer, you know, the basic idea in a platformer is to run and jump, okay, that's the player action.
But their goal is really to complete the level itself and avoid all the obstacles and the bad guys and collect the stars or power ups or whatever is happening on that level.
But then if you're successful the expansion is to unlock the next stage, literally expand the universe, the game universe, for that game.
And where then you then go and find new things to run and jump over, new obstacles, and so on. But, okay. So now to get a little deeper, you know, it's really worth noting that some of the most compelling games are the ones with more than one Core Loop.
And I'm showing these side by side. But really they're meant to be overlapping.
So you're fighting monsters, you gain experience, you're leveling up. But, at the same time, you're collecting clues. You're using the clues to solve a puzzle. The puzzle lets you unlock a door. Behind the door there's more monsters and more clues. And these are overlaid in the experience on top of each other.
But, okay. So let me give you some more concrete advice here. So, you know, what really is the bottom line? So the best games, first, are the ones that really, clearly understand their target audience and are able to put center excuse me, put the centerpoint of the Core Loop right on top of that audience.
And it's important that the Core Loop be easy to express and kind of easy to understand. That's kind of, when I find games that are have these little mismatches, usually it's a case where it's difficult for the developer to actually express the Core Loop, these components, clearly in terms of the action, the reward, the expansion.
Now, as I have been saying, make sure each phase of this feeds right into the next. And, sort of, all of the energy that the player gives into one part of it flows around and, kind of, reinforces the other parts.
Make each iteration meaningful. And I'll talk about this a little more as I talk about progression in the game.
But then also question your assumptions. And this is probably the best advice for any developer is to go back and really rethink it and keep iterating until you know you've done it well.
And, you know, how do you know? How do you really know? I could say playtest, but that's just a punt, right. It's like, how do you really know that you did it well? Well, you know it by really thinking it through yourself.
You know, if you find the clues, will you be able to solve the puzzle without some giant leap of faith or going online to Google how to figure out this puzzle.
Well, you know, if you unlock something, if you solve that puzzle, is it going to unlock the next stage? If you unlock that next stage, will I have something new or novel to really look at once I get there? Okay. So test it.
But, at the same time, don't feel boxed in.
I am not saying that every game needs to follow the same design methodology or, you know, kind of deal with its audience in the same way.
A lot of the really best expressions of great games are the ones that aren't afraid to mix this up.
But, so, now, let me show you just a quick example, a game that's really fantastic in the way that it does its Core Loop is the Apple Design Award winner last year, this is "Ridiculous Fishing" by Vlambeer.
So it really has, I think you could break it down into three distinct mechanics. The first one is when you are dropping your line into the water. You're just trying to, you're using the accelerometer or the gyroscope and trying to get the line down through the water avoiding the fish, get it as deep as you can. Okay. Then once you run out of line or once you hit a fish on the way down, everything reverses. And now you're going back up and reeling in as many fish as you can.
We're back on the gyro again and just trying now to collect as many of the fish and try to run into them while avoiding the jellyfish and other baddies that are there. And then the third loop, when we get up to the surface, of course, we fling the fish up into the air and then you tap on them to shoot them out of the sky, right, so and collect points.
And so, and then those points are what we use as the expansion in the game. It lets us get a better lure, a longer line, and so on. And so the game is really, you know, hilarious.
And if you didn't see it last year from the design awards, check it out. But so that's tuning your Core Loop.
Now, let me expand out from there.
And so for the next few parts of the talk, I want to go through some aspects of this next ring around the Core Loop and I want to start with the interaction mechanic. Because obviously, you know, how the player interacts with your game is completely fundamental to the success of the Core Loop, to it feeling fun.
And if your players seem to be having trouble with the controls, this is where to start.
And it's to design for touch.
So sometimes when I'm working with someone who's bringing a game over to iOS from another platform like a PC or a console or whatever, their first instinct is actually to just bring their Core Loop over completely unchanged, you know, including all of their old interaction mechanic, right. And so, you know, if their game was based on pressing buttons than they just overlay the screen, superimpose some buttons.
Or if they used to use a D pad, then, okay, great, then they'll put a virtual D pad on the screen.
But the truth is that this is usually not really optimal. These overlays get in the way of the player seeing the game field.
And, but more profoundly, they're indirect.
They're controls that are controlling that little paddle that's going to go underneath. And, you know, it's a bouncy ball game, right? And so since they're indirect, it relies on the player to really be able to be in control of the controls themselves.
But they can't feel when their finger is in the right spot. And so they kind of have to look at their finger a lot in order to be confident in their actions.
Okay. Now, if you step back a moment and really think about where all this is coming from, you know, if the game was designed with a different interaction mechanic in mind, then a lot of the assumptions of that other mechanic just get built into the game. They become kind of implicit and ultimately kind of forgotten.
And when that happens, the answer isn't just to, kind of, remap some controls onto a virtual joystick or virtual buttons.
You really need to go back and rethink those assumptions. And, you know, go back and redesign for touch.
And if you're not sure what I really, really mean by this, then let's just go back and look at some of the Design Award winners over the past couple of years.
"Monument Valley": tap the path, and that directs Ida around to walk around.
She's the main character. And then you or you do these little twist gestures and that'll turn the cranks and move the walkways.
So it's based on taps and gestures.
"Blek": You make a shake with your finger. And that's the pattern that the stroke that's generated is going to follow and you try and get that to repeat. And try to hit the dots. By the way, I'm going to hang this picture in John's office when we get back.
So but it's about stroking a path. "Threes". So in "Threes", you push the tiles against the walls to make, you know, matching numbers join together. It's very, kind of, physical. You're pushing the tiles.
They're coming, they're squeezing together against the walls, and so on.
But it's all based on short strokes and swipes.
Infinity Blade. You swipe the screen to control how your character's going to swing its sword. Then there's some buttons you press to dodge, and raise, you know, you put on your shield.
And there's some gestures you use to cast a spell.
But so it's taps, swipes, and gestures.
"Cut the Rope": We just showed you. You swipe to cut the rope, and then you tap things like balloons and you tap on the bubbles and so on to blow air around or pop the bubbles. So it's taps and swipes.
"Where's My Water": You guys are getting this. You know, you take your finger, you drag a path through the dirt and that's where the water is going to flow.
So you feel your finger touching the glass. You instantly get audio feedback when you touch the screen.
You feel the friction as you draw that path, move your finger around. And you instantly see the path you drew.
So it's a game that gets everything right. Everything is in sync.
So let's take all this and sort of distill it down and summarize what I mean by this.
So the key to what all those games, and others that are all doing, is to design their controls around direct interactions reinforced by instantaneous feedback.
So direct manipulation is the key to that interaction model on iOS. You've got to embrace the idea that the best iOS games are the ones where you reach through the glass and touch the game elements themselves, right.
So it's based on touches and taps and gestures and swipes and panning and drawing paths where those interactions are the ones that define the gameplay.
And then it's critical that you provide instantaneous feedback.
So these are the visual cues and audio cues so that what you see and what you hear and what you feel all reinforce what you did. And they reinforce each other.
So, with all that passion, that was designed for touch.
But if people seem to be having a lot of trouble with your controls, go back to those principles and really redesign your Core Loop around the idea of direct interactions that are reinforced by instantaneous feedback.
Okay, next is to foster engagement.
So, you know, this about keeping the player coming back to your game. And we use a lot of different terms to describe this, you know, it's a huge, a huge area. But all this is done because, just hopefully, you know, having a really deeply engaged player is going to generate word of mouth and viral discovery, more business for you, more of a fan base, and so on.
And there are a ton of things to talk about here. But, you know, and I'll get to some specifics in a minute.
But I want to first say something else that's a little deeper about this.
So it's really easy for any of us to, kind of, get wrapped up in the details of the Core Loop and the onboarding and so on.
But it's important for you to be able to rise above those details of the game and really see the game from the player perspective and understand that the design process here is profoundly fractal.
The same patterns emerge at every level of detail. And there are resonances among them.
So even if you get the game loop completely right, if you can't rise above that, it won't resonate with your meta game or your progression.
If you get the progression right but you can't rise above that, it won't resonate with the storyline, and so on and so on.
But, okay. So now taking this down a notch, back to Earth just a moment.
Do you remember how a couple of moments ago I said that, you know, a lot of really interesting games overlay multiple Core Loops? Well, that holds true for the progression as well. And so one way that you can really get, hold the player's interest is to provide layers of progression or overlays of it, of progression and expansion with multiple goals, multiple paths of goals, I mean, multiple paths of challenges, and different paths giving different balance between risk and reward.
That's something that players will find very, very compelling.
And you can even gamify the expansions themselves.
So this is, you know, kind of the essence of a lot of crafting games is that you make the expansions themselves into choices that the players have to make that are strategic to the future of their gameplay.
And then you ensure that you take them down different paths depending on what they've done.
But, okay. This next one now, so this is particularly important for anyone who's making free to play games.
And that's to provide value for everyone, both your paying players and your non-paying players.
So work through the entire experience for both of those audiences to ensure that those who are playing your game for free can progress, can expand, and, sure, they can see the benefit. Show them the benefit of becoming a paying player.
But if you try to force them, then you'll lose engagement with a fair number of them.
And on the other side, ensure that those who are paying in your game will feel that they're getting properly rewarded in the game and getting something for the money that they're spending.
Then next, again, this is holding the player's interest.
So really do what you can to incentivize repeat play.
So enable and motivate the player to try one more time.
Enable and motivate the player to see what's next.
Enable and motivate to see how it ends, right. And if you think about where these fit in, "one more try" is about the Core Loop.
"See what's next" is about the progression.
"See how it ends" is about the storyline, right.
Okay. Now, let me talk a bit about re engagement. So providing really, you know, coming out and providing really fresh new content after you've launched is a great way to keep your momentum going and, in many cases, even to help drive new growth.
So really think about how you will continue your story to provide new content or new levels or new goals or challenges, and so on.
Or seasonal content around holidays. Or regional content in different locales.
It's all to give your players another positive reason to come back into the game.
And it's important that you plan this out before you launch.
Because the people who have had catastrophic success are the ones who a game takes off and then they realize people are done.
And they need to scramble to get more content out.
You're most engaged players are going to consume your content very quickly; so have it ready.
Have it ready to go so that your really, deeply engaged players can have something that's going to bring them back into the game. And you'll attract new players to come in as well. Now, it's also important to really measure and understand how well you're retaining your players.
And starting later this fall, we'll be providing retention information to you through iTunes Connect.
So this is going to show you how many players have downloaded your game by day, by region, by platform, by source and what percentage of them kept playing in the days that followed their download.
And so this is just a taste, okay. So we'll show you a lot more about this in the iTunes Connect session tomorrow morning.
But so that's number five: to foster engagement.
So now, let me turn the focus the other way and get into a couple of things on the technical side.
And so this is number six: to use background transfers.
Huh? Okay. So you remember back in the first section where I was talking about friction, I talked about downloading updates, and I said that that was something that we could move out of the player's way? That's what this is about and that's what I'll get into here. So in "Paddle Mania 3000", we have, you know, thousands of image assets because we have so many levels, right. We have-and for all of those different assets, we have one for Retina, non Retina, iPhone 5s, the iPad, iPad Air, right. And then we have all of our sounds, AAC and MP3 for our soundtrack. We've got Linear PCM for audio effects with OpenAL.
We've got 13 different localizations, right. So English, French, you know, EFIGS, Japanese, Traditional Chinese, Simplified Chinese, Brazilian, Portuguese, and a few more.
And then we have a binary compiled three different, you know, three ways: armv7, armv7s, arm64. Okay. So there's a lot of stuff in "Paddle Mania 3000".
And you know putting all that together is putting us over the limit for downloading over cellular.
So what do you do? Well, you know, a lot of times, a discussion will begin, and, you know, quite often there will be somebody who will chime in with advice like this: "One size fits all!" Just ship one size. Stretch it.
Stretch it to fit on all platforms, or just ship one localization. They all speak English, right? No, they really don't.
So don't sacrifice quality. And don't shortchange your global audience.
Realize that what you could probably get your game under 100 megabytes if you use background transfers, you know, and let the user download the main bundle of it now but have more content that gets transferred down after they've run it the first time.
So there's a couple of things to do this now.
So the first step really is to take a good solid look at your game and the game design and determine if there is some content that isn't really needed right up front.
And games, especially games with any kind of a linear progression are perfect for this, right.
You put the first couple of hours or whatever, you know, the first 20, 30 levels in the bundle at full quality.
And then that's going to provide enough time for the user to be playing, and then you use background transfers to download the rest while their playing those first 20. So how's this done? Okay. So NSURLSession is an API that we introduced back in iOS 7, and the use is to upload and download data from your own server.
And this is intended for large data sets. So game levels, big images, sound files, texture atlases, all that kind of thing, right.
Now, the transfer, itself, happens outside of your process. You just set it off. You'll get notified when it's completed.
The player can continue or the app can even be, you know, quit or terminated. And the download is going to keep on going.
And the app, if it's running, will be notified, or it'll be woken up when the transfer is done.
And it's just enough so that you can take the content that's been downloaded and, kind of, unpack it and put it into its permanent location.
So it's really useful.
It does obviously, it adds some complexity, right. Because you're going to have to handle some corner cases now that you didn't have before, like the player running out of disk space or, you know, reaching a level that you haven't successfully downloaded yet.
And it's important, also, that you follow the iOS Data Storage Guidelines. So these will tell you exactly where to put any downloaded assets.
And also remember, this is about assets, you know, new textures, new levels, new sounds, and that kind of thing, but not code.
If you're making code changes, that has to go back up through app review as an update to the app.
But, okay, so that's number six: to use background transfers.
And, you know, if you're going to be targeting iOS 7 and above, like now is the time, right, because you can move cleanly up to all of your supported devices with NSURLSession.
Okay, number seven: optimize graphics performance.
So, you know, I've mentioned I meet with developers all the time. I probably met with some of the people in this room.
And, you know, to give people feedback on their games, but one of the things that just very, very honestly that I love to do is to run their game through our performance tools and, kind of, use that to figure out what optimizations they need to make in OpenGL and so on. It's kind of what I eat for breakfast, right.
Now, so as I get into this section, though, the first thing to realize and to say about it is that optimizing graphics is totally what Metal is all about. But I'll get to Metal in a second.
I want to talk first just about optimizing the games that are already out there.
So, you know, every game is different, right, and most of them are actually pretty well optimized. They're okay.
But in the games that are having performance issues with OpenGL, it's usually because for some portion of the frame, at least, or maybe all of the frame, they're trying to do a lot of draw calls with a low number of triangles to be processed in each draw call.
And the worst case scenario is actually fairly common. I see it sometimes. It's particularly in 2D and isometric games that I'll find this sometimes.
Is that they're just, they're in a loop where they're binding a texture, drawing a quad, and then repeat. Bind; draw; bind; draw; bind; draw. And that's how they draw their entire scene with one draw call for every quad, one texture bind for every draw call.
And, you know, for OpenGL ES, there's just, there's a fair amount of CPU overhead that's involved here in the validation and the processing draw calls. So, you know, the theory behind this becomes very important to optimize this. It's super important that those developers find a way to amortize that overhead over more triangles.
Now, this is something that I can help any of you with, and we have tons of people in the lab this week. So if you're falling into this situation, we can help you.
But these 15 recommendations that are up here cover most of the cases that I run into. This is the solutions that we apply depending on the game, depending on the structure, and what they're doing in OpenGL.
But, and I'm not going to go deep into any of these. But, so, more broadly, what you need to realize is that optimizing graphics performance is really and primarily about identifying the bottlenecks that you have and then addressing them, taking some action to address them.
Okay, so that lets me talk about the tools. You know, we have these fantastic tools that will help you identify exactly where your performance bottlenecks are and different bottlenecks that might be happening.
So this is a screenshot from the GPU performance graphs in Xcode.
And this, along with the GPU frame debugger in Xcode and the OpenGL ES analyzer instrument, are kind of the tools of the trade that you should familiarize yourself with here.
So now let me zoom in.
So what you see here: Section at the top you see this sort of speedometer on the left up at the top, the purple bars with utilization in the middle that's showing me my GPU utilization. And then over here on the right, the frame time, or how much time the CPU is working on this frame, and how much time the GPU is working on this frame.
Now, in this particular screenshot, this is a little different than what I was just talking about with bind, draw, bind, draw, bind, draw. In this one, what it is, I can see the renderer utilization is at 100 percent and that's pushing the device utilization up to 100 percent.
And that is typically a sign actually of a very expensive fragment shader.
Okay. And so down in the bottom here, you can see, a view here now where I can-it's showing me the cost of every one of my shaders that was used in this frame. And I can turn down these disclosures and see the specific draw calls that use that shader and how much each one of them cost as well.
And, then, I can also go and drill down into a particular shader. I'm not going to walk you through all the UI. But once you get to the view where you're looking that your shaders, if I zoom that in again.
Okay. So what this is showing me now, look at on the right hand side, these little bars.
This is taken live from the device. It's able to see the performance data.
And it's going line by line through the shader to show you the performance cost of each line.
And so here I see that, okay, 59 percent of the cost of this shader was going into shadow projection. And that's probably something I can optimize. I can use a lower resolution shadow map or something.
Because, remember, this was the most expensive shader in the app.
And the renderer utilization was at 100 percent. So this is the bottleneck, this shadow projection. And so it's exactly what, in this case, needs to be optimized out.
But, so the point, though, is that the tools can be used to exactly pinpoint what's going on in your app. Now, you know, if you're not familiar with the tool or this isn't something that you know your way around yet, just come down to the labs.
We have so many people down there who would love to help you to suss this out.
But so, obviously, there's an opportunity here, right, for OpenGL ES-based games to kind of use the tools, optimize and get better performance. But I also want to be super clear, you know, that seeing so many developers struggle and face these kinds of issues are a big part of the reason why SpriteKit and SceneKit were developed, right.
Their purpose is to provide you with the capabilities that you need, right? 2D games with SpriteKit, 3D games with SceneKit. Or now they can be mixed together, right.
But the real key is that once you're using them and taking advantage of their feature set, they take on the burden of rendering optimally in OpenGL. And you don't have to worry about it anymore.
And, if you think about it, one more step, you know, since Apple provides the entire technology stack from these APIs all the way down to the hardware, it means that everything can be made very optimal in a way that you don't have to work on.
And then, okay, speaking of optimal, right. Now there's Metal, right. So this, this is for those of you with games or engines that need to push a lot more draw calls.
And really allow your code to have very efficient access to the GPU to interleave graphics and compute, and so on. And really take control yourself over how the frame is being rendered.
So that is number seven: optimize graphics performance.
Okay, number eight: now, we're lifting out of the tech in just a couple of really kind of quick and light bits of advice here.
This is a super quick one. It's to make a great gameplay video.
You know, so earlier in the talk, I talked about the importance of making a really great first impression.
But what I didn't really get into then was that from the user's perspective, your player's perspective, all of that is going to start on the App Store.
And, you know, as we talked about yesterday, you know, when people are really coming on to the App Store, they're looking for something that's cool and new. You know, they're going to be looking for some way to kind of understand what your game is doing. And you want to have something that's going to stand out and exactly explain it.
And so that they'll be more confident and more ready to get your game.
Okay. Now, as we talked about a little bit yesterday, so in iOS 8, OS X Yosemite, you'll be able to create these short app previews or game previews to demo your game.
You should use this to show how the game is played. You know, use it. Tell a story with this and really appeal to what makes the gameplay so much fun.
You know, here's how it'll look when it's on the App Store. We showed this "Monument Valley" example yesterday. And how it works is just the app preview just appears as the first image there along with the screenshot.
User taps on that, and they can see this gameplay video.
But now some details about this.
Okay. So the app preview needs to be, you know, a video of your gameplay. It's not intended to be an ad.
It should convey the real experience of playing the game.
It can be up to 30 seconds long.
You provide it as an H.264, you know, MPEG4 encoded file that you upload into iTunes Connect.
You can have, or you should have a different video for iPhone versus iPad. And your content itself can be captured directly off of your iOS device and onto your Mac that's running OS X Yosemite. The Mac just sees the iOS device as a video camera.
And you start playing the game, and you can capture it using whatever tool you like: Quicktime Player, and so on. iMovie is where you can do your editing. And then just put it all together and get it up on iTunes Connect, and you're ready to go.
And then this is really just sort of one piece of building a great App Store presence, right. So having a great icon, compelling screenshots, localizations, description, your keywords, and so on.
Okay. So about app previews, there's a whole session on it that's also on Thursday afternoon. Check your schedule to see that.
And make a great video that's going to show players who are interested in your game what the gameplay is really like. Okay. Number nine is to localize.
You know the App Store is a global business.
It's available in 155 countries in 40 languages, right. So this, this is an opportunity that is just phenomenal and you should think globally. You know, you need to think about the distribution of your game as a global opportunity.
Now, so the first thing that you should do, if you haven't already done this, is to localize your App Store presence, right.
Just so that when a player in some other region is coming in and looking at your game, it just stands to reason that they'll be more interested in it if they can read the description of these other things in their native language, right. So localize the name, the description, the keywords, the snapshots, and so on, right. And then the second piece of this, of course, is to localize the app content itself.
So by that I mean to really go back and structure your game for internationalization. You'll need to do what you can to separate text from artwork and texture. So you don't have to make copies of big images for every language that you support. And then go through your UI.
And, of course, right. And translate the text into all the different languages that you want to support. And then, finally, you know, also, consider things like whether your game is right to provide some culturalized content where it would be appropriate.
For example, if it was a driving game, maybe you would use local road signs for different locales and so on.
Local license plates from different locales.
So, now, here's a list of some of the languages that we've recommended before. It's certainly not exhaustive. It's a big list. And it's a good place to start though.
So first is EFIGS, right: English, French, Italian, German, Spanish.
Then many regions in Asia, so Japanese, Korean, Traditional and Simplified Chinese, and then branches out from there. So Brazilian, Portuguese, Russian, Turkish, and Arabic are what we would recommend that you really put some focus into.
And there's a great resource online: developer.apple.com/ internationalization.
So this will take you step by step through the process of internationalizing and localizing your app, your game.
And it gives you some links to third party localization vendors if you don't have that expertise in-house.
But, so that is number nine: to localize.
And so number 10: to target the state of the art.
So if you think about some of the best games that are on iOS, you know, a real common thread, as we've been saying, is how they consistently aim high and consistently target the latest and greatest to differentiate themselves on our devices.
So to be state-of-the-art means really taking advantage of the capabilities of the latest hardware like the A7, right. And target the feature set of those devices so that you stand out.
I mean, you guys, you saw those demos yesterday, right, during the "Keynote", the "State of the Union".
They were on this hardware. You know, you've seen what it can do.
So take advantage of that, that power, that capability that's there. Then hand in hand with that, is that state of the art apps support the latest versions of iOS.
And I think that this week should be that turning point for you where it's time now for you to realign your projects to aim for the release of iOS 8 and the APIs and the frameworks that you'll be learning about all this week.
And then bring your minimum OS up to iOS 7.
That is our recommendation. Support the latest N and N minus 1.
So when iOS 8 is released, you'll probably want to be looking at 7 and 8.
Okay. Now something, you know, something that we do hear from developers, actually more often than you might think, is that they're telling us that they'll, they're deciding to stick with an older version of Xcode or an older SDK because they think that if they move up to what's latest, they won't be able to still ship a game that supports anything older than that.
But obviously that's not the case.
So you can adopt the latest SDK version by setting your base SDK to what is current and then setting your deployment target down to the lowest OS version that you want to support and dropping support for the rest.
And then handle differences between 7 and 8 in your code. You know, check for the existence of hardware capabilities.
Or check whether classes are defined. Or check whether classes respond to a particular selector and so on.
Now for those of you who are coming over to iOS and are just not as familiar with that process, we actually went through it all in pretty good depth when we went out for our iOS 7 Tech Talks last November, December.
And so those videos are online on our developer website. So you should check them out.
Then also, state of the art games are the ones that integrate with our built in game technologies as Geoff talked about.
So we're providing just this incredible foundation for you.
It's built on a lot of different APIs, you know, like SpriteKit, Game Center, OpenGL, and Game Controllers and so on. And then the new APIs, like Metal and SceneKit on iOS.
Right. And these are just a few of the technologies. You know this.
But the point I want to make is about the other things. You know, the tools and the APIs that are available to you as game developers is comprehensive on iOS.
And you should learn the entire stack.
Oh, my god, that's a lot of learning to do. But really what I mean is to familiarize yourself with the technologies that are on iOS rather than just taking a project that you were working on, maybe on another platform or on an older OS version, and just shifting that over and fitting it into the equivalent.
Your target should be to go for the latest and greatest. Target the top, target the state of the art, target the A7, target iOS 8 and its capabilities, right, rather than just coming over and just fitting in with something that's older.
But, so that's number 10: target the state of the art.
But before I finish, I do have one more thing that I want to talk about.
So you know let's say that you've done all 10 of these. You've fixed your onboarding, you tuned up your Core Loop, you're optimized, you're localized, you're state-of-the-art, etc., all 10.
So where do you go from here? Yeah, well, go to 11.
Really, give it that extra push.
Go the extra mile.
Because here is my observation about this, you know: We keep innovating.
We keep enhancing our game technologies. And we have this thriving ecosystem, right, where we're investing. We're adding performance, and we're adding capability.
You guys, you can't stand still. Keep inventing.
Get started on that next update for iOS 8, and keep up with us because we love to shine the spotlight on developers who can go one louder.
So thank you, everyone. That is my list.
And just to wrap things up, I'd like to pass the stage back to Geoff for just a moment. So thank you.
Thank you, Allan.
So thank you very much, Allan.
And I think, when I step back and look at this, we see a tremendous amount of games. You look around the room; there's a lot of you who are interested in building games.
And there's a large number of games in the App Store. We're talking about how you can make your game stand out.
It isn't good enough to just go, "Oh, I'm going to. I have a great idea.
It's a cool game. I'm going to toss it up onto the App Store and see what happens." It is a very big pond, so use what Allan has told you. Use these 10 steps, and use the 11th step.
And really make your game shine.
These are the things which may not be apparent when you look at it, it may not be apparent when you look at the Design Awards Winners that they do these things. But they really do, they spend a lot of time.
"Cut the Rope" was a great example. Spent a lot of time on going through with people who haven't played the game before and say, "Hey, when you approach the game what do you need to know?" It's not just like that came to them in an hour.
So take the time with your game.
Take the time to go that extra mile.
Take the time to adopt these 10 items and the 11th and really bring your content up so it stands out. And we really hope to see someone in this room or many people in this room on stage next year at the Apple Design Awards. Thank you very much and enjoy the week.
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.