Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift Game Development

You're reading from   Swift Game Development Learn iOS 12 game development using SpriteKit, SceneKit and ARKit 2.0

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788471152
Length 434 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Siddharth Shekar Siddharth Shekar
Author Profile Icon Siddharth Shekar
Siddharth Shekar
Stephen Haney Stephen Haney
Author Profile Icon Stephen Haney
Stephen Haney
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Designing Games with Swift FREE CHAPTER 2. Sprites, Camera, Action! 3. Mix in the Physics 4. Adding Controls 5. Spawning Enemies, Coins, and Power-Ups 6. Generating a Never-Ending World 7. Implementing Collision Events 8. Polishing to a Shine – HUD, Parallax Backgrounds, Particles, and More 9. Adding Menus and Sounds 10. Standing out in the Crowd with Advanced Features 11. Introduction to SceneKit 12. Choosing a Monetization Strategy 13. Integrating with Game Center 14. Introduction to Spritekit with ARKit 15. Introduction to Scenekit with ARKit 16. Publishing the Game on the App Store 17. Multipeer Augmented Reality Other Books You May Enjoy Index

New in Swift 4.2

This year, we have the release of Swift version 4.2 with Xcode 10. Unlike previous years where we saw a full release of a Swift version, like Swift 3.0 and Swift 4.0, this year, we see the release of Version 4.2. Swift 5.0 has been moved to the sometime early next year in 2019.

Xcode 10 will be the last version to support Swift 3.0 Compatibility Mode. So, if your app uses Xcode version 3, the code needs to be migrated to at least 4.0 by next year.

Further refinements have also been introduced by Apple in Swift 4.2:

  • Speedup Debug Builds: Code builds at least twice as fast compared to previous versions of Xcode. This will depend on the nature of the product and how much Swift code it uses. Compilation is optimized to reduce redundant work.
  • Runtime Optimization: Swift 4.2 introduces a couple of under the hood runtime optimizations. For example, in 4.2, all intermediate retains and releases of objects are removed and the object only gets released once at the end, improving the runtime of the code. This also enables automatic code size optimization.
  • Small String: String is now 16 bites as compared to 24 in the previous version. It also enables a small string memory optimization. If the string is within 15 bites, then the string is represented in the string type without requiring separate allocation to represent the string.
  • Reduction in Code Size: There is a new optimization level which reduces the machine level code size generated from the compilation of the swift code. This optimization enables 10% to 30% reduction in code size with a 5% hit in runtime performance.

Swift has already made tremendous steps forward as a powerful, young language. Now, Apple is working on polishing Swift into a mature, production-ready tool. The overall developer experience improves with Swift 4.2.

With Swift 4.2, we are moving toward binary compatibility and with Swift 5.0 releasing in early 2019, this transition will be complete. With this, Apple will be able to ship the Swift runtime along with the OS itself and doesn't need to be included in the App bundle as it is currently. This will improve startup time and memory usage of the application itself. More information about binary compatibility/ abi-stability is available at swift.org/abi-stability.

Note

For a detailed look at what's new in Swift, I highly recommend watching the WWDC 2018 video:

https://developer.apple.com/videos/play/wwdc2018/401/.

You have been reading a chapter from
Swift Game Development - Third Edition
Published in: Sep 2018
Publisher: Packt
ISBN-13: 9781788471152
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image