6. Corona
•
•
•
•
•
•
Saturday, August 24, 13
2d Game Framework
iOS, Android
Lua
Closed Source
Free to use Starter version
•
Does allow publishing
http://coronalabs.com
7. Unity 3d
• 3d Environment for creating games
• Desktop, iOS, Android Blackberry
• C#, Javascript or Boo Script
• Closed Source
• Free to develop and publish
• http://unity3d.com/
Saturday, August 24, 13
8. Cocos2d-x
• 2D Game Framework
• iOS, Android, Windows Phone, Desktop
• Open Sourced
• C++ 11 (3.0 alpha)
• www.cocos2d-x.org
Saturday, August 24, 13
11. Director
Class that creates and handle the main Window and manages how and
when to execute the Scenes.
The Director is also responsible for:
•
•
•
•
•
initializing the OpenGL context
setting the OpenGL pixel format (default on is RGB565)
setting the OpenGL buffer depth (default one is 0-bit)
setting the projection (default one is 3D)
setting the orientation (default one is Portrait)
Saturday, August 24, 13
12. Node
Anything that gets drawn or contains things that get
drawn is a Node.
The most popular Nodes are: Scene, Layer, Sprite,
Menu.
The main features of a Node are:
• They can contain other Node nodes (addChild,
getChildByTag, removeChild, etc)
• They can schedule periodic callback (schedule,
unschedule, etc)
• They can execute actions (runAction, stopAction,
etc)
Saturday, August 24, 13
13. Scene
• Scene an Node are
almost identical
with the difference
that Scene has it's
anchor point (by
default) at the
center of the
screen.
Saturday, August 24, 13
14. Layers
Layer is a subclass of Node that implements
the TouchEventsDelegate protocol.
All features from Node are valid,
plus the following new features:
• It can receive iPhone Touches
• It can receive Accelerometer input
Saturday, August 24, 13
16. Sprite
Sprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) )
Sprite can be created with an image, or with a sub-rectangle of an image.
If the parent or any of its ancestors is a SpriteBatchNode then the following features/
limitations are valid
• Features when the parent is a BatchNode:
◦ MUCH faster rendering, specially if the SpriteBatchNode has many children.
All the children will be drawn in a single batch.
• Limitations
◦ Camera is not supported yet (eg: OrbitCamera action doesn't work)
◦ GridBase actions are not supported (eg: Lens, Ripple, Twirl)
◦ The Alias/Antialias property belongs to SpriteBatchNode, so you can't
individually set the aliased property.
◦ The Blending function property belongs to SpriteBatchNode, so you can't
individually set the blending function property.
◦ Parallax scroller is not supported, but can be simulated with a "proxy" sprite.
Saturday, August 24, 13
17. Sprite Batch Node
SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single
OpenGL call (often known as "batch draw").
A SpriteBatchNode can reference one and only one texture (one image file, one texture atlas).
Only the Sprites that are contained in that texture can be added to the SpriteBatchNode. All
Sprites added to a SpriteBatchNode are drawn in one OpenGL ES draw call. If the Sprites are
not added to a SpriteBatchNode then an OpenGL ES draw call will be needed for each one,
which is less efficient.
Limitations:
• The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is Sprite or
any subclass of Sprite. eg: particles, labels and layer can't be added to a SpriteBatchNode.
• Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a
property of the texture, and all the sprites share the same texture.
Saturday, August 24, 13