In this tutorial we will build Make2048 -- a clone of the popular mobile game 2048. The gameplay itself is simple but coding the game comes with some puzzles and challenges. You will learn a lot in the next couple of hours! We will use Apple's new Swift programming language together with SpriteBuilder and Cocos2D.
Step 1. Getting Started with 2048!
Step 2. Set up in SpriteBuilder
Step 3. Setting up classes in Xcode
Step 4. Adding user interaction
Step 5. Starting the game logic
Step 6. Finishing the core gameplay
Step 7. Adding some polish!
Have you ever encountered a problem with your codes where you have a variable inside a function and can’t update a value of the variable inside a asynchronous code block? Well, I have, and the answer to it is a function with completion.
In iOS 9 Apple introduces Apple Transport Security(ATS). This requires that
network requests need to be sent over a secure connection. Apple Transport
Security is enabled by default, so when it is still needed to make HTTP
request to an external source out of your control, ATS needs to be
disabled. In this tutorial a request to a local server is made and ATS will
be disabled to make the connection. This tutorial is made with Xcode 7 and
built for iOS 9.