I have been coding for 8 years now, mainly for applications… During this time I have learnt some code design patterns that allow me to maintain a separation of concerns, practice loose coupling of components etc etc… I do not know a wide range of patterns used for gaming although i’m sure a lot of them I use without knowing it.
My problem with breaking the ice on a new framework is to know how much I can push it to make myself feel comfortable in the code.
I have a few questions that may be very hard to understand and comprehend considering i’m trying to fit my application knowledge into a game (which may or may not work… so thanks for your hard work and time in trying to answer my questions):
- I love MVC and MVVM for building web applications and desktop applications. dividing the code up into these very different roles helps prevent code duplication and removes some of the complexities of large applications.
What would the model section of the unreal engine be called or what components can be identified as model parts, and do I have to write the models in such a way for the unreal engine ui to understand what’s going on. For example, in my applications I set up models called repositories, they deal with interacting with databases and retrieve strong typed objects… this allows me to re-use the code for database calls because I just have to create or inject a new instance of the repository and then make those calls from the controller…
What would the controller section of the unreal engine be called or what components can be identified as controller parts (things that take data from a model and pass them to the view or maybe in this case the DX surface…
What would the view part of the unreal engine be called. I guess this would be when I push states of models into the drawing components but typically, what do you call these methods used for this a certain class of things?
- I love dependency injection and (IoC) to help test code… Is there a dependency injection framework for unreal engine to help me set up game states for testing… what’s common practice for this loose coupling functionality? This question really fits into what the controller sections of the unreal engine are… I might want to have a scene be dependant on components that I can test by injecting mock components into the scene… How does this kind of thing work… any links for help?
- When do you say, okay this really should be put in the code, or this really should be up to the level designer (also going to be me)… Do you have any guidelines on when to put things inside code or in the unreal engine UI… All that node stuff is useful for someone but I don’t know who
- Final question for now is in terms of portability. Let’s say I make an Unreal engine game and then think, i’m going to port this over to OpenGL graphics library or put this all into a windows store application… Is there some built in interfaces for the graphics stuff… How do I take control over where the unreal engine instance is created so I can put this into a windows store app kind of thing… I don’t need to know all the details here, but more like, what can I expect when using the unreal engine, what control do I actually have…
Thanks for your time reading this, this will help me out loads!!!
Helpful information I have found so far for -
Seperation of concerns:**
- Application architecture overview: https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/index.html
- When to use blueprint nodes or code discussion: https://forums.unrealengine.com/showthread.php?24786-To-what-extent-can-I-avoid-blueprints