Games Pathway

Find out how Apple tools and technologies can help you create the next generation of games — whether you’re bringing your game to Apple platforms or starting from scratch.

Start your path

Pathways are simple and easy-to-navigate collections of the videos, documentation, and resources you'll need to start building great apps and games.

What you’ll learn
  • Key Apple technologies for building games
  • How to bring your existing game to Apple
  • How to optimize and debug your game
What you’ll need
  • A game idea or an existing game
  • Xcode to build, test, and distribute
  • Game porting toolkit, if you have a game on another platform

Bring your game to Apple platforms. Eliminate months of up-front work and evaluate how well your game could run on Mac before writing any code. Learn more

Design for Apple platforms

Great games incorporate the unique characteristics and capabilities of the devices that they run on. Consider that the player may be traveling, sitting at their desk, relaxing on the couch, or standing in their living room while playing your game. Take advantage of high-resolution displays, Apple silicon, external game controllers, headphones, and speakers. In visionOS, adapt audio to the player’s surroundings, handle touch events, and add custom gestures.

Related documentation

Create gorgeous graphics

Metal is a framework for drawing hardware-accelerated 2D and 3D graphics. Designed for the architecture of Apple’s powerful graphics processing units (GPUs), it helps you deliver stunning graphics while remaining power efficient for hours upon hours of gaming.

In addition to a friendly and tightly-integrated graphics and compute API, and a powerful shading language, Metal includes an unparalleled suite of GPU profiling and debugging tools suite that help you debug and improve your graphics quality and performance. Its low-overhead model gives you direct control over what tasks the GPU performs, allowing you to efficiently implement your vision for your game’s art style, animations, and visual feel.

With Metal, your games can take full advantage of the incredible performance and efficiency of Apple silicon across iPhone, iPad, Mac, Apple TV, and Apple Vision Pro.

Use the Metal game templates in Xcode to get started, or check out the Metal sample code gallery, which includes many useful examples under a permissive license to help you learn the ropes — and even use as a starting point for your game.

Provide intuitive experiences

Your game should support the default interaction method for devices it runs on. For example, since people generally use touch to play games on iPhone and iPad, great games for these devices are built around taps, swipes, gestures, panning, drawing paths, and more. On Mac, players expect keyboard and trackpad or mouse support. And on Apple Vision Pro, people expect to use their eyes and hands.

You can also convey physical feedback to match significant in-game events, and support game controllers.

Check out what you can take advantage of on each platform.

  • iPhone and iPad: Touch controls, virtual controllers, game controllers, and haptics. iPad also supports keyboard, mouse, and Apple Pencil.
  • Mac: Keyboards, mice, system and custom gestures, and game controllers with haptics,
  • Apple Vision Pro: Eyes, hands, system and custom gestures, and game controllers.

Create exceptional soundtracks and sound effects

Apple platforms provide a comprehensive set of audio technologies that enable you to create rich experiences for your game. Use them to immerse players in multichannel audio with spatial rendering and process sound in realtime.

Alternatively, you can choose to leverage third-party SDKs to play music and sound effects that integrate with your game’s logic. Examples include Audiokinetic Wwise and FMOD, both of which are readily available for iOS and macOS.

Help players find, connect, and share

Make your game social (and even a bit competitive) with Game Center, which also provides a gorgeous UI to display players’ progress.

Integrate accessibility

You can let everyone enjoy your game as they interact with their devices in different ways.

Explore spatial computing

Apple Vision Pro can bring your game to life in a whole new way with an infinite spatial canvas that lets you deliver 3D experiences. People can interact with your game while staying connected to their surroundings, or immerse themselves completely in a world of your creation.

If you’re making a game for iPad or iPhone, you can also take advantage of augmented reality with photo-realistic rendering, camera effects, animations, physics, and more.

And existing iPad and iPhone games (even those built without augmented reality) automatically run on Apple Vision Pro in a window using indirect and direct gestures. To add stereoscopic and take full advantage of the device features, such as gesture input and effects, design your game for spatial computing using RealityKit.

Use an existing engine

Some third-party SDKs wrap these Apple frameworks, exposing a more prepackaged experience. Depending on the particular game you’re making and your level of comfort, you may even decide to leverage these Apple technologies through a third-party game engine. You can choose from many existing engines available on Apple silicon to build your game and integrate with Apple technologies.

For example, Simple Directmedia Layer (libSDL) is a popular cross-platform open source framework that helps you easily create a window where you can draw 2D and 3D content, receive system events, and update your game loop. It's a great way to create or bring over simpler games that don't need deep platform integration.

