Game Development Reference
In-Depth Information
Color and Gradient Node: Look at these colors, wow! Essentially, these
are just sprites without images. They're great for quick-and-dirty back-
grounds or for use as placeholders for as-of-yet missing graphics.
Sprite: The main constituent of any 2D game. Use this tool to draw a single
sprite frame, a texture in its entirety, or a part of a larger texture. The Sprite
9 Slice can be used to create a resizable background for a menu screen or
button, but it's rarely needed thanks to the Button node.
Particle System: For explosions, exhaust smoke, fire swords, and the like. It
animates a bunch of particles based on parameters that define how particles
are created, what they do over time, and how long they live. Particles don't
interact with physics, and you can't access individual particles in code.
Particles can be drawn and animated more efficiently than the equivalent
number of sprites.
Label TTF and BM-Font: For text and such. TTF stands for Truetype Font .
The advantage these offer is that you can use any built-in iOS or custom TTF
font. The disadvantage is that every change in text internally creates a new
texture, which is inefficient for score counters. TTF fonts are best used for
static text. For animated text, BM-Fonts are preferable, but they must be cre-
ated with an external tool like Glyph Designer.
Button: A button is the ultimate combination of a Sprite 9 Slice (back-
ground image) and a Label TTF (text) to create the most awesome thing in
the world. Almost. Well, you can tap or click it, and it can send a message in
code which, if you set it up properly, won't even crash but will actually run
some code!
Text Field: An editable label. A user can tap or click it and type some text,
and your code receives a message either when text editing ends or even
every time the text changes.
Slider: A user can move the slider handle left or right. Your code receives a
message while the slider is dragged. Technically, it always operates with val-
ues in the range 0.0 to 1.0.
Scroll 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.
Search WWH ::




Custom Search