0%

Book Description

Design, build, and publish an iOS game from scratch using the stunning features of iOS 9

About This Book

  • Create storyboards in Xcode from concept to code and design
  • Chalk out your game’s overall navigation and structure
  • Work with 2D and 3D game development tools

Who This Book Is For

This book is intended for game developers who wish to develop 2D and 3D games for iPhone and iPad. If you are a developer from another platform, or game engine such as Android or Unity, a current iOS developer wishing to learn more about Swift and the latest features of iOS 9, or even if you are new to game development, then this book is for you. Some prior programming knowledge is recommended, but not required.

What You Will Learn

  • Familiarise yourself with both basic and advanced Swift game development code
  • Understand the structure and flow of a typical iOS app
  • Work with the SpriteKit framework to make 2D games, sprites, and overlays
  • Discover 3D game development with SceneKit
  • Visually design levels and game assets with XCode 7’s latest features
  • Explore the concept of component-based structuring with iOS 9’s Gameplaykit
  • Beta test and publish your game with iTunes Connect

In Detail

Game development has always been a combination of programming and art, and mobile game development is no exception to this rule. The iOS platform has been both a staple in the ever-growing mobile game market, as well as a launching point for many game developers (hobby and career-wise). The features and frameworks available in iOS 9 continue to cater to the synergy of design and computer engineering, using tools that allow developers to take a game idea from concept to application in record time.

Whether you are new to iOS and game development as a whole, or are an experienced programmer wanting to learn the latest features of the platform, iOS 9 Game Development Essentials will provide you with crucial insight into this widely used platform.

Starting with the Swift programming language, this book gets the ball rolling with code concepts and game-centric code samples right from the get-go, giving you get a solid understanding of Apple’s cutting-edge programming language. The book takes you through iOS game development concepts and introduces the various frameworks that allow you to develop robust, reusable, and intelligent game components in both 2D and 3D game environments.

Style and approach

This book is a step-by-step guide into the code and concepts of iOS apps. Each chapter contains diagrams that showcase the features of the platform, along with code samples from Apple and code samples exclusive to this book.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. iOS 9 Game Development Essentials
    1. Table of Contents
    2. iOS 9 Game Development Essentials
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. The Swift Programming Language
      1. Hello World!
      2. No more semicolons
      3. Variables, constants, and primitive data types
        1. Variables
        2. Constants
        3. More about constants…
      4. Arrays, matrices, sets, and dictionaries
        1. Arrays
        2. 2D arrays / matrices
        3. Sets
        4. Dictionaries
      5. Mutable/immutable collections
        1. Editing/accessing collection data
          1. Iterating through collection types
      6. Objective-C and Swift comparison
        1. Objective-C
        2. Swift
      7. Characters and strings
        1. String Interpolation
          1. Mutating strings
          2. String indices
      8. Commenting in Swift
      9. Boolean
      10. Ints, UInts, floats, and doubles
        1. Integers and unsigned integers
        2. Floats and doubles
      11. Objects in Swift
        1. Type safety and type inference
      12. Optionals
        1. Unwrapping optionals
        2. Optional binding and chaining
        3. Control flow in Swift
          1. If statements
          2. For loops
          3. Do-while loops
          4. Switch statements
        4. Functions and classes
          1. Functions
      13. Tuples
        1. Classes
      14. Summary
    9. 2. Structuring and Planning a Game Using iOS 9 Storyboards and Segues
      1. Model-View-Controller
      2. An iOS app's lifecycle
        1. The main() function
        2. The UIApplication class/object
        3. The AppDelegate class
        4. View controllers
        5. View controller types
      3. Storyboards and segues
        1. Segues
      4. Storyboards versus coding
      5. Summary
    10. 3. SpriteKit and 2D Game Design
      1. A brief history of iOS game development engines
      2. The game loop
      3. Tile game – SwiftSweeper
        1. What is SwiftSweeper?
      4. Creating our SpriteKit game
        1. An overview of the SpriteKit structure and objects
        2. Scene transitions and the choice of code, storyboards, and/or SKS files
        3. An SKTransition example
        4. A SKScene/storyboard example
        5. SKScene transitions with SKS files
        6. Assets, sprites, and icons
          1. Sprite atlases and animating sprites
      5. Creating our game logic
        1. GameBoard
        2. Putting it all together in GameScene.swift
      6. DemoBots
        1. Summary
    11. 4. SceneKit and 3D Game Design
      1. SceneKit basics and working with nodes
      2. SpriteKit / SceneKit interactivity
        1. The issue with inheritance-based structuring and game design
      3. Our first SceneKit scene – the Xcode template
        1. SceneKit project flow and structure
        2. SceneKit Debugging Options
        3. Handling user input in SceneKit
      4. SceneKit features introduced in iOS 9 / Xcode 7
        1. Audio nodes and 3D sound
        2. Ambience and music
        3. SpriteKit scene transitions in SceneKit
      5. Fox demo
      6. Particle systems
        1. Placing particles into our pioscene
          1. SpriteKit
          2. SceneKit
      7. Introducing SceneKit and SpriteKit physics
        1. Visually composed game scenescgs
      8. Summary
    12. 5. GameplayKit
      1. Entities and components
        1. Using GKEntity and GKComponent objects in our games
      2. State machines
        1. Agents, goals, and behaviors
        2. Pathfinding
        3. MinMaxAI
        4. Random sources
        5. Rule systems
      3. Summary
    13. 6. Exhibit the Metal in Your Game
      1. The Apple Metal API and the graphics pipeline
        1. CPU/GPU framework levels
        2. Graphics pipeline overview
      2. What are shaders?
        1. Types of shaders
      3. Why is Metal faster than OpenGL ES?
      4. The basic Metal object/code structure
      5. Summary
    14. 7. Publishing Our iOS Game
      1. The ever changing process of app submission
        1. Before submitting your app
        2. Preparing our apps for iTunes Connect
        3. Submitting your app in the testing/beta phase
          1. Creating an iTunes Connect app record
          2. Updating the build string
          3. Archive and validate your app
          4. Upload your app to iTunes Connect
          5. Beta test your game with the TestFlight service
            1. External tester invites
          6. Analyzing crash reports and feedback from testers
      2. Submitting your game for review
      3. Updating your game
      4. Summary
    15. 8. The Future of iOS Game Development
      1. A greater focus on functional programming
      2. The Apple Watch
      3. Component-based structuring
      4. The rise of VR
      5. Summary
    16. Index
18.216.232.11