Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / MVC in games [from wiki]
- By jlnr (dev) Date 2008-11-09 19:27
(This thread of discussion originated on the wiki but has since been moved to the forums.)

Comment by alainbloch, Oct 30, 2008
Hi Julian!

Congrats on an awesome library. I come from a Rails background, and as such, I have fallen in love with MVC design pattern. In my opinion it makes apps more intuitive to develop, and easier to collaborate on.

What are you thoughts on MVC in game development? And what would a MVC patterned game look like written with Gosu?

Comment by julianraschke, Oct 30, 2008
alainbloch: Thanks! I've thought about this once and I think you can interpret the Window (with its callbacks) as the controller from a very high level perspective. One of my C++ games pretty much does that and has a Level instance as the model. I'm not sure how to separate the view and if it makes any sense at all though, since game objects are deeply tied to their appearance--unlike tuples of data in a web application database. I imagine that you could seperate them from their drawing code and that this could have advantages for networked games where some clients just need the appearance of objects on their screen, not their behavior. Anyway, I think the fun in 2D games is that they all work in very different ways, unlike web applications, which makes it harder to build a reusable structure. And if there is one, it should be extracted afterwards instead of being planned ahead. That's my conclusion ;)
Up Topic Gosu / Gosu Exchange / MVC in games [from wiki]

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill