doug lea_PSP开发人员访谈-Doug Beck

doug lea

doug lea

I had a chance recently to chat with (Dr.) Douglas Beck, an old friend from my BBS days. Doug got his start in Mobile on early Windows CE systems as Digital Concepts and created some of the very best games ever seen on that platform and now develops for the Playstation Portable (PSP).

最近,我有机会与BBS时代的老朋友(道格拉斯·贝克博士)聊天。 道格(Doug)在早期的Windows CE系统上以“数字概念” ( Digital Concepts)的身份开始从事移动领域的工作,并创建了该平台上有史以来最好的游戏,现在为Playstation Portable(PSP)开发。

Since most readers of this blog are .NET folks, I thought it'd be interesting to talk to Doug and understand the differences between our two worlds. I used to develop on the Palm Pilot in C, so I have a tiny bit of experience on "Tiny Systems." However, the PSP isn't a tiny system at all, it's a freaking beast (in the best possible way.)  Let's see how different life is on a PSP.

由于此博客的大多数读者都是.NET人士,所以我认为与Doug交谈并了解我们两个世界之间的差异会很有趣。 我以前使用C语言在Palm Pilot上进行开发,所以我对“ Tiny Systems”有一点点经验。 但是,PSP根本不是一个很小的系统,它是一只令人毛骨悚然的野兽(以最好的方式。)让我们看看PSP的生活有何不同。

Scott: So, Doug, we've known each other for how long? 15 years? But lost touch for 10?

斯科特:道格,我们认识了多久了? 15年? 但是失去联系10?

Doug: Yeah, right around 15 years =)  It's was refreshing to see how much you'd built your resume since we'd last talked.  It's always good to see someone excel in their field.

道格:是的,大约15年=)令人高兴的是,自从我们上次谈话以来,您已经建立了多少简历。 总是很高兴看到有人在自己的领域表现出色。

Scott: Thanks, but seriously, you're a Doctor now?

斯科特:谢谢,但是说真的,你现在是医生吗?

Doug: I was definitely a career student until I ran out of degrees to get.  My Ph.D. is in Electrical Engineering, I suppose I could go back and work my way up the Computer Science degree ladder, but doing software dev in the real world is too fun to actually consider going back to school...

道格:在我没有学位要拿到之前,我绝对是一名职业学生。 我的博士学位我是电气工程专业的人,我想我可以回去继续努力,升读计算机科学学位阶梯,但是在现实世界中从事软件开发工作实在太有趣了,以至于实际上不考虑再上学...

Scott: You have a successful causal gaming company, specializing in games for Windows CE. Did you do this do put yourself through school?

斯科特:您有一家成功的因果游戏公司,专门从事Windows CE游戏。 您这样做是否使自己进入了学校?

Doug: Fortunately higher degrees in Electrical Engineering are typically paid for by research so I was in pretty good shape there.  Being a student I had lots of free time and when PocketPC devices first hit the market I was so enamored with the device (iPAQ 3600) and how easy it was to develop for it that I found myself spending lots of time coding.  I eventually started writing my first game for the platform with the intention of only spending a few weeks on it.  Three months later I found myself releasing my first game which included an ambitious feature list, including internet multiplayer.  After the game achieved almost immediate commercial success I lost interest in Electrical Engineering.Approximately 3 years later I had filled my offering out to around 25 products spanning 4 platforms..

道格:幸运的是,电气工程专业的较高学位通常是由研究支付的,所以我在那里的状况还不错。 作为一名学生,我有很多空闲时间,当PocketPC设备首次进入市场时,我对设备(iPAQ 3600)十分着迷,并且开发它是如此容易,以至于我发现自己花费了大量时间进行编码。 我最终开始为该平台编写我的第一款游戏,目的是只花几个星期的时间。 三个月后,我发现自己发布了自己的第一款游戏,其中包括雄心勃勃的功能列表,其中包括互联网多人游戏。 在游戏获得几乎立即的商业成功之后,我对电气工程失去了兴趣。大约3年后,我将自己的产品填充到涉及4个平台的大约25种产品中。

Scott: Windows CE machines weren't initially known for their graphics power. Did you find the Windows CE Graphics primitives lacking? How much did you have to layer on top before you found it usable?

斯科特: Windows CE计算机最初并不以其图形功能闻名。 您是否发现缺少Windows CE Graphics原语? 发现可用之前,您必须在顶层放置多少?

Doug: You'd be surprised how powerful the initial StrongARM 206MHz processor is when compared to today's 620+ MHz XScale. The StrongARM was more than twice as fast as it's successor, the first generation XScale (~420 Mhz) in my testing. Intel made some mistakes in their initial architecture of the XScale processor from what I understand that made the second generation PocketPC's performance underwhelming.

