A step-by-step program to develop Tetris with Swift: the first to build your Swift game project

Source: Internet
Author: User

Original address: https://www.bloc.io/tutorials/swiftris-build-your-first-ios-game-with-swift#!/chapters/677

Well, we are officially starting our Swift game development!

First, you need to create a new project, familiar with iOS development of children's shoes should not be unfamiliar with this step. Let's take one step at a pace:

Here are two ways to build a new project that you can:

    • If your Mac isn't running Xcode, open it and click Create a new Xcode project on the Welcome page

here I would like to re-emphasize again, please upgrade your Xcode version to 6.1.2(as of January 27, 2015, the latest version is 6.1.2). Although not upgraded in the previous chapters you will not encounter problems, but in the section of the array, you need to do additional work to adapt to the missing parts of the 6.0 properties. or
    • If you have already opened Xcode, you can click File---New->project in the menu

6.1. The 2 version of the menu should have a certain discrepancy with this interface, but it does not affect our new project.
Next, we select the game in the application below iOS and click Next
then we need to enter some related properties that can be entered in the format as in

Product name is the name of our project, we name it Swiftris, and of course you can give it a name as you please, it doesn't matter. Organization Name and Organization identifier are information about your developer account, which is still personal;It is important to: Language We choose Swift Game Technology we choose SpriteKit, this drop-down box we can see, is the SDK comes with the development framework Device Select IPhone
Next Click Next,xcode will ask the file storage path, then click Create, we have built an empty project.
Click on the project name in the left frame to open the properties interface and make the following settings in General

Remember the device orientation only select Protrait, the default should be landscape left and right are selected, because the whole program is not to do the horizontal screen, and Tetris seems to be horizontal screen is not too easy to play, So we only keep a vertical screen in a normal state. OK, here, an empty game project is built, is not very simple. we can run our project on the simulator or the real machine by clicking the Run button in the top left corner, or by clicking the + R. Congratulations, you ' re infinitely closer-a completed Swiftris game than you were minutes ago. That ' s a big deal .

A step-by-step program to develop Tetris with Swift: the first to build your Swift game project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.