PS3 的 Cell 架构是否是学习游戏编程的错误平台?
我有机会参加索尼授权的培训课程,学习如何使用 PS3 的单元架构进行编程。
然而,我对 C++ 仅有基本的了解,并且想知道 PS3 对于像我这样有抱负的新手游戏开发者来说是否有点过分了。
还有什么最好的资源可以让我在大约 2 个月的时间内达到 C++ 图形编程的不错水平?
I have an opportunity to attend Sony licensed training classes to learn about programming with the PS3's cell architecture.
However I only have a rudimentary knowledge of C++ and was wondering if the PS3 is a bit of an overkill for a starter aspiring game dev like me.
And also what is the best resources to get me to a decent level in C++ graphics programming in about 2 months time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我敢打赌这会很有趣,并且您在课程中学到的任何内容都将帮助您成为一名更好的程序员。
I bet it will be fun and whatever you learn in the course will help you become a better programmer.
最后一个关于我日常工作的问题......:)
你学到的很多关于 PS3 的知识将适用于其他架构,因为并行编程开始看起来像未来。 PS3 上使用的许多并行技术都直接适用于 Xbox 360。我怀疑未来的许多游戏机都将朝着相同的方向发展,我们都需要开始更多地考虑并行化。现在。
也就是说,如果您只有 C++ 的基本知识,那么很多材料可能会超出您的理解范围。 我想这取决于你想从会议中得到什么。 您是否正在寻找 PS3 的介绍,或者您希望能够在会议结束后的第二天开始在 PS3 Linux 上制作游戏?
假设您负担得起,这些信息将会很有趣并且可能会有所帮助。 我不会放弃这样的机会,除非你觉得成本大于收益。 (我假设有成本,我真的不知道。)
游戏编程资源遍布网络。 如果您想参加 C++ 速成课程,我会选择 Lippman 等人编写的 C++ Primer。 如果您想要学习图形方面的速成课程,那么《实时渲染》是最好的起点,此外还有一本好书,例如 Eric Lengyel 的《3D 游戏编程数学》。 还深入研究一些 OpenGL 或 D3D 教程; 即使两者在 PS3 上都不常用,其原理与任何 API 都是相同的。
Finally a question about my day job.... :)
A lot of what you learn about PS3 will be applicable to other architectures, as parallel programming is starting to look like the future. A lot of the parallel techniques used on PS3 are directly applicable on Xbox 360. I suspect a lot of the future game consoles will be going in the same direction, and we'll all need to start thinking about parallelization a lot more than we may currently.
That said, if you have only a rudimentary knowledge of C++, a lot of the material may be over your head. It depends on what you want to get out of the session I suppose. Are you looking for an intro to PS3, or were you hoping to be able to start making games in PS3 Linux the day after the conference?
Assuming you can afford it, the info will be interesting and probably helpful. I wouldn't pass up an opportunity like this unless you feel the cost outweighs the benefits. (I'm assuming there's a cost, I don't really know.)
Game programming resources are all over the net. If you want to do a crash course in C++ I'd pick up C++ Primer by Lippman et al. If you want a crash course in graphics then Real Time Rendering is the best starting place, along with a good book on math like Eric Lengyel's Mathematics for 3D Game Programming. Dig through some OpenGL or D3D tutorials as well; even if neither is commonly used on PS3 the principles are the same as any API.
问题不在于 PS3 的杀伤力太大,而在于 Cell 处理器很难通过编程发挥其潜力。 高度并行化的架构可能非常强大,但要真正获得这种性能并不容易。
The problem isn't so much that a PS3 is overkill, it's that the Cell processor is notoriously difficult to program to it's potential. The highly parallelized architecture is potentially quite powerful, but it's not easy to actually get that performance.
我认为这是一个为未来(多核编程)做准备的伟大架构。 然而,对于大多数实际目的,您实际上最好学习基于 Windows 的游戏开发,因为控制台的启动成本要高得多。 例如,开始 DirectX 编码会容易得多。
所以,是的,在某些方面你是在自找麻烦。 如果您决定使用 PS3,请务必查看 MIT PS3 课程。
I think it's a great architecture to prepare for the future (multi-core programming). However, for most practical purposes you are actually better off learning windows-based game development since startup costs with consoles are much higher. For example, it would be much easier to start coding for DirectX.
So yes, in some ways you're seeking trouble. If you do decide to go with the PS3, make sure to check out the MIT PS3 course.
完全不,如果您使用 .NET 作为主要语言,事情只会变得更加困难。 如果您想使用 .NET,我建议 XBOX 360 使用 C#/XNA。
编辑:
这里有一个很好的链接可以帮助您入门:http://www.cag.csail.mit .edu/ps3/
No not at all, it's just going to be harder if your use .NET as your primary language. If you want to use .NET I would recommend C#/XNA for the XBOX 360.
Edit:
Here is a great link to get you started: http://www.cag.csail.mit.edu/ps3/
我认为如果你有机会参加而不是什么都不做,你绝对应该去参加。 从比你懂得更多的人那里学习一些东西的回报是很多人都没有的天赋。 事实上,它是由有执照的培训师提供的,这使得它更值得。
I think if you have the opportunity to attend vs doing nothing at all you should definitely go for it. The payoff from learning something from someone that knows more than you is a gift that a lot do not have. The fact that it's from a licensed trainer makes it all the more worthwhile.
他专门谈论了在学习 PS3 架构、库、特殊技巧等的同时学习 C++。我不建议这样做。 您需要具备很强的 C++ 功夫才能在 PS3 上编写出良好的代码,如果您出现时甚至不懂该语言,那么您将成为一个大傻瓜。
最糟糕的是,您将浪费专业开发人员的时间。 他们实际上可以使用这些信息,但你会因为你应该已经知道的新手问题而浪费时间。
我并不是故意表现得刻薄; 我也不会去,因为我不太了解 C++。 只是试着考虑一下其他付费去那里的人。
He's specifically talking about LEARNING C++ while learning the PS3 architecture, libraries, special tricks, etc. I would not suggest doing that. You need to be strong in your C++ kung fu to code well on the PS3 and you will make a huge fool of yourself if you show up and don't even know the language.
Worst off you will be wasting professional developer's time. They could actually use the info but you'll be eating up time with newbie questions you should already know.
I'm not trying to be mean; I wouldn't go either because I don't know C++ very well. Just try to be considerate of the other people that payed to go there.
在过去的几个月里,我一直在自学 Cell 处理器编程(用 C 语言)。 这绝对不是最好的起点,因为成功地对 Cell 进行编程需要掌握很多技能:C/C++、pthreads、libspe、cell 上的各种类型的通信(DMA、邮箱、信号、中断、原子 I/ O)。 让这件事变得更加困难的是,Cell 的文档可能很神秘、很难找到并且是错误的。 如果您使用更通用的平台(XNA、pyGame、SDL),将会有更大的用户社区。 这并不是说 Cell 没有任何用户社区,只是说它较小。 尽管在其他环境中可能会发现多处理器编程,但由于其独特的架构,将这些环境的技术转化为单元可能很困难。 此外,使用带有 Linux 的标准 PS3 将不允许您访问图形硬件。
但这也不全是坏事。 学习 PS3/Cell 将教会您很多有关机器附近编程的知识。 您确实没有任何选择,因为程序员可用的抽象并不多。 Cell 上的每个 SPU 都有 256KB 本地内存,如果您需要更多内存,那么您将需要找出某种方案来发出正确的 DMA 请求,以便在正确的时间将正确的值带入内存,并且(希望如此)当 DMA 请求正在进行时,让 SPU 忙于做某事。 学习 Cell
所以,也许不是最好的学习平台,但考虑到您有机会参加索尼的课程,这听起来是一个很好的机会。
无论如何,如果您有兴趣,Scarpino 的书是一本很棒的书参考,其中有几章是关于使用 OGRE 引擎在单元上进行游戏编程的,您可能也会感兴趣。
I've been teaching myself Cell processor programming (in C) for the last couple of months. It is definitely not the best place to start, since successfully programming the Cell requires mastering a lot of skills: C/C++, pthreads, libspe, the various types of communication on the cell (DMA, Mailboxes, Signals, Interrupts, Atomic I/O). To make this harder, the documentation for the Cell can be cryptic, hard to find, and wrong. If you use a more common platform (XNA, pyGame, SDL), there will be a much larger community of users. That is not to say that there isn't any community of users for the Cell, just that it is smaller. And even though there are other environments where one might find multi-processor programming, it can be difficult to translate techniques for these environments to the cell, due to its unique architecture. Also, using a standard PS3 with linux won't allow you to access the graphics hardware.
But it's not all bad. Learning the PS3/Cell will teach you a lot about programming close to the machine. You really don't have any choice, as there are not very many abstractions available to the programmer. Each SPU on the Cell has 256KB of local memory and if you need more than that, then you will need to figure out some sort of scheme to issue the correct DMA requests to bring the right values into memory at the right time and (hopefully) keep the SPU busy doing something while that DMA request is in flight. Learning the Cell
So, maybe not the best platform for learning, but given that you have the opportunity to take classes from Sony, this sounds like a good opportunity.
In any case, if you are interested, the book from Scarpino is a great reference, and has a couple of chapters about game programming on the cell with the OGRE engine, which might also be interesting to you.
虽然我没有在 360 或 PS3 上开发应用程序的经验,但我对这两个平台的各种优点做了很多研究。 我已经使用 C++ 很长时间了,尽管我用它构建了多个 MFC 和 BeOS 应用程序,也用它构建了许多 UNIX 服务器应用程序,但控制台游戏环境仍然有显着不同。
正如其他人在这里所说的那样,PS3 的 Cell 芯片确实是一头难以驯服的野兽,需要卡马克级别的才能才能正确利用。 话虽这么说,参加免费课程并没有什么问题,特别是如果您遇到以前开发过游戏并可以给您一些建议的人。
如果您想为游戏机开发游戏,对于只有 C++ 基本知识的人来说,最好的选择是使用适用于 Xbox 360 的基于 C# 的 XNA 套件。如果您熟悉 C++ 的工作方式,那么 C# 就不是“很难接起。 事实上,我认为这比跳转到多核、多线程基于单元的编程的学习曲线要小得多。 如果您以前从未开发过内核级应用程序,那么在准备好之前,您应该避开此类事情。 两个月时间不够。
有很多点使得 XNA 平台对于有抱负的游戏机开发人员非常有吸引力,其中最重要的是 C# 相对于 C++ 的相对安全性,以及 XNA 游戏可以通过 Microsoft 市场销售的事实。
我不知道有多少 PS3 游戏是单独开发的,但 360 上有一些例子,例如《时空幻境》,几乎是单独开发的。 XNA 示例也非常有趣且具有教育意义。
Although I have no experience developing applications on the 360 or the PS3, I have done a lot of research into the various merits of the two platforms. I have used C++ for a long time now, and even though I've built several MFC and BeOS applications with it, I've build a number of UNIX server applications with it, and still the console game environment is significantly different.
The PS3's Cell chip is really quite a beast to tame, as others have said here, and takes a Carmack-level of talent to properly utilize. That being said, there's nothing wrong with attending a course if it's free, especially if you get to meet people that have developed games before and could give you some advice.
If you want to develop games for a console, the best bet for someone with only a rudimentary knowledge of C++ is to use the C#-based XNA kit for the Xbox 360. If you're familiar with the way C++ works, C# isn't that hard to pick up. In fact, I'd argue it's a much smaller learning curve than to make the jump to multi-core, multi-thread Cell-based programming. If you've never developed kernel-level applications before, you should steer clear of that sort of thing until you're ready. Two months is not enough time.
There are a number of points that make the XNA platform very compelling for aspiring console developers, not the least of which is the relative safety of C# vs. C++, and the fact that XNA games can be sold through the Microsoft marketplace.
I don't know of many PS3 games that have been developed single-handedly, but there are a few examples on the 360 such as Braid that are pretty much solo efforts. The XNA examples are also quite interesting and educational.