Doug:与今天的620+ MHz XScale相比,您会惊讶于最初的StrongARM 206MHz处理器多么强大。 在我的测试中,StrongARM的速度是其后继产品第一代XScale(约420 Mhz)的两倍以上。 据我了解,英特尔在XScale处理器的初始体系结构中犯了一些错误,这使第二代PocketPC的性能不佳。

Doug: In order to develop any graphically compelling application on PocketPC, at least in the past, you need to circumvent any graphics primitives included on the platform and just access the frame buffer directly.  More recently there are things like OpenGL ES, and the late to the scene DirectX mobile stuff. There are also several 3rd party libs that people have written that are very nice. One of the interesting things about the Pocket PC platform is that the display buffer in memory can have a completely arbitrary memory layout (and some did).  You'd think that on all PocketPCs the first byte of memory on the frame buffer with be in the upper left of the screen and then it would progress in the same fashion that you'd read a book until you hit the bottom right of the screen.  In practice this was not the case.  Some devices, like the iPAQ 3800, the first byte was in the lower right of the screen and then it would increment vertically from bottom to top, and then right to left....crazy.My trick back in the day was to orient all my surfaces and my backbuffers in the same memory orientation as the frame buffer itself so I could do very fast blits. My first title was easily above 100 frames/second on the old 206MHz StrongARM. (135 FPS with overclocking =)

Doug:至少在过去,为了在PocketPC上开发任何具有图形吸引力的应用程序,您需要规避平台中包含的所有图形基元,而直接访问帧缓冲区。 最近,出现了诸如OpenGL ES之类的东西,以及DirectX移动设备的最新出现。 人们编写的一些第三方库也很不错。 Pocket PC平台有趣的事情之一是内存中的显示缓冲区可以具有完全任意的内存布局(有些则可以)。 您可能会认为,在所有PocketPC上,帧缓冲区上的内存的第一个字节都位于屏幕的左上方,然后它将以与您阅读书籍相同的方式进行,直到您按一下该按钮的右下角。屏幕。 实际上,情况并非如此。 某些设备(例如iPAQ 3800)的第一个字节位于屏幕的右下角,然后它会从下到上垂直递增,然后从右到左递增....疯狂。我所有的曲面和后缓冲区都与帧缓冲区本身处于相同的内存方向,因此我可以非常快速地进行blit。 我的第一个冠军是在旧的206MHz StrongARM上轻松超过100帧/秒。 (135 FPS超频=)

Scott: No wonder your stuff stood out! In order to support your memory orientation trick, did you #define your way around?

斯科特:怪不得你的东西脱颖而出! 为了支持您的内存定向技巧,您是否#define自己的方式?

Doug: Since it was my first product, I never planned to see it running on anything but the original device so I had hard coded the memory orientation in the code (and the iPAQ 3600 had a funky memory orientation as well).  As new devices started to come out I used #defines to compensate but within only a few months I had to make a more general surface description (that removed all the #defines) and kept track of key metrics like size, x & y span directions, etc.  This allowed me to work around any frame buffer memory layout and I could still put all my surfaces in the matching memory orientation.My first title was written entirely in C, it was all contained in one massive file, and I didn't use a debugger at all during development. *gasp* As I progressed, I made my game engine support multiple platforms so I could develop on my desktop and test on the device only when needed. I started using a debugger (which is very handy I might add), split my game into multiple files, etc. My later titles were written in C++ and entirely object-oriented.I rev'd my engine several times and really had something that I could crank out software that supported virtually all windows mobile devices. If you're smart about it, you can have a Windows Mobile for Smartphone and a Windows Mobile for Pocket PC application in a single .EXE and share graphical assets between the two where possible, etc.It's really important to come up with a scheme to minimize the size of the assets, sounds, graphics, etc. because when it's time to distribute your application there are several distribution mechanisms out there, over-the-air, for example that carriers are really fixated about keeping the size of the installer 'under a megabyte' for example.I have several titles where I went through every asset and minimized it to the absolute minimum and then wrapped everything with zlib to make it even smaller.  Only to eventually go back and squeeze another 50% out of the size so I could get the application into a specific distribution channel

道格:因为这是我的第一款产品,所以我从未打算看到它只能在原始设备上运行,所以我已经在代码中硬编码了内存方向(而iPAQ 3600也具有时髦的内存方向)。 随着新设备的问世,我使用了#defines进行补偿,但是在短短的几个月内,我不得不做出更一般的表面描述(删除了所有#defines),并跟踪了关键指标,例如尺寸,x和y跨度方向等等。这使我可以处理任何帧缓冲区内存布局,并且仍然可以将所有表面放置在匹配的内存方向上。我的第一个标题完全用C编写,都包含在一个大文件中,而我没有在开发过程中完全不要使用调试器。 * gasp *随着我的进步,我使我的游戏引擎支持多个平台,因此我可以在桌面上进行开发并仅在需要时在设备上进行测试。 我开始使用调试器(可能会很方便地添加它),将游戏拆分为多个文件,等等。后来的标题是用C ++编写的,并且完全是面向对象的。我对引擎进行了多次修订,确实有一些东西我可以开发出几乎支持所有Windows移动设备的软件。 如果您对此有所了解,则可以在单个.EXE中拥有一个用于Smartphone的Windows Mobile和一个用于Pocket PC的Windows Mobile应用程序,并在可能的情况下在两者之间共享图形资产,等等。提出一个方案真的很重要以最大程度地减少资产,声音,图形等的大小,因为在分发应用程序时,有多种无线分发机制,例如,运营商对于固定安装程序的大小确实很固定。例如,``在一兆字节以下''。我有几个标题,我在其中浏览了每项资产并将其最小化到绝对最小值,然后使用zlib封装所有内容以使其更小。 最终最终又退缩了50%,所以我可以将应用程序放入特定的发行渠道

