Game framework architecture - view components or MVC?

后端 未结 4 2164
粉色の甜心
粉色の甜心 2021-02-09 01:42

I\'m trying to build a very light re-usable framework for my games, rather than starting from scratch each time I start a game. I have a component driven architecture - e.g. Ent

4条回答
  •  长发绾君心
    2021-02-09 02:26

    I know this question might be outdated, but I need to reply on it. Actually, I started programming a game in Lua (with LÖVE) and I started programming a MVC - Framework for it. At first, to use MVC really depends on what you want. I know my problems with game programming, when the program becomes bigger, and mostly the structure becoms too complex to maintain. Next thing is, I know that I will change all the graphics when I find an artist who is willing to work for it. But until then, I'm gonna use my own dummy graphics. I want the artist to feel free to do what ever he wants, without beeing dependend on any resolution or color restriction. That means, I might have to change the whole (!) presentation code. Maybe even the way objects interact (collision detection, f.e.). The game logic is captured in the models, so I can concentrate on that. And I think game logic is the most important part of making a game. Isn't it? Hope you see my point.

    But, if you have everything together: all the graphics, sounds, the whole thing; then you can code straight forward.

    My MVC is a configuration-over-convention-ass, that slows down prototyping a bit. BUT(!) iterations of development can be made much more easily. Testing, especially Unit-Tests are done much more faster. I would say MVC turns you development-speed-curve (which is normally an anti-exponential curve) into an exponential curve. Slow at the beginning, but more and more fast at the end.

提交回复
热议问题