Welcome to my Programming Blog...

I am currently working on a couple of projects: An original game called "Implosion" which I am porting from Flash to the iPad, and a remake of Q*bert in Python (pygame), as part of the class I am teaching. Please feel free to use the "Labels" (at right) to follow a specific project or theme. If you are one of my Python students, I recommend that you check out the Python thread.

Sunday, January 9, 2011

Vocab....

I don't know about any of y'all, but as I've been working through this material getting ready to teach it, I've been finding quite a bit of vocabulary that can be a bit confusing.... Here is my take on some of it:


  • Node - a generic name for anything that appears on the screen in cocos2d - that might include sprites, layers, scenes, spritebatchnodes or more.
  • Sprite - an individual graphic object, which can be moved, faded, stretched or rotated. Each sprite is based on a graphics file.
  • Layer - like a sheet of transparency, capable of holding Sprites or more Layers.
  • Scene - a collection of one or more Layers. Typically, scenes can be switched in and out, and are representative of a different behavior. For example, your game might have one scene for the game menu and another for the game itself.
  • SpriteBatchNode - similar to a layer, this can hold many different sprites, but the difference is that they all must use the same graphics file as each other. The advantage is that it can then draw them all extremely quickly.
  • SpriteSheet - a graphics file that holds many smaller pictures, in conjunction with a second (plist) file that describes how the smaller images can be extracted from the larger one. Often used in conjunction with a SpriteBatchNode to make many different-looking Sprites with the advantage of the SpriteBatchNode's speed.
  • Texture Atlas - the same thing as a SpriteSheet.
  • TileMap - associated with a TileSet, a tilemap is a description of a large grid, each square of which has a tile associated with it. It allows you to build worlds much larger than the screen.
  • TileSet - Similar to a SpriteSheet, this is also a graphic with many smaller graphics in it. However, this is used to make up the repeating tiles that appear in a TileMap.  Each of the smaller tile graphics is assigned a number (GID) so that it can be looked up easily.

  • CGPoint - a data structure that keeps track of a set of (x, y) coordinates - but might also represent a vector, such as the (x, y) components of a velocity.
  • CGSize - a data structure that keeps track of a set of (width, height) sizes.
  • CGRect - a data structure that keeps track of enough information to describe a rectangle - the location of the rectangle and how large it is.
  • Anchor Point - where on a sprite or layer is the "relevant" point that describes where it is. This is a CGPoint, one where both x and y are between 0 and 1. For x, 0 represents the left edge, and 1 represents the right edge. Similarly, for y, 0 is the bottom and 1 is the top. By default, objects start with an anchor point of (0.5, 0.5) - the object's center. 
  • int - a integer number
  • float - a "floating point number" - can have a fractional value and/or an exponent.
  • BOOL - short for "boolean" - a value that can only be "YES" or "NO."
  • NSString - a sequence of letters or other characters. In this programming language, strings must be surrounded by quotes and preceded by "at" signs.  (@"Hello, World!")
  • NSMutableArray - a list of objects, which can be modified.

  • .h files - header files. Describes what variables a class object will keep track of and what functions it will have. Basically a list of the nouns and verbs associated with this class, as well as any file that need to be included for it to work.
  • .m files - main files. Describes the details of how the functions listed in the .h file will work, rather than just listing them. May include some extra functions expected by the program, like dealloc and update.
Have I missed anything? Any followup questions?

No comments:

Post a Comment