简体   繁体   English

PS3的Cell架构是否是学习游戏编程的错误平台?

[英]Is the PS3's Cell architecture the wrong platform to be learning game programming?

I have an opportunity to attend Sony licensed training classes to learn about programming with the PS3's cell architecture. 我有机会参加索尼授权的培训课程,了解PS3的单元架构编程。

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. 但是我只对C ++有基本的了解,并且想知道PS3对于像我这样的初学者有抱负的游戏开发是否有点过分。

And also what is the best resources to get me to a decent level in C++ graphics programming in about 2 months time? 还有什么是在大约2个月的时间内让我达到C ++图形编程水平的最佳资源?

我打赌这会很有趣,无论你在课程中学到什么,都会帮助你成为一个更好的程序员。

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. 很多关于PS3的知识将适用于其他架构,因为并行编程开始看起来像未来。 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. PS3上使用的很多并行技术都可以直接应用在Xbox 360上。我怀疑未来很多游戏机都会朝着同一个方向发展,我们都需要开始考虑并行化的重要性。目前。

That said, if you have only a rudimentary knowledge of C++, a lot of the material may be over your head. 也就是说,如果你只有C ++的基本知识,很多材料可能就在你头上。 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? 您是在寻找PS3的介绍,还是希望能够在会议后的第二天开始在PS3 Linux上制作游戏?

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. 如果你想用C ++做一个速成课程,我会选择Lippman等人的C ++ Primer。 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. 如果你想要一个图形速成课程,那么Real Time Rendering就是最好的起点,还有一本关于数学的好书,比如Eric Lengyel的3D游戏编程数学。 Dig through some OpenGL or D3D tutorials as well; 深入学习一些OpenGL或D3D教程; even if neither is commonly used on PS3 the principles are the same as any API. 即使PS3上没有常用,原则也与任何API相同。

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. 问题不在于PS3是否过度杀伤,而是Cell处理器因其潜力而难以编程。 The highly parallelized architecture is potentially quite powerful, but it's not easy to actually get that performance. 高度并行化的体系结构可能非常强大,但实际获得该性能并不容易。

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. 然而,对于大多数实际目的而言,您实际上更好地学习基于Windows的游戏开发,因为使用控制台的启动成本要高得多。 For example, it would be much easier to start coding for DirectX. 例如,开始编写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. 如果您决定使用PS3,请务必查看MIT PS3课程。

No not at all, it's just going to be harder if your use .NET as your primary language. 总而言之,如果您使用.NET作为主要语言,那就更难了。 If you want to use .NET I would recommend C#/XNA for the XBOX 360. 如果你想使用.NET,我会为XBOX 360推荐C#/ XNA。

Edit: Here is a great link to get you started: http://www.cag.csail.mit.edu/ps3/ 编辑:这是一个很好的链接,可以帮助您入门: http//www.cag.cs​​ail.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. 事实上,它来自一个有执照的培训师,这使得它更有价值。

He's specifically talking about LEARNING C++ while learning the PS3 architecture, libraries, special tricks, etc. I would not suggest doing that. 他在学习PS3架构,库,特殊技巧等时特别谈论学习C ++。我不建议这样做。 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. 你需要在C ++功夫方面表现出色,才能在PS3上编写代码,如果你出现并且甚至不懂语言,你就会自欺欺人。

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. 我不会去,因为我不太了解C ++。 Just try to be considerate of the other people that payed to go there. 试着去考虑那些付钱去那里的人。

I've been teaching myself Cell processor programming (in C) for the last couple of months. 在过去的几个月里,我一直在教自己Cell处理器编程(C语言)。 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). 它绝对不是最好的开始,因为成功编程Cell需要掌握很多技能:C / C ++,pthreads,libspe,单元上的各种类型的通信(DMA,邮箱,信号,中断,原子I / O)。 To make this harder, the documentation for the Cell can be cryptic, hard to find, and wrong. 为了使这更难,Cell的文档可能含糊不清,难以找到和错误。 If you use a more common platform (XNA, pyGame, SDL), there will be a much larger community of users. 如果您使用更常见的平台(XNA,pyGame,SDL),将会有更大的用户社区。 That is not to say that there isn't any community of users for the Cell, just that it is smaller. 这并不是说Cell没有任何用户社区,只是它更小。 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. 此外,使用带有Linux的标准PS3将不允许您访问图形硬件。

But it's not all bad. 但这并不全是坏事。 Learning the PS3/Cell will teach you a lot about programming close to the machine. 学习PS3 / Cell将教会你很多关于机器附近编程的知识。 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. Cell上的每个SPU都有256KB的本地内存,如果你需要更多,那么你需要找出某种方案来发出正确的DMA请求,以便在正确的时间将正确的值带入内存中(希望如此)在DMA请求正在进行中时,让SPU忙于做某事。 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. 无论如何,如果你感兴趣的话, Scarpino的本书是一个很好的参考书,并且有一些关于使用OGRE引擎的单元格游戏编程的章节,这对你来说也许很有意思。

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. 虽然我没有在360或PS3上开发应用程序的经验,但我已经对这两个平台的各种优点进行了大量研究。 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. 我已经使用了很长时间的C ++,虽然我用它构建了几个MFC和BeOS应用程序,但我用它构建了许多UNIX服务器应用程序,而且控制台游戏环境仍然存在很大差异。

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. 正如其他人在这里所说的那样,PS3的Cell芯片确实是一个驯服的野兽,并且需要Carmack级别的才能才能正常使用。 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. 如果你想为控制台开发游戏,那么对于只有C ++基础知识的人来说,最好的选择就是使用基于C#的XNA 360的XNA套件。如果你熟悉C ++的工作方式,C#isn'很难接受。 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. 有许多观点使XNA平台对有抱负的控制台开发人员非常有吸引力,其中最重要的是C#与C ++的相对安全性,以及XNA游戏可以通过微软市场销售的事实。

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. 我不知道有很多PS3游戏是单手开发的,但是有一些关于360的例子,比如Braid,几乎是单独的努力。 The XNA examples are also quite interesting and educational. XNA示例也非常有趣且具有教育意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM