Here are my notes on the "Using Cocos2D for Game Development" presentation by Rod Stougo
He has a book coming out soon.
Cocs2dbook.com
Free!
OpenGL es rendering and performance without having to learn OpenGL es to get started.
(you get access to full source code)
Www.cocos2d-iPhone.org/download
Recommends the unstable version
Sudo ./install-templates
This puts templates into Xcode. Box2d is physics engine, so is chipmunk.
Comes with two sample programs, for Mac games and ios games.
Lots of samples. Make sure you select both active target and active executable.
Uses a movie metaphor - scenes, director, layers. (ok, the actors are called sprites.)
Z-layers are compositing order, and there are z-values for the objects within the layers.
Layers can subscribe to touch and accelerometer events
Actions are an easy way to apply transitions, effects and animations to the sprites
Moveto, move by,scale by, scale to, fadein, fadeout, rotate,....
Ccsequence combines actions sequentially, ccspawn combines actions simultaneously
Change gears: Optimization
Starting to get complicated sending info if you send images one at a time - make a sprite sheet. Aka a "texture atlas" zwoptex online sprite sheet creator.
Physics engines box2d and chipmunk(newer) pretty similar. Box is c++, chipmunk is c. Wrapped in objc. If you use c++ code, implementation files must have .mm suffix for complier.
Cocsdenshion sound engine- wrapper for Avaudiiplayer and openAL
Simple, synchronous and asynchronous, background and sound effects
Particle systems!
Cocos2dbook.com
Physics world with a graphics world on top. Calculates where the objects are and then moves the graphics on where they should go. The sprite doesn't have any physics logic.
Event handlers: cctouchesbegan
To make the snowballs, find where the touches start and end and find the delta. Create physics object, and create force or impulse. Add a small rotation
Collisions have masks to indicate which things have detectable collisions.
Can animate the appearance of sprites easily
- Posted using BlogPress from my iPad
Sunday, October 17, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment