问题
I have made two games for the iPhone already, the first one was a mess, and the second one is less messy but still, not perfect.
I would love to hear if someone had some links that pointed to good class organization advice when creating games using MVC ?
回答1:
You controller is the glue that holds everything together, it is the least reusable out of the MVC trio. Your views and models are what you should concentrate on making reusable. The controller handles all of the game-specific manipulation. The models are what the controller manipulates.
Don't design for the future either, just get a good basic design in place, and try to code while sticking to that design. Don't refrain from refactoring.
See my question on Implementing MVC the right way.
来源:https://stackoverflow.com/questions/1184928/best-practices-when-design-iphone-game-with-mvc