Separation of concerns

19 views
Skip to first unread message

Thomas Winwood

unread,
Jul 25, 2011, 8:28:53 AM7/25/11
to cocos-...@googlegroups.com
I was attracted to cocos2d from pygame because I was interested in the hardware acceleration of OpenGL and pyglet, and cocos2d seems to be the only 2D game library for pyglet worth mentioning.

However, one of the things I very much liked when using pygame was the tutorial at http://ezide.com/games/writing-games.html which stresses the importance of separation of concerns via Model-View-Controller, and one thing which has left me somewhat uncertain is there doesn't seem to be a clear way to keep game logic away from presentation. I've tried to look for material on the subject, but aside from one rather inconsequential post in this newsgroup everything assumes the iPhone port of cocos2d rather than the Python version.

Maybe I'm missing something in the architecture, maybe I just need guidance. Either way, can anyone help me out?

Joseph Marlin

unread,
Jul 25, 2011, 9:29:51 AM7/25/11
to cocos-...@googlegroups.com
The Tetris clone (Tetrico I believe) that comes with cocos2D splits up the main game into a view, a model, and a control unit. That might prove useful as an example?
Reply all
Reply to author
Forward
0 new messages