Scott: Did you use Microsoft tools? It seems like "Tiny Dev" *is* a hassle...so you used the emulator?

斯科特:您使用过Microsoft工具吗? 似乎“ Tiny Dev” *是麻烦的...所以您使用了模拟器?

My advice if you're doing game development is to stay away from the emulator.
如果您要进行游戏开发,我的建议是远离模拟器。
Doug: I used Embedded Visual Studio 3 for nearly everything which ensured backwards compatibility.  For some titles I compiled installers using the latest tools and let customers choose which to install so they could have either compatibility or the better performance if they had more recent devices. Although I did the majority of the development natively on windows using Visual C 6.0. Regarding the emulator, I had nothing but bad experiences with it.  It was always too slow to start up and a horrible drain on development.  I think that the emulator is generally unusable for game development.  The one thing where the emulator is nice is that there are lots of different form factors like QVGA, VGA, Square-Screen, etc.  So if you don't have a device with those dimensions, the emulator is nice that way to test once or twice. My advice if you're doing game development is to stay away from the emulator. 道格:我几乎将嵌入式Visual Studio 3用于确保向后兼容性的所有内容。 对于某些产品,我使用最新工具来编译安装程序,并让客户选择要安装的安装程序,因此,如果设备更新,则可以具有兼容性或更好的性能。 尽管我大部分使用Visual C 6.0在Windows上进行了本机开发。 关于仿真器,除了糟糕的体验之外,我没有其他任何东西。 启动总是太慢,并且开发工作非常耗费时间。 我认为模拟器通常无法用于游戏开发。 仿真器很好的一件事是,有许多不同的外形,例如QVGA,VGA,方屏等。因此,如果您没有具有这些尺寸的设备,那么仿真器可以很好地进行一次测试或两次。 如果您要进行游戏开发,我的建议是远离模拟器。

Scott: So your games ran on Windows, natively, and you developed them mostly on Windows while thinking about the device as the ultimate endpoint?

斯科特:因此,您的游戏本机可以在Windows上运行,而您主要是在Windows上开发游戏时却将设备视为最终目标?

Doug: I fortunately had the luxury of having many devices.  I've got a stack at home now of nearly 3 dozen of windows smartphones and pocket pcs...hehYes, for ease of development I highly suggest just developing and testing your applications right on your desktop. There is a fair amount of overhead depending on what libraries and features you have in your game engine to get it all running on windows natively--but it's worth it.

道格:幸运的是,我拥有许多设备。 我现在在家中有将近3打Windows智能手机和掌上电脑的堆栈...嘿,为了便于开发,我强烈建议您只在台式机上开发和测试您的应用程序。 要使游戏全部在Windows上本地运行,取决于您游戏引擎中具有哪些库和功能,会有相当多的开销,但这是值得的。

Scott: What's the breakdown of everything under the hood of your windows mobile game engine?

斯科特: Windows移动游戏引擎背后的一切崩溃了吗?

Doug: Initially it was just a graphics engine, a sound engine, and a game all munged into one.  Eventually it matured to a game sitting on an engine with the following features:  - A highly optimized 2D graphics engine with an integrated 3D software renderer. - A GUI system and plenty of GUI widgets. - A compressed file system that could mount files based on device, display resolution, etc. - A memory management system. - Sound and music using MikMod. - A user input system. - A font system with optional integration of Freetype for TTY support. - A network and multiplayer lobby system. - Zlib for real-time compression/decompression. At least, that's the feature set off the top of my head. For games, the real gotcha's seem to be getting overall device compatibility because of so many minor details between devices, getting a solid graphics lib, and the input system.  That's where I spent most of my time.

道格:最初只是一个图形引擎,一个声音引擎和一个游戏,都融入其中。 最终,它发展成为一款具有以下功能的游戏,它安装在具有以下功能的引擎上:-高度优化的2D图形引擎,带有集成的3D软件渲染器。 -一个GUI系统和大量的GUI小部件。 -可以根据设备,显示分辨率等装入文件的压缩文件系统。-内存管理系统。 -使用MikMod的声音和音乐。 -用户输入系统。 -字体系统,带有可选的Freetype集成以支持TTY。 -网络和多人游戏大厅系统。 -Zlib用于实时压缩/解压缩。 至少,这就是我脑中浮现的功能。 对于游戏而言,真正的陷阱似乎是获得设备的整体兼容性,这是因为设备之间有许多次要细节,获得了可靠的图形库和输入系统。 那是我大部分时间的地方。

