Timeline for Applying MVC in Game Development
Current License: CC BY-SA 3.0
25 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 11, 2017 at 7:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Oct 9, 2017 at 22:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Sep 8, 2017 at 0:15 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Aug 7, 2017 at 7:54 | answer | added | MrCranky | timeline score: 1 | |
| Aug 7, 2017 at 6:21 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jul 7, 2017 at 20:06 | answer | added | jzx | timeline score: 1 | |
| Jul 7, 2017 at 11:14 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jun 4, 2017 at 18:44 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| May 4, 2017 at 11:23 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Mar 30, 2017 at 4:29 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Feb 14, 2017 at 17:08 | comment | added | jhocking | Instead of focusing on narrowly on MVC itself, focus instead on the overall separation of presentation and domains martinfowler.com/bliki/PresentationDomainSeparation.html MVC is really just one example of the overall idea of decoupling domain logic from its presentation. | |
| Feb 14, 2017 at 16:56 | comment | added | jhocking | This kind of discussion is why I tend to avoid buzzwordy terms like MVC, since they fool you into wasting time on faux-problems like "are you using the terms correctly?" instead of actual problems in the application. For example, sure you could store the color of the menu in a separate place from menu "view" but how does that help you? Instead, focus on decoupling things that multiple parts of your game care about, like say what key mappings the player has chosen: the menu needs to know that information to display it, and the game needs that in order to respond to the right buttons. | |
| Feb 13, 2017 at 21:40 | comment | added | Joshua Light | @AlexW you can be sure, that a common way to implement this is something like that: create class SavesModel to store saves with methods like GetSavesFor( accountID ), on ui create a graphical menu with states support (actually this is not a model from from MVC), and add click handler on button "Saves" that will go to the controller and call GetSaves(). Controller itself will check current user id, call Model.GetSavesFor ( currentUserID ) and return it to the view. This is one way to do that. Another called Stupid View but I think for example one explained way is enough. | |
| Feb 13, 2017 at 21:10 | comment | added | Alex W | @AshkarielEter If I understand your question correctly, MenuModel would contain simple things such as which option is currently selected, is the game has saves it'd contain basic information from those saves to display, it would contain options that the view may use to display things (such as colour of the menu or other graphical settings), etc. | |
| Feb 13, 2017 at 20:35 | comment | added | Joshua Light | @AlexW so what a MenuModel you will implement for chess example? | |
| Feb 13, 2017 at 20:30 | comment | added | Alex W | It's entirely for a local game, so I'm unsure on how servers come into it. Even something as simple as a chess application has a menu and a game - it is as if we wanted to write this in MVC, in my mind. | |
| Feb 13, 2017 at 20:22 | comment | added | Joshua Light | @AlexW well, the really common practice is to store your model on server and view on client. So right now I don't really understand what MenuModel could be? Can you please explain so that I can help you with some advice. Or you can just look at the common MVC-framework - ASP.NET MVC and see what I did exactly mean. Let's look at simple example: you have a model, that handles all the business-logic of your game: stats, creatures, game states and so on. Main menu then is just a set of words, that can send commands to model e.g. "Hey, Start a game, please" (via controller). | |
| Feb 13, 2017 at 19:34 | comment | added | Alex W | @wondra I am not sure I understand, could you expand on this? If it is relevant, I have been using a Java binding of OpenGL (called Slick2D, based upon the LWJGL). | |
| Feb 13, 2017 at 19:33 | comment | added | Alex W | @AshkarielEter I have commented on jhocking's answer with a picture of the second point, however here the concept of the "whole model" doesn't make sense, and I, in fact, have a model specifically for the menu. I therefore am not sure what you mean by your last point. | |
| Feb 13, 2017 at 19:15 | comment | added | Joshua Light | @wondra well, you're actually right, but I've talked about the whole conception of MVC, and the author of a question maybe misunderstood some aspects of the pattern. | |
| Feb 13, 2017 at 18:58 | comment | added | wondra | @AshkarielEter isnt it the functionality mvc/DI frameworks usually handle for you? Resolution and instantiation of dependencies to be injected. Since game engines arent usually build around mvc I can imagine there might need to build similar framework functionality for your(or existing) game engine. | |
| Feb 13, 2017 at 18:25 | answer | added | jhocking | timeline score: 1 | |
| Feb 13, 2017 at 18:24 | comment | added | Joshua Light | The main purpose of MVC is to decrease the complexity of the program by splitting logic onto layers with easily managed dependencies. There are a few implementations, each can be used aswell, but I've not heard about something like your first point. The second point seems better, but, as I've said before, you should program your layers independently, so that changes in the view will not affect the model. You can build model as you like and then connect it through controller (or observer) to the view. So the whole model should not know that there is a menu at all. | |
| Feb 13, 2017 at 16:29 | review | First posts | |||
| Feb 13, 2017 at 17:38 | |||||
| Feb 13, 2017 at 16:28 | history | asked | Alex W | CC BY-SA 3.0 |