将 Wii 和/或 PSOne 游戏移植到 OpenGL ES

发布于 2024-08-08 02:15:27 字数 271 浏览 6 评论 0原文

我被要求调查将 Wii 游戏和一些(索尼)PSOne 游戏移植到 OpenGL ES(你能猜出是什么平台吗?)。

我以前从未进行过这样的游戏移植(并将雇用某人来做这件事),但我想了解这个过程。

  1. Wii 使用 OpenGL 吗?如果不是,它有什么用途?移植到 OpenGL / OpenGL ES 有多容易?
  2. 是否有任何资源/书籍/博客可以帮助我理解该过程?
  3. 我的公司必须成为 Wii 官方开发商吗?如果是这样,我从哪里开始这个过程?

I have been asked to investigate porting Wii games and some (Sony) PSOne games to OpenGL ES (can you guess what platform?).

I have never undertaken a game port like this before (and will be hiring someone to do it) but I'd like to understand the process.

  1. Does the Wii use OpenGL? If not what does it use and how easy is it to port to OpenGL / OpenGL ES?
  2. Are there any resources/books/blogs that will help me in understanding the process?
  3. Will my company have to become an official Wii developer? If so where do I start that process?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(5

暖风昔人 2024-08-15 02:15:27

从 Wii 或 PSOne 移植是一项复杂且复杂的任务,可以分解为多个独立的工程工作,并行工作以产生工作最终产品。在迁移到目标硬件之前,您可以做的最好的事情就是划分所有不可移植的代码,同时确保游戏继续按预期运行。当您承诺迁移到新平台时,您的工作将转向重新实现不可移植的划分部分。

因此,要回答您的问题,是的,您需要成为索尼和任天堂授权的开发人员或与他们合作才能采用这种方法。就索尼而言,我什至不知道他们是否再提供 PSOne 开发程序,这会带来问题。您的索尼客户代表可以帮助澄清。

可能成为移植工作重点的主要子系统有:

  1. 渲染 图形代码包含有关运行它的硬件的基本假设,以便获得最佳性能。 API 级别的兼容性是表面兼容性,并不会为您带来您希望的那么多。计划找到渲染器的入口点,确定渲染场景所需的数据,并从那里为目标硬件重写所有渲染代码。
  2. 游戏保存 游戏状态序列化和存档需要分开。较旧的游戏通常使用 #pragma 填充字段的 fwrite() 结构。这对你仍然有效吗?
  3. 网络 Wii 游戏会写入目标硬件上不可用的高级服务。在底层,套接字仍然是套接字。您的 Wii 游戏依赖哪些网络服务?
  4. 控制 从你的出发点到你要去的地方,任何缺乏全面重新设计或重新想象输入的行为都会导致对软件的差评。
  5. 内存管理 主机游戏通常会对系统软件从堆返回内存的速率、会导致多少碎片以及游戏在这些条件下运行所需的持续时间做出基本假设。这些内存管理假设在新平台上已过时。编写自己的内存管理器是明智的做法,它可以为操作系统提供缓冲。此外,为发布而编译的控制台游戏被剥夺了大部分错误处理功能,并且不能优雅地处理内存不足的情况——只是需要注意。
  6. 内容 您的瓶颈将是系统内存。您能将必要的资源放入内存中吗?通过纹理,您可以在必要时减少 mip,通过图形硬件计时,您可以拉入远裁剪平面。由于资产驻留在内存中,您可能需要技术美术师来检查并减少模型的面部密度,或者需要动画程序员来实现尺寸更友好的动画编解码器。这是非常特定于游戏的。

您还会遇到一系列标准问题,例如位兼容性(尽管 Wii 和 PSOne 都是 32 位)、编译器特性、构建脚本不兼容性和专有编译器扩展。

游戏的测试相对具有挑战性。一个好的经验法则是,您希望团队中有足够的测试人员,以便在最多两天内完成游戏,涵盖游戏的所有主要方面。在需要很长时间才能通关的游戏(游戏时间超过 30 小时的角色扮演游戏)中,您的测试团队需要相当大才能提供全面覆盖。因为您只是进行移植,所以您可以制定一个测试计划,最大限度地覆盖新代码,而无需测试团队在游戏中敲打每一面墙以确保它(仍然)有剪辑。游戏发货一次。

成为许可开发人员需要您进行申请。根据经验,周转时间并不好。一般来说,优先考虑拥有已发行游戏和有组织的办公室、具有相当好的安全性并且有能力购买(相对)昂贵的开发套件的工作室。如果您不符合这些标准,您最好与获得许可的开发商合作。

对于已经有相关经验的人来说,控制台和游戏开发具有挑战性。没有一本书可以涵盖所有内容。我的建议是尝试招募一位在系统或引擎程序员职位上拥有丰富经验的专家。不过,对于 Stack 来说,游戏中存在哪些类型的程序员和技能组合是一个完全不同的问题。

Porting from the Wii or the PSOne is a complex and involved task that can be broken down into multiple separate engineering efforts working in parallel to produce a working end product. The best possible thing you can do before moving to the target hardware is to compartmentalize all of the non-portable code while ensuring that the game continues to run as expected. When you commit to moving to the new platform, your effort switches to reimplementing the non-portable compartmentalized parts.

So, to answer your question, yes, you will need to become or work with a Sony and Nintendo licensed developer in order to take this approach. In the case of Sony, I don't even know if they offer a PSOne development program anymore which presents issues. Your Sony account rep can help clarify.

The major subsystems that are likely to be the focus of your porting effort are:

  1. Rendering Graphics code contains fundamental assumptions about the hardware it is being run on in order to perform optimally. API-level compatibility is superficial compatibility and does not get you as much as you may hope it does. Plan on finding the entry point to the renderer and determining what data you need to render a scene and rewriting all the render code from there for your target hardware.
  2. Game Saving Game state serialization and archival will need to be separated out. Older games often fwrite() structs with #pragma packed fields. Is that still going to work for you?
  3. Networking Wii games write to high level services that are unavailable on your target hardware. At the low level, sockets are still sockets. What network services do your Wii games rely on?
  4. Controls From where you are coming from to where you are going, anything short of a full redesign or reimagining of input will result in poor reviews of the software.
  5. Memory Management Console games often make fundamental assumptions about the rate the system software returns memory from the heap, how much fragmentation it will cause and the duration the game needs to operate under these conditions. These memory management assumptions are obsolete on the new platform. It is wise to write your own memory manager that provides a cushion from the operating system. Also, console games compiled for release are stripped of most error handling and don't gracefully handle running out of memory-- just a heads up.
  6. Content Your bottleneck will be system memory. Can you fit the necessary assets into memory? With textures, you can reduce mip where necessary and with graphics hardware timing, you can pull in the far clipping plane. With assets resident in memory, you may need a technical artist to go through and reduce the face density of your models or an animation programmer to implement a more size-friendly animation codec. This is very game specific.

You also run into the standard set of problems with things like bit compatibility (though the Wii and PSOne are both 32-bit), compiler idiosyncrasies, build script incompatibilities and proprietary compiler extensions.

Games are relatively challenging to test. A good rule of thumb is you want to have enough testers on your team to run through the game in a maximum of two days, covering all major aspects of play. In games that take a long time to beat (RPGs with 30+ hours of gameplay), your testing team needs to be quite large to offer full coverage. Because you are just doing a port, you can come up with a testing plan that maximizes coverage of your new code without having a testing team punch every wall in your game to make sure it (still) has clipping. The game shipped once.

Becoming a licensed developer requires you to apply. The turnaround time, from experience, is not good. Generally speaking, priority is given to studios with shipped titles and organized offices with reasonably good security and the ability to buy the (relatively) expensive development kits. You may be better off working with a licensed developer if you do not meet these criteria.

Console and game development is challenging for people already experienced in it. There is no book that covers it all. My recommendation is to attempt to recruit an expert who has experience shipping titles in a position of systems or engine programmer. What types of programmers and skillsets exist in games is a whole different question for Stack, though.

赢得她心 2024-08-15 02:15:27

游戏控制台不使用 OpenGL,而是使用它们自己的自定义库。主要原因是它们速度很慢并且内存很少。因此,您需要充分利用所能获得的每一点性能。这意味着:自定义代码。通常,您会获得一个带有开发人员工具包的框架,可以帮助您入门,然后您可以从中构建代码。最终,您将开始使用自己的特殊代码替换开发人员套件中的部件,以获得所需的所有速度和特效。

尽管开发者可以访问源代码,但 PSOne 游戏在 PS3 上却如此难看是有原因的:收入并没有理由触及代码。

这就是游戏开发如此昂贵的原因之一:每个游戏(或多或少)都是全新的产品。有时,游戏公司可以重用上一个版本中的一些代码,但更多时候,他们必须重新开发所有内容。他们彼此之间也不怎么说话。

近年来,套件变得更加复杂和强大,你可以获得完整的游戏引擎(具有各种效果和3D支持),但每个引擎都是完全不同的野兽,所以你甚至不能从引擎A复制代码如今

,媒体内容(视频、音频和渲染序列)非常昂贵,以至于实际的游戏引擎通常只是一个小细节,因此这种情况不会很快改变。

最终结果:如果您想移植游戏,请为硬件编写一个模拟器(通常非常简单并且允许您运行各种游戏)。

[编辑] 要为 Wii 开发软件,请参见此处:http://www.warioworld.com/

对于 Wii 模拟器,请参阅 http://wiiemulator.net/

Games consoles don't use OpenGL but their own, custom libraries. The main reason is that they are pretty slow and have little RAM. So you need to squeeze out every drop of performance you can get. And that means: Custom code. Usually, you get a framework with the developer kit which gets you started and then, you build your code from that. Eventually, you'll start replacing parts from the developer kit with your own special code to get all the speed and special effects you need.

There is a reason why PSOne games are so ugly on the PS3 despite the fact that the developers have access to the sources: Revenue just doesn't justify to touch the code.

Which is one reason why game development is so expensive: Every game is (more or less) a completely new product. Sometimes, game companies can reuse a bit of code from the last version but more often than not, they have to develop everything again. They also don't talk much with each other.

In recent years, kits have become more complex and powerful and you can get complete game engines (with all kinds of effects and 3D support) but each engine is a completely different kind of beast, so you can't even copy code from engine A to B.

Today, media content (video, audio and render sequences) are so expensive that the actual game engine is often a minor detail, so this isn't going to change any time soon.

Net result: If you want to port a game, write an emulator for the hardware (which is usually pretty simple and allows you to run all kinds of games).

[EDIT] To develop software for the Wii, see here: http://www.warioworld.com/

For a Wii emulator, see http://wiiemulator.net/

染火枫林 2024-08-15 02:15:27

当我还是一名新的游戏程序员时,我移植了一些游戏,从使用我们引擎的一个版本到更新的版本(其中既不忽略也不追求向后兼容性)。即使复制(并可能重命名)文件并将它们放置在新项目的目录中也需要一些工作。接下来的过程是:

  • 重新编译
  • 修复数百个错误中的许多错误[在许多地方,相同的错误一遍又一遍地发生]

并将

  • 新游戏引擎的调用“连接”到旧代码中的适当调用
  • “从旧代码到新游戏引擎的“连接”函数
  • 调用处理其他奇怪的问题(例如,在旧游戏引擎中,2d 游戏会“混合”纹理本身;在新版本中,引擎做到了这一点(在特定平台上) ))
  • ,虽然我不太记得这一点,但它可能与一堆 #ifdef 找出部分代码混合在一起,这样东西就会真正编译,并可能创建函数存根稍后填写。

我记得,我花了三四天的时间才完成了一些东西。 (但是,当我们将其他游戏从旧版本移植到新版本时,它确实有所帮助!)

任务的大小将取决于您获得的代码是什么样的。如果它具有您可以拦截的通用 3D 调用(添加一个 thunking 层),那么您就可以开始工作了。这取决于代码中的抽象级别。如果它表现良好并且具有“RenderModel”和“RenderWorld”等调用,您可以替换这些函数,甚至它们使用的结构。如果绘图发生在各处,并且调用更像是“绘制多边形”和“绘制线条”或“使用这种高度优化的数据结构进行绘制”,那么您可能会陷入很长的困境。

你不应该需要 Wii 开发工具包。有时,验证您提供的代码确实可以在原始环境中编译(并且与运输代码相匹配!)是很好的选择,但有时您可以相信它并使其在新环境中工作。

最后,我不认为 Wii 使用 OpenGL,而且我真的不知道在哪里可以向您提供进一步的帮助。

I ported a couple of games, when I was a new game programmer, from working with one version of our engine to a newer version (where backwards compatibility was neither ignored nor pursued). Even copying (and possibly renaming) the files and placing them in a home in the new project was a bit of work. Following that, the procedure was:

  • recompile
  • fix many of the hundreds of errors [in many places, with the same error occurring over and over again]

