A lot of programmers that are entering the iOS application or Cocos2d game arena are somewhat confused about the overall scheme of things. They can’t see the forest for the trees. I’m a very visual learner myself, which actually makes me a rather bad programmer. Actually it makes me a bad programmer because I’m slow to pick stuff up. I need to see the big picture and then dive into the details, not the other way around.
So I put together a simple image, for visual learners like myself, to understand how things operate. At this moment its a very simple image. I intend to update it constantly in order to grow it into more detail.
1) iOS – Vanilla Application
- An empty Application contains an AppDelegate Class (Object)
- The AppDelegate has a Window property.
- That window property presents a view controller with all the bells & whistles you put into it.
2) Cocos2d – Simple Game
- AppDelegate loads a CCScene
- CCScene contains typically 1 layer
- CCLayer init method calls an update method which runs repeatedly
- In CCLayer creates a Box2d world with listeners
Hope this helps! If you want to visually understand something else, let me know!