kribba
10-18-2007, 01:47 PM
A question about using the MVC pattern. As far as i understand it an application should have one view, one controller and one model. And different examples i have looked at have implemented this smoothly and easily.
But when creating games, it seems that the objects get more complex. Say for example that there are different bugs flying around on the screen and the user should try and click on some and avoid some. The view consists of the graphics of the bugs, animation, and user input listeners. How will the controller work?
Should every bug have it's own controller? Or should every click be funneled into one controller class that decides what should happen?
Hope somebody has an answer :)
But when creating games, it seems that the objects get more complex. Say for example that there are different bugs flying around on the screen and the user should try and click on some and avoid some. The view consists of the graphics of the bugs, animation, and user input listeners. How will the controller work?
Should every bug have it's own controller? Or should every click be funneled into one controller class that decides what should happen?
Hope somebody has an answer :)