If you’re using Unity, take advantage of Apple Unity Plug-ins to access the Game Controller, Core Haptics, GameKit, PHASE, and Accessibility frameworks. You can also use Unity to create new games or reimagine your existing Unity-created projects for Apple Vision Pro.

Already built a game for other platforms? Find out how to bring your game to Apple platforms.

Code your own engine

Choose one of the following languages to create your own custom game engine:

Swift. This powerful programming language uses concise-yet-expressive syntax, is safe by design, and has great compiler support for catching common mistakes.

C++. Use this popular programming language when you need fine-grained control in performance-critical code. Note that it works only with CoreFoundation and other C-based frameworks, and may result in some programming mistakes to become more common and harder to debug.

With Swift-C++ interoperability, you can start using Swift and accessing all Apple frameworks, then move to C++ performance-critical and cross-platform portions of your game. Or start with C++ and integrate Swift as you adopt platform frameworks. And Metal-cpp helps you add Metal functionality to graphics apps, games, and game engines written in C++.

Bring your existing game to Apple platforms

Find out how simple it can be to reach players on Apple platforms worldwide.

Downloads

Evaluate your Windows executable on Apple silicon. If you’re bringing a Windows™ game to Mac, test your game’s graphics and performance on Macs with Apple silicon without modifying your game.

Use C++ for Metal. If you have existing C++ code, you can continue using it with Metal. Metal-cpp allows you to access the Metal API from C++ without having to use separate Objective-C or Swift files.

Convert shader code to Metal. Save time by using the Metal shader converter to convert DirectX Intermediate Language (DXIL) into a Metal library that you add to your Xcode project.

Convert game assets. If you have Windows asset creation pipelines, use the Metal Developer Tools for Windows to move your assets to Apple platforms. Use the Metal compiler to compile graphics and compute shaders, and the texture converter to convert textures to formats that Metal supports.

Continue on to iPhone. Once you’ve brought your game to Mac, it’s even easier to let players enjoy your game on iPhone. Get best practices and technical resources, as well as ways to optimize game performance, input, and asset management.

Go further

Dive deeper into Metal

Once you start using Metal, check out these resources to learn how to get the most out of Apple GPUs.

Run computations on the GPU. Encode compute passes, which run in parallel with render passes on the multiple cores of the GPU, so that computations don’t impact graphics rendering.

Stream assets to the GPU. Load graphics resources faster by streaming asset data to textures and buffers asynchronously.

Debug and profile your game. Investigate visual artifacts and optimize GPU performance with the Metal debugger. Capture your Metal workload and use the Performance timeline to explore GPU execution performance. Use the shader debugger to investigate visual artifacts on a capture of your Metal workload.

Ray tracing. Trace rays into your scene to implement advanced lighting effects such as global illumination, reflections, ray-traced shadows and ray-traced ambient occlusion.

Analyze performance in real time. Overlay the Metal Performance HUD on your game to view CPU and GPU metrics.

Learn from code samples. The Metal sample code library includes many useful examples under a permissive license to help you learn the ropes, and even use as a starting point for your game.

Accelerate performance with MetalFX Upscaling. Improve the performance of your 3D scenes using high-performance temporal antialiasing or spatial upscaling. Use MetalFX to upscale low-resolution images to higher-resolution images in less time than directly rendering an image.

Optimize memory usage. Maintain a small memory footprint and improve your game’s frame rates with Instruments profiling tools.

Locate and fix issues. Run your game in Xcode to validate your Metal code and catch shader execution errors.

Fix graphics interruptions or stutters. Analyze slowness in your game’s frame rate with the Game Performance template in Instruments, which combines threading and system call information with the Metal System Trace instrument.

Tune graphics-intensive games for Apple silicon

Update your CPU thread priorities. In addition to using POSIX thread priorities and scheduling policies, use Grand Central Dispatch (GCD) to manage thread scheduling and keep the system responsive, and Quality of Service (QoS) to attach semantics to threads.

Build your code for Apple silicon. Use virtual memory-page sizes, cache line sizes, variadic functions, memory that’s simultaneously writable and executable, and more.

Optimize GPU performance and efficiency. Write Metal code that uses GPU features like imageblocks, tile shading, and raster order groups.

Accelerate performance with Neon. The Neon instruction set provides single instruction multiple data (SIMD) operations to accelerate performance on ARM processors. Use open source Neon libraries on Apple platforms, available on GitHub.

Launch your game worldwide

Find out how to distribute your game to players around the world and how the App Store can help you:

  • Offer premium content with In-App Purchases.
  • Promote your game in lots of different ways.
  • Test different versions of your product page.
  • Highlight specific content with additional product pages.
  • Measure your game’s performance with analytics only Apple provides.

Learn more