I’ve also had thoughts about the design of a 3D graph scene + game architecture in term of MVC paradigm.
First, MVC paradigms can show up here and there, mostly in GUI, but layered , mixed together, even unclear in one design, especially for games. Because not every game have clear separation of Presentation, Data and Logic parts! (keep that in mind or messed up quickly as you trying to separate the MVC problems as much as you can, cause at the end you can’t and don’t have to)
Talking about MVC in general is a big and over-complicated topic, let’s zoom in a little bit. I saw your another post about RPG.
Currently professional studios do games more or less data-driven, some of them (including me) do software modeling and then creating game like this?
- A lot of 3d assets: models, effects…
- A lot of configs : as scripts, text
- Description of entities
- Description of gameplay as States! More sophisticated actions descripted in code / scripts
- Controller / Script attach to specific Model’s instance (Spatial) in the scene graph will control its behavior: movement, AI, …etc
- … [more] but out of topic
This somehow a haft-ass solution toward an “famous” entity framework - composition over inheritance!
Now talking about MVC embed in this approach and the same thing in JME architecture
- Consider AppStates are global Control © for the scene graph as View (V) and Model (M)…
- Consider JME’s Controls are Control © for the Spatial (V) and Model (M)
Here M-V-C pattern nearly seen as C-V ( I say almost as Control View paradigm)… because common simple game just having Data as representation of Game objects and data stick directly to game object! Note: Spatial is a mixed term, you can see it as Entity, which is Data/ Model (M), also has embedded descriptions for Repesentation, then be updated, renderedl by the Renderer / AppStates as Control © …
So i’m telling you JME architecture are good as a base for various kind of game and also very trendy! (To find a Universal Game Architecture are clueless)
My personal advice: Now ask your self how Data-driven your game is? Then do you want to really have a full-blown clear software design or just want to make a game and save your efforts… I read your comments and see that you have quite knowledge about software designing to notice the confusion but you don’t have to, and dont let it slow you down… That said, even if you can pass through the design phase with bullet proof OOP solution, or washed out all with an Entity framework. You will facing confusion more or less eventually…!
However, @SirFizX did metioned some best practices that actually HELP in making a game. Let’s start with it at first and come through the process step by step!
P/s: All this stuff should be somewhere in the wiki, to reduce the repeated questions about how JME handle Logic… I’ve seen like 3-4 topic about it already !!