and

  • "wire up" calls from the new game engine to the appropriate calls in the old code
  • "wire up" function calls from the old code into the new game engine
  • deal with other oddities (ex. in the old game engine, the 2d game would "swizzle" textures itself; in the new version, the engine did it (on specific platforms))
  • and, while I don't recall this clearly, it was probably mixed in with a bunch of #ifdeffing out portions of code so the thing would actually compile, and possibly creating function stubs to be filled in later.

As I recall, it was three or four days until I had something that compiled. (But, it did help when we ported other games from the old version to the new one!)

The magnitude of the task will come down to what the code you are getting is like. If it has generic 3D calls that you can intercept -- add a thunking layer to -- then you are in business. It depends on the level of abstraction in the code. If it is well-behaved and has things like "RenderModel" and "RenderWorld" calls, you can replace those functions, and even the structures that they work with. If drawing is occurring all over the place, and calls are more like "Draw Polygon" and "Draw Line" or "Draw using this highly optimised data structure", then you are likely in for a long slog.

You shouldn't need a Wii dev kit. Sometimes it is nice to verify that the code you are given does indeed compile in the original environment (and matches the shipping code!), but sometimes you can just take it on faith and make it work in its new environment.

Lastly, I don't think the Wii uses OpenGL, and I really don't know where to point you for further help.