Scott: What's the status of this engine, can it be licensed? How it work within the context of the new Windows Mobile stuff? What about Origami gaming - have you look at that as a potential market for your engine? There's potential for kick ass gaming on Origami...

斯科特:这个引擎的状态如何,它可以被许可吗? 在新的Windows Mobile内容中它如何工作? 折纸游戏怎么样-您是否将其视为引擎的潜在市场? 在折纸上有踢屁股游戏的潜力...

Doug: The engine is something used internally, never made available for licensing.  I never made a push to make it available because of the availability of other solid engines and the general weakness of the Windows Mobile games market as of late. It's works great with the latest Windows Mobile versions, including square-screen and VGA support. All of my software at dig-concepts.com has been updated to support Windows Mobile 2005 of course =) I've talked with MS about Origami and it was pretty obvious that that's not where they see Origami heading. MS does have a number of other things in the hopper for the future though.The funny thing about kick ass gaming, is that you need more than a platform that is capable of it.  You need someone like Sony, Microsoft, or Nintendo to get behind that platform, make a huge marketing push to get the sell-out numbers to the point where developing a 5mil dollar title is possible...For the Playstation Portable (PSP) the average budget for a title is between 4mil and 6mil with some titles going over the 10mil mark. So yes, now I've moved over to the PSP platform.

道格:引擎是内部使用的东西,从来没有提供许可。 由于其他可靠引擎的可用性以及Windows Mobile游戏市场近来的普遍疲软,我从未竭力使其可用。 它与最新的Windows Mobile版本(包括方屏和VGA支持)配合使用时效果很好。 当然,在dig-concepts.com上我所有的软件都已更新为支持Windows Mobile 2005 =)我已经与MS谈论了折纸,很明显,这不是他们看到的折纸标题。 微软在未来的跳跃者中确实还有很多其他事情。关于踢屁股游戏的有趣之处在于,您需要的不仅仅是一个能够胜任这一工作的平台。 您需要像Sony,Microsoft或Nintendo之类的人来支持该平台,进行巨大的市场推广以使售罄的数字达到可能开发500万美元标题的地步...对于Playstation Portable(PSP)标题的平均预算在400万到600万之间,有些标题超过1000万。 是的,现在我已移至PSP平台。

Scott: What's the OS for the PSP?

斯科特: PSP的操作系统是什么?

Doug: It's running Sony's ever-updating OS.  In just over a year Sony has updated the OS via firmware updates (required to play the latest games) approximately 5 times.

道格:它正在运行索尼不断更新的操作系统。 在短短一年多的时间里,索尼通过固件更新(需要播放最新游戏)对操作系统进行了大约5次更新。

Scott: What kind of stuff are they changing? The public thinks they are chasing security stuff, but what's it mean for the dev? Do functions change?

斯科特:他们在改变什么样的东西? 公众认为他们在追逐安全性,但是对开发人员意味着什么呢? 功能会改变吗?

Doug: The PSP itself is a remarkable piece of equipment.  Not only does it have an amazing screen, and optical DVD drive, Playstation 2-like graphics hardware, and 802.11 wireless networking, it's sexy to boot! They are addressing security issues and updating the main component apps (photo, video, music, games) of the device in the patches, but they are also making major additions to the platform.  They've added a web browser, RSS feeds, a 'sling-box' like client that allows you to stream live or recorded TV from home.  They've also added support for more video formats and general user interface improvements.  But the unannounced improvements that are coming to the PSP platform are the most impressive.  By next year at this time, everyone's PSPs will be transforming to much more than they are now through firmware updates.As the firmware updates there are a few growing pains for developers but it's generally minor changes to support the latest firmware. When they jumped to the 2.0 firmware they made some particularly large changes to certain systems that required studios like ours to invest a fair amount of time getting everything working.

道格: PSP本身是出色的设备。 它不仅具有出色的屏幕,光盘DVD驱动器,类似Playstation 2的图形硬件和802.11无线网络,而且启动起来很性感! 他们正在解决安全问题,并更新补丁中设备的主要组件应用程序(照片,视频,音乐,游戏),但他们也对该平台进行了重大补充。 他们添加了一个网络浏览器,RSS提要,一个类似客户端的“吊索盒”,使您可以在家中直播或录制电视节目。 他们还增加了对更多视频格式和一般用户界面改进的支持。 但是PSP平台即将宣布的改进令人印象深刻。 到明年的这个时候,每个人的PSP都将通过固件更新转变为比现在更多的东西。随着固件更新,开发人员会遇到一些烦恼,但为了支持最新的固件,这通常只是很小的改动。 当他们跳到2.0固件时,他们对某些系统进行了一些特别大的更改,这要求像我们这样的工作室投入大量时间才能使所有功能正常工作。

Scott: Example?

斯科特:例子?

Doug: Releasing titles on the latest firmware is one of the requirements of releasing software on the platform. An example of a change that was required when migrating was a major change to the way the network modules were dynamically loaded during run-time.  Ultimately the new implementation was much easier and robust than the previous but during the time I was working on the migration the pressure was on to get multiplayer functionality restored so production could continue.

Doug:在最新固件上发行标题是在平台上发布软件的要求之一。 迁移时所需的更改示例是对运行时动态加载网络模块的方式的重大更改。 最终,新的实现比以前的实现容易和强大得多,但是在我进行迁移的过程中,恢复多人游戏功能的压力越来越大,因此生产可以继续进行。

Scott: What IDE and languages can one use on PSP for official game dev? Do you sit down and go "File|New Game"? Does every house have to decide things like what engine are we going to use?

Scott:一个PSP可以为官方游戏开发者使用哪些IDE和语言? 你坐下来去“文件|新游戏”吗? 是否每个房子都要决定诸如我们将要使用的引擎之类的事情?

Now, as for the PSP development, the typical setup is a desktop PC for developing and a PSP development unit next to your desktop PC. The dev units originally cost around $7500 but they have finally started coming down around $4000.
现在,对于PSP开发,典型的设置是用于开发的台式PC和位于台式PC旁边的PSP开发单元。 开发者单位最初的价格约为7500美元,但最终却开始下降至4000美元左右。
Doug: The compiler & debugger for the PSP was developed by a little company called SN Systems which was recently acquired by Sony.  Fortunately SN Systems also developed a host of other tools including a Visual Studio Integration module.  So for people who like MS Visual Studio, you can develop in that environment even for PSP.  Our studio uses Visual Studio although I noticed the majority of programmers tend to use their favorite text editors and just punch into Visual Studio to compile and fire off the debugger. 道格: PSP的编译器和调试器由一家名为SN Systems的小公司开发,该公司最近被Sony收购。 幸运的是,SN Systems还开发了许多其他工具,包括Visual Studio集成模块。 因此,对于喜欢MS Visual Studio的人,您甚至可以在该环境中进行PSP开发。 我们的工作室使用Visual Studio,尽管我注意到大多数程序员倾向于使用他们喜欢的文本编辑器,而只是闯入Visual Studio来编译并启动调试器。
The toolchain also works under Linux and a number of studios and internal teams prefer it for PSP development.
该工具链也可以在Linux下工作,许多工作室和内部团队更喜欢PSP开发。
For me personally, our studio used Code Warrior for PS2 development, so using SN Systems and VS was a refreshing change. We're using Perforce for version control.
就我个人而言,我们的工作室使用Code Warrior进行PS2开发,因此使用SN Systems和VS是一个令人耳目一新的变化。 我们正在使用Perforce进行版本控制。
Now, as for the PSP development, the typical setup is a desktop PC for developing and a PSP development unit next to your desktop PC.  The dev units originally cost around $7500 but they have finally started coming down around $4000.
现在,对于PSP开发,典型的设置是用于开发的台式PC和位于台式PC旁边的PSP开发单元。 开发者单位最初的价格约为7500美元,但最终却开始下降至4000美元左右。
The PSP dev unit is basically a PSP teathered to a small tower computer.  The tower has a host of features, like the ability to burn PSP applications on a DVD to simulate the final UMD (the UMD is the media for the PSP) that you'd receive when you've gone gold.  It also allows the ability to run programs and point to file systems over the network.
PSP开发人员基本上是将PSP分发给一台小型塔式计算机的设备。 该塔具有许多功能,例如能够将DVD上的PSP应用程序刻录以模拟最终用完后会收到的最终UMD(UMD是PSP的介质)。 它还允许通过网络运行程序并指向文件系统。
Since I personally was responsible for the networking and multiplayer aspect of our game, I had a half dozen PSP dev units in a row on my desk.  When I want to test multiplayer, I've setup a launcher to fire off up to 16 PSP dev units simultaneously have them all join a game together and start the game automatically.  This makes it a fairly quick process to get a bunch of devices into the game and start testing/debugging.
由于我本人负责游戏的网络和多人游戏,因此我的办公桌上连续有六个PSP开发单位。 当我想测试多人游戏时,我设置了一个启动器,以同时触发多达16个PSP开发单位,使它们全部加入游戏并自动开始游戏。 这使得将大量设备加入游戏并开始测试/调试是一个相当快的过程。
For the game code itself, our studio has a very large code base.  At one point in the development process the compile time was approximately 40 minutes to build unoptimized code.  It's all written in C++ and entirely object-oriented.
对于游戏代码本身,我们的工作室具有很大的代码库。 在开发过程中的某一时刻,编译时间约为40分钟,以生成未优化的代码。 所有这些都是用C ++编写的,并且完全是面向对象的。

Scott: Debugging a psp game is interactive when it's running on the psp? there's pdbs over there? and is there a debug console for logging?

Scott:在PSP上运行时,调试PSP游戏是交互式的吗? 那边有pdbs吗? 是否有用于记录日志的调试控制台?

Doug: There's a fairly good debugger for the PSP.  It includes disassembly, multiple TTYs that you can print to, debug breakpoints/watchpoints, memory dumps, etc.Unfortunately there isn't a build-in 2-way console which would have been nice.  For the work I've done with debugging multiplayer I've had to implement my own 2-way console.  In addition to all the game's networking, for debugging I integrated code to have each PSP connect to an IRC server.  From there I can join IRC with my favorite client and talk to all the PSPs individually or to entire groups of PSPs.  In addition I have little mini-apps that connect from my desktop computer and show real-time bandwidth and latency metrics and other statistics useful for debugging multiplayer games.

道格: PSP有一个相当不错的调试器。 它包括反汇编,您可以打印到的多个TTY,调试断点/观察点,内存转储等。不幸的是,没有内置的2向控制台会很不错。 对于调试多人游戏所做的工作,我必须实现自己的2路控制台。 除了游戏的所有网络功能外,为了进行调试,我还集成了代码,以使每个PSP连接到IRC服务器。 从那里,我可以与我最喜欢的客户一起加入IRC,并分别与所有PSP或整个PSP组进行对话。 此外,我没有多少微型应用程序可以与台式机连接,并显示实时带宽和延迟指标以及其他对调试多人游戏有用的统计信息。

Scott: What kind of primitives are there to start with? Do you use their "directx" or write your own?

斯科特:有什么原始类型? 您使用他们的“ directx”还是自己编写?

Doug: There's a few other things required, but you can basically get a hello world app running and displaying to the screen in less than 50 lines. Sony has it's own highly-optimized graphical library which is a great starting point.I can't speak for other studios, but I believe most of everything they would need is there.  For studios looking to really push the envelope or perhaps for a specific genre, there are certain areas in the graphics library that may need to be improved for their specific app.By the way, the Sony graphics libs are an OpenGL-like interface.

Doug:还有其他一些事情,但是您基本上可以运行hello world应用程序,并在少于50行的情况下将其显示在屏幕上。 索尼拥有自己的高度优化的图形库,这是一个很好的起点。我不能代表其他工作室,但我相信他们需要的大多数东西都在那里。 对于想要真正突破极限或针对特定流派的工作室来说,图形库中的某些区域可能需要针对特定​​应用进行改进。顺便说一下,索尼的图形库是一个类似于OpenGL的界面。

Scott: Since you've created your own layers for graphics before was your knee jerk reaction to pull a "not-invented here" and start layering, or did you have more self control?

斯科特:既然您已经为图形创建了自己的图层,那么您的膝盖跳动React就是拉动“此处未发明”并开始分层,还是您有更多的自我控制能力?

Doug: Hehe, they put me on networking immediately when I hired onto this studio so I have never touched a line of graphics code for our PSP engine/game.

道格:嘿嘿,当我雇用这家工作室时,他们立即将我加入了网络,所以我从来没有碰过PSP引擎/游戏的图形代码。

Scott: They include a p2p stack?

斯科特:它们包括一个p2p堆栈吗?

Doug: I implemented 'Headset Support' for our PSP title which was essentially VOIP across a UDP P2P layer implemented in one our network libraries developed internally to (Sony Computer Entertainment International) SCEI. So yes, there is some P2P stuff in there somewhere 

道格:我为我们的PSP标题实现了“耳机支持”,这实际上是跨UDP P2P层的VOIP,该UDP P2P层是在我们内部为(索尼国际计算机娱乐公司)SCEI开发的网络库中实现的。 是的,那里有些P2P的东西

Scott: Is the biggest challenge on a psp things like memory leaks? Most of my readers have had garbage collection for >5 years so the idea of cleaning up after themselves may be foreign. It seems like one might chase memory leaks with a PSP and struggle when things get tight.

斯科特:诸如内存泄漏之类的psp挑战是最大的挑战吗? 我的大多数读者的垃圾收集时间都超过5年,因此清理自己的垃圾的想法可能是陌生的。 似乎人们可能会通过PSP追逐内存泄漏,并在事情变紧时挣扎。

Doug: Typically for games a memory manager is developed to sit on top of the kernel's malloc/free.  On the PSP in particular, it's nicely laid out so you have a nice contiguous block of something like 25megs that you can allocate, plus an additional volatile area of 4megs that you can also utilize for certain types of data.Our studio has some pretty comprehensive tools for managing memory, allocs, and frees.  We monitor the way memory is allocated throughout development and watch for things like islands that are created in the alloc/free process.  Islands are totally unacceptable in our memory space because we have as little as a 100K of allocatable space once the level is loaded and the gameplay is underway.We have our memory partitioned into different blocks so that we can enforce hard limits on different teams like sounds, graphics, assets, code, etc.  In addition certain blocks of memory are blown away completely after a level plays out.  So essentially you don't need to even worry about doing a 'free' on something you've allocated in some instances.  It seems like a lazy and unclean approach to memory management in some cases, but it works remarkably well when it comes to ensuring that you'll be able to get a nice repeatable memory layout level after level and not suffer from a diminishing heap space over time which would eventually result in the game crashing.

道格:通常在游戏中,内存管理器被开发为位于内核的malloc / free之上。 特别是在PSP上,它的布局很好,因此您可以分配一个连续的漂亮块,例如25兆像素,另外还有一个可变的4兆像素区域,您还可以将其用于某些类型的数据。用于管理内存,分配和释放的工具。 我们监视整个开发过程中内存的分配方式,并注意在alloc / free进程中创建的孤岛之类的事情。 离岛在我们的记忆空间中是完全不可接受的,因为一旦加载关卡并且正在进行游戏,我们只有100K的可分配空间,我们将记忆划分为不同的块,以便我们可以像声音一样对不同的团队施加硬性限制,图形,资产,代码等。此外,某个关卡播放完后,某些内存块会完全消失。 因此,从根本上讲,您甚至不必担心在某些情况下对已分配的内容执行“免费”操作。 在某些情况下,这似乎是一种懒惰且不干净的内存管理方法,但在确保您能够获得良好的可重复级别的内存布局并且不会受到堆空间减少的困扰方面,它的工作效果非常好时间最终会导致游戏崩溃。

Scott: This layer your studio has, is this something every studio is responsible for? I mean, isn't it kind of sub-optimal that there's not a pattern/library from Sony for this kind of thing? Or is malloc/free the appropriate place for sony to have left the developer?

斯科特:您的工作室具有这一层,这是每个工作室负责的吗? 我的意思是说,这种事情不是索尼提供的模式/库吗? 还是malloc / free是sony离开开发人员的合适场所?

Doug: It's certainly not something that every studio would need.  In our particular case we packed memory so tight that we were totally intolerant of any leaks or islands.The funny thing about game developers is that they like to be in ultimate control of their own destiny which gives rise to including something like this in a game engine.  Even in a time when developers rely more and more on libraries and larger systems outside their control, there is still the desire to reel that stuff in as much as possible and control the associated risks.

道格:当然不是每个工作室都需要的东西。 在我们的特殊情况下,我们将内存压缩得如此之密,以至于我们完全不能容忍任何泄漏或孤岛。关于游戏开发人员的有趣之处在于,他们希望最终控制自己的命运,从而在游戏中包含类似的内容发动机。 即使在开发人员越来越多地依赖其控制范围之外的库和更大的系统的时候,仍然希望尽可能多地收集这些东西并控制相关风险。

Scott: Do you or can you "cheat" and jump into the hardware like you did on the CE machines? or will Sony not certify you if you do that?

Scott:您是否可以像在CE机器上一样“欺骗”并跳入硬件? 还是Sony不会证明您这样做?

Doug: Unfortunately you can't "cheat".  As you predicted never get certified.  Additionally, you application would likely stop working when the next firmware update is applied.  I've got an example on this point.  Early in the development we poked into memory to overclock the CPU from 222MHz to 333MHz.  This gave us a huge boost to frame rates during early stages of development.  Unfortunately it would break each time we updated the firmware.

道格:不幸的是你不能“作弊”。 如您所料,永远不会获得认证。 此外,应用下一个固件更新时,您的应用程序可能会停止工作。 关于这一点,我有一个例子。 在开发的早期,我们进入了内存以使CPU从222MHz超频到333MHz。 在开发的早期阶段,这极大地提高了帧速率。 不幸的是,每次我们更新固件时,它都会中断。

Scott: Doh. I did a similar thing with my Palm application and when the new hardware came out, it was all over. I heard that you can't make UMDs, that only sony does? How do the ensure that you're gold disc will work? is there any chance that you'll get a bad gold and go, oh, snap....?

斯科特:嗯。 我用Palm应用程序做了类似的事情,当新硬件问世时,一切都结束了。 听说您不能制造UMD,只有Sony可以? 如何确保您是金牌唱片? 你有没有机会得到一块烂金,哦,抢夺....?

Doug: Correct, UMDs are only made internally at Sony and even first party developers don't have a way to make UMDs The DVD built into the dev kits is designed to emulate the UMD but it's about twice as fast as a UMD, so it's not really a good approximation.  Fortunately, all developers can send off a 'gold candidate' and get a dozen or so UMDs back to test  on an actual PSP.  The turn-around time is very quick as well.

道格:对,UMD只在索尼内部制造,即使第一方开发人员也没有办法制造UMD。开发套件中内置的DVD旨在模拟UMD,但它的速度大约是UMD的两倍,因此并不是一个很好的近似值。 幸运的是,所有开发人员都可以派出“黄金候选人”,并获得十几个UMD进行实际PSP测试。 周转时间也非常快。

Scott: So the only thing that would be iffy might be your level load times?

斯科特:所以唯一值得怀疑的可能是您的关卡载入时间?

Doug: The UMD drive on the PSP has a very good read speed but a horrible seek time.  So you have to employ tricks to avoid doing seeks if you want to have quick load times.  Our studio put significant effort into this and our absolute worst case level load time is around 20 seconds.There was a video circulating on the web of a PSP title that took over 6 minutes to get into the game and start playing--which is ridiculous, those guys should be ashamed of themselves, and I'm not even sure how the title passed certification.

道格: PSP上的UMD驱动器具有非常好的读取速度,但是寻道时间却很糟糕。 因此,如果要缩短加载时间,则必须采用技巧来避免执行寻道。 我们的工作室为此付出了巨大的努力,最坏情况下的绝对加载时间约为20秒.PSP标题的网络上流传着一段视频,耗时6分钟才进入游戏并开始播放-这太荒谬了,这些家伙应该为自己感到羞耻,我什至不确定标题如何通过认证。

Scott: How did you do the tricks with the turnaround time on UMDs? Try, order, try again?

斯科特:您是如何利用UMD的周转时间来解决问题的? 试试,点菜,再试一次?

Doug: Oh, by tricks for the UMD I meant by doing things like organizing data sequentially so that the UMD doesn't need to seek, data redundancy so the drive doesn't need to go different places to get stuff, etc. But yes, you can also go round and round with UMD samples of your software although it's usually not necessary.The dev tools do a remarkable job of emulating the production device, so you pretty much know what you're going to get if you have some UMDs made.

Doug:哦,通过UMD的技巧,我的意思是做一些事情,例如顺序组织数据以使UMD不需要查找,数据冗余以使驱动器不需要走到其他地方来获取东西等。但是是的。 ,尽管通常不需要,您也可以遍历软件的UMD示例。开发工具在模拟生产设备方面做得非常出色,因此您几乎知道如果拥有一些UMD将会得到什么。制作。

Scott: What's the typical team size?

斯科特:典型的团队规模是多少?

Doug: As for a typical PSP studio, the team sizes vary although they tend to be pretty impressive considering they are developing for a handheld device.  I'm speculating a bit here, but typically you're going to have a hard time finding a PSP team smaller than 15 or 20 people.  Our team was nearly 70 people strong with 20 software engineers on the project.

道格:对于一个典型的PSP工作室来说,团队规模各不相同,尽管考虑到他们正在开发手持设备,他们的规模往往令人印象深刻。 我在这里有点猜测,但是通常来说,要找到一个少于15或20人的PSP团队会很困难。 我们的团队有将近70人,有20位软件工程师参与了该项目。

Scott: Sony's got some intense certification, I heard?

斯科特:索尼获得了一些严格的认证,听说吗?

Doug: Sony holds titles to a very high level of quality before they are released for the platform.  There is a very long list of requirements and rules that guide and shape development. The upside of all this is that Sony has done an amazing job building out a platform, putting real marketing behind it, and getting the devices in customer's hands.Essentially they've built a new platform that can sustain a sizable team and yield profitable title and profitable title.Good stuff really.

道格(Doug):索尼为平台发行的出版物拥有很高的质量。 指导和影响开发的要求和规则列表非常长。 所有这一切的好处在于,索尼在搭建平台,进行真正的营销以及将设备掌握在客户手中方面做得非常出色,从本质上讲,他们已经建立了一个可以维持一支庞大团队并产生可盈利头衔的新平台。和有利可图的头衔。好东西。

Scott: Do they assign a human to your game so there's always an individual you can talk to? Sony has a rep for being a faceless beast.

斯科特:他们会为您的游戏分配一个人,以便总是有个人可以与您交谈吗? 索尼是一名不露面的野兽。

Doug: We tend to have all the support and connections we need.  I can't speak for all developers unfortunately.  I can guarantee that if you have a killer game, you'll get all the attention you need =)

道格:我们倾向于获得所需的所有支持和联系。 不幸的是,我不能代表所有开发人员。 我可以保证,如果您有杀手级的游戏,那么您会得到所有需要的关注=)

Scott: Doug, thanks for taking all this time and for typing your fingers. I hope the readers will enjoy this peek inside a world they are not (I know I'm not) familiar with.

斯科特:道格,非常感谢您抽出宝贵的时间和手指来打字。 我希望读者可以在他们不熟悉(我知道我不熟悉)的世界中享受这一偷看活动。

Doug: No worries. Peace.

道格:不用担心。 和平。

翻译自: https://www.hanselman.com/blog/interview-with-a-psp-developer-doug-beck

doug lea

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值