How would an N-Tier design work for game development?
-
I understand what N-Tier is and have made many systems at college using its layered architecture (normally 3 or 4) however I don't know how to apply it in a game! For example in XNA there is a LoadContent,Update,Draw methods for the game loop but I can only assume that the presentation tier apply s to the "draw" methods, business apply s to "update" and data layer apply s to anything such as loading maps or textures? Also N-Tier design seems to be slightly counter productive in that its known for reducing performance, which in any game is unacceptable , is N Tier even a good solution for this? Thanks ! :-D
-
I understand what N-Tier is and have made many systems at college using its layered architecture (normally 3 or 4) however I don't know how to apply it in a game! For example in XNA there is a LoadContent,Update,Draw methods for the game loop but I can only assume that the presentation tier apply s to the "draw" methods, business apply s to "update" and data layer apply s to anything such as loading maps or textures? Also N-Tier design seems to be slightly counter productive in that its known for reducing performance, which in any game is unacceptable , is N Tier even a good solution for this? Thanks ! :-D
A DAL could give you an abstraction on all IO, preventing references to the XML-libraries, the StreamWriters and, if applicable to a game, the database. For all other layers, I'd wonder what value they'd add. See, the presentation-tier will probably be optimized, and you're probably not going to add another UI in ASP.NET.
venomation wrote:
business apply s to "update"
That would be assuming that the entire state of the game is persisted (in a database) - I think you might want to optimize this, and only write what's required - and not the lot. A ComponentLayer might be usefull if you plan on updating the monsters after your first release :)
I are Troll :suss:
-
A DAL could give you an abstraction on all IO, preventing references to the XML-libraries, the StreamWriters and, if applicable to a game, the database. For all other layers, I'd wonder what value they'd add. See, the presentation-tier will probably be optimized, and you're probably not going to add another UI in ASP.NET.
venomation wrote:
business apply s to "update"
That would be assuming that the entire state of the game is persisted (in a database) - I think you might want to optimize this, and only write what's required - and not the lot. A ComponentLayer might be usefull if you plan on updating the monsters after your first release :)
I are Troll :suss:
Thanks for that, I done lots of research on N Tiered design but never really considered game development in any of its situations.
-
Thanks for that, I done lots of research on N Tiered design but never really considered game development in any of its situations.
Personally, depending upon the type of game, Multi-tier architecture may not always fit well just due to the potential performance issues, unless you are talking tiers that all reside on the same system, and then it could even induce issues. Remember, N-Tier is typically used to solve business level solutions where you can perhaps tolerate a bit of lag or delay between layers. In systems where people are going to expect near real-time performance N-Tier may NOT be the way to go. Now, using for parts of the game like authentication, score keeping, maybe chat areas within the game, sure, but as far as actual game play (again, depending on the actual requirements of the game) N-Tier may not be the best choice.