贪了杯 2024-08-15 02:15:27

您可能想要做的是从设计游戏的架构开始,为新游戏编写详细的规范。

一旦有了这个,由于您将重写代码,您可能会发现一些不涉及控制台的业务逻辑可以移植过来。但是,任何涉及 I/O、用户交互或图形/声音的内容都将被重写,因此您不妨从头开始。

规范非常重要,可以确保您了解当前游戏的运行方式,以便新端口能够提供相同的用户体验(如果这是所需的)。

你可能想保留同样的错误,如果这是体验的一部分,就像,如果我知道在 Wii 中我可以跳下来并从墙上弹起安全着陆,那么如果我在新版本中不能做到这一点那么版本可能会很麻烦。

What you may want to do is to start with designing the architecture of the game, write up a detailed specification for what the new game is like.

Once you have this, since you will be rewriting the code, you may find that some of the business logic that doesn't deal with the console can be ported over. But, anything dealing with I/O, user interaction or graphics/sounds will be rewritten, so you might as well do that from scratch.

A specification is very important, to make certain that you know how the current game is working so that the new port will give the same user experience, if that is what is desired.

You may want to keep the same bugs, if that is part of the experience, as, if I know that in the Wii I can jump down and bounce off the wall to safely land, then if I can't do that in the new version then that may be bothersome.

无言温柔 2024-08-15 02:15:27

将 PS1 游戏移植到 iPhone 上将是一项艰巨的任务,他们的工作方式截然不同。我确信它是可行的,但要替换所有定点数学和缺乏基于 Z 缓冲区的渲染到真正的图形芯片将需要大量工作。

Wii会容易得多。 Wii API 与OpenGL 非常相似。然而,Wii 有一些非常好的固定功能,这是任何其他基于 GL 的平台所不具备的。不过,应该是可行的……

我不确定我还能说些什么。多年来签署了太多的保密协议,无法百分百确定我能说什么和不能说什么;)

不过,如果您想雇人做一些移植工作并准备提供所需的硬件,那么我可能有空;)

Well porting a PS1 game to an iPhone would be quite a task they work in very different ways. I'm sure its doable but it will be a LOT of work to replace all the fixed point maths and lack of Z-Buffer based rendering to a real graphics chip.

Wii would be a lot easier. The Wii API is very similar to OpenGL. However the Wii has some very nice fixed function features that just are not available on any other GL based platform. Should be doable, though ...

I'm not really sure I can say anything more than that. Have signed far too many NDAs over the years to be 100% sure of what I can and cannot say ;)

Still if you want to hire someone to do some porting work and are prepared to supply the required hardware then I might be free ;)

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