视频游戏中的对象关系映射
这很常见,甚至有用吗?例如,假设我使用 MVC 模式中的 ORM 架构构建了一个 2 维 RPG。有好处吗?
Is this common at all, or even useful? Let's say I build a 2-Dimensional RPG using ORM architecture in an MVC pattern, for example. Are there benefits?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ORM 是一种典型的商业软件模式,而不是游戏中使用的东西。我想你可以使用 ORM 从数据库加载关卡,并在游戏退出时用它来保存当前状态。但这不是应用程序的主要焦点。典型的业务应用程序的重点是管理数据,因此 ORM 发挥着核心作用。在游戏中,重点应该放在用户界面上。
使用 MVC 方法来构建用户界面几乎总是好的。它保持用户界面代码的结构化。
An ORM is a typical business software pattern, not something used in game. I guess you could use an ORM for loading the levels from a database and use it to save the current status when the game is quit. But that wouldn't be the main focus of the application. A typical business application's focus is to manage data, so the ORM takes a central role. In the game, the focus should be on the user interface.
Using an MVC approach to building user interfaces is almost always good. It keeps the user interface code structured.