SpriteBuilder v1.4 & amp; cocos2d-iphone v3.3 & amp; Xcode6 get started, spritebuilderv1.4

Source: Internet
Author: User

SpriteBuilder v1.4 & cocos2d-iphone v3.3 & Xcode6 beginner, spritebuilderv1.4

There are five types available for creating ccb files: Scene, Node, Layer, Spriter, and Paricles.

The differences between the five types are as follows:

Scene: it is an alternative scenario (Scene). Unlike what you may expect, its root node is CCNode rather than CCScene. The main difference between it and the Node type is that it displays a good device framework by default in SpriteBuilder --- (poor translation, the original article is as follows: it defaults to display a nice device frame around it in SpriteBuilder), (it should be said that it shows the entire mobile phone device frame)

Node: essentially, it is the same as Scene, but there is no device framework. It has a CCNode root Node.

Layer: The only CCB file type whose content size can be set. This makes it a good layer (This makes it ideal for any fixed-size layer) for any size ). The root node is of the CCNode type.

Sprite: Because sprite is too common in games, this CCB type has its own CCSprite as its root Node. Besides this, it is the same as the Node type.

Particle: Same as the Sprite type, except here, the root node uses the CCParticleSystem class.

 

 

Note: Technically, all CCB file types can be converted internally. The main difference between Scene, Node, and Layer is the difference in terms and how they are displayed in SpriteBuild. The Layer type is unique and allows users to define the content size. (For the next section, go directly to the original article)

"Layer need only be used over Node or Scene whenever the contents need a fixed, custom size-for instance, for game levels or fixed-size overlay menus. "---- the Layer must be used only when the content needs a fixed size. (Excerpt from: Steffen Itterheim. "Learn SpriteBuilder for iOS Game Development ". IBooks .)

 

 

 

 

Node Library

 

 

The left part is the Node Library, where most of them are nodes, inherited from CCNode. The only other type is joints, which is constructed using a physical engine.

Node: a visible node used for grouping or layer other nodes. Imagine that they are folders containing the corresponding content. This affects the order of painting and makes it easier to access the relevant content in the Code, or sort, move, or destroy (collapse) other nodes in the timeline of SpriteBuilder. (Original:

"This affects draw order, and it can be useful to access related items easier in code, or just to sort, move, or collapse nodes in the SpriteBuilder timeline. "Excerpt from: Steffen Itterheim. "Learn SpriteBuilder for iOS Game Development ". IBooks .)

 

Sub File: A placeholder used to embed another CCB File. This is a very powerful node, because it allows you to use other CCB files, like templates, and can create and edit a single CCB that can be used several times (instantiated. Drag a CCB File to the stage to automatically create a Sub File Node.

 

Physical Node: this represents the Physical world. Any physical enabled node must be the child or grandchild of the Physical Node ). Generally, only one Physical Node is required for each scene. Multiple worlds are acceptable, but their children cannot interact with each other ("Multiple worlds are possible, but their children will not be able to interact with each other. "Excerpt from: Steffen Itterheim. "Learn SpriteBuilder for iOS Game Development ". IBooks .)

 

Color and Gradient Node: (Color and Gradient nodes) Essentially, these are just sprites without images ). Quick-and-dirty backgrounds (quick-and-dirty backgrounds) or placeholder (no image resources at the moment) make them very effective.

 

Sprite: a major component of a 2D game. Use this tool to draw a separate sprite framework. Sprite 9 Slice can be used to create a variable-size background for the menu screen or Button, but this is rarely done because of the existence of the Button Node.

 

Particle System: used for explosion, smoke, and fire. Particle does not interact with physics. You cannot access a separate Particle in code. Compared with an equal number of Sprites, Particle animation is highly efficient.

 

Label TTF and BM-Font: used for text. TTF indicates Truetype Font. The advantage is that you can use any built-in ios or general TTF font. The disadvantage is that every change in the text creates a new textture internally.

 

Button: a Button is a combination of Sprite 9 Slice (background image) and Label TTF (text) (ultimate combination ). You can add processing in the code.

 

Text Field: An editable Label. You can click and enter the text, and the message is accepted in your code. When the editing ends or the text changes.

 

Slider (scroll bar): left and right. Technically, its operation value is always between 0.0 and 1.0.

 

Sroll View:

"Despite its name, this is not meant to create scrolling game worlds. it's intended to be dragged and moved by the user and to create a scrolling and snapping effect similar to the one used for browsing photos in the Photo library. you'll later use a Scroll View to create a level selection screen.
"

Excerpt from: Steffen Itterheim. "Learn SpriteBuilder for iOS Game Development ". IBooks.

Box Layout:

"Makes the tedious task of evenly spacing nodes a snap. you can align its child nodes horizontally or vertically, but alas, despite its name you cannot align them on a grid with multiple rows and columns by itself. however, you can use a horizontal Box Layout that contains multiple vertical Box Layout nodes as children, each of which contains the nodes in each column-or vice versa, with the horizontal and vertical alignment Box Layout nodes swapped."

Excerpt from: Steffen Itterheim. "Learn SpriteBuilder for iOS Game Development ". IBooks.

 

(To be continued)

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.