视频游戏中的对象关系映射

发布于 2024-12-18 01:04:11 字数 61 浏览 1 评论 0原文

这很常见,甚至有用吗?例如,假设我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

献世佛 2024-12-25 01:04:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文