View Full Version : Converting pc to xbox, PS etc etc
puggy
11-17-2005, 12:57 AM
Did a search of the forums and google, couldn't really see anything much about this.
With the launch of the xbox360 soon, i wanted to have a look at how hard it would be to convert a pc game to the xbox, xbox360 and possibly other consoles.
Anyone know of any decent articles about this?
soniCron
11-17-2005, 12:59 AM
Read this:
http://forums.indiegamer.com/showthread.php?t=5100
Coolhand
11-17-2005, 05:47 AM
That's a very difficult question to ask... both art resources and programming can be quite different between PC and consoles, especially depending on what console you are talking about.
PC to Xbox and vice-versa are quite easy (relatively speaking) depending on what graphics API you are using for your PC stuff (Xbox is pretty much straight DX8). While GameCube (and supposedly Revolution) use OpenGL-ish stuff. PS2/PSP have their own API which while not difficult at face value, the underlying hardware that it interfaces with causes general PS2 stuff not be very easy to wrap into a library for multi-platform purposes (ie. while it is easy to wrap a D3D8 draw verts call and and an OpenGl draw verts call under a easy, single MyLib draw vert call, it wouldn't be as straight forward to set that up to run on PS2).
Some things to keep in mind for console programming:
Memory is sacred... always keep it in mind and save whereever you can!!!
The caches (data and code) are very important. Having bad cache accessing can completely destroy your CPU performance (ie. use arrays instead of linked lists, limit your depths of your function calls, etc.)
Plan any hardware specific stuff to exist in wrappers for your engine (graphics, sound, input, etc.). This will make your life a billion times easier if you ever need to port to another platform (not just console, but Mac, Linux, etc.)
Create a good memory manager to overwrite all of your allocations (new, malloc, etc.). Create a debug version of this that tracks bound overwriting, etc. You'll want to allocate all of your console's memory at the start of runtime with a system malloc, then all subsequent requests for memory will go through your stuff.
Assert everywhere! (not just consoles, but any kind of programming in general should follow this :))
Handle all exceptions gracefully (running out of memory, unable to read file, etc.)
Design your input around a gamepad experience, not mouse and keyboard
Colors (especially reds) look quite a bit different on a TV screen versus a monitor
Unless you are doing HD support, your resolution is only going to be 640x480 tops. You don't need texture detail that contains more texels than will ever cover pixels on the screen.
Think about loading times from day 1. Design your files / folder structures to be load-friendly. Don't jump around your folder structure looking for files (seeks are the enemy!) when you can for instance load all textures, then meshes, then scripts, etc. Where possible, do "chunked" loading with pointer patching, instead of read a bit, allocate memory, read some more, allocate some more, etc.
Those are a bunch that come to mind off of the top of my head. I'm sure that there are hundreds of more to think about, but unfortunately I have to get back to my PS2 kit ;)
If you have any specific questions, shoot them down and I'll see what I can answer (NDA-friendly questions only please!) :)
James C. Smith
11-17-2005, 07:45 AM
I take exception to most of that. It is accurate in terms of things a programmer must do or consider, but it is nearly irrelevant in the bigger picture of “how hard it would be to convert a pc game to the xbox xbox360 and possibly other consoles.” I am assuming Puggy wouldn’t want to just do this for how own armament but is actually considering making it a product. Doing the programming to make your game run on the new system is the easy part. The hardest part is making the business relationship to get a publisher and or a dev kit. The second hardest part is adapting your game to be appropriate on a console. That is, after the game is ported any fully playable on the console, you need to do a lot more work to it before you can ship it.
It took me 2 days to have Ricochet Lost Worlds running and fully playable on an Xbox. The game was fully playable after about 16 hours of work. It took 2 months to ship the product. During that time I dealt with font size (TV screen do bad stuff to small text), “safe zones” (TVs don’t display the edges of your frame buffer), controls fine tuning, Leader Boards (require proprietary online high scores system), HDTV support, controller disconnect issues, using the proper terminology in all in-game text, and other TCR (technical certification requirements). Some of the time was spending doing stupid things like proving the certification team that I was not leaking memory when they thought it was. Or explaining to the Microsoft tester that even though he had an HDTV, it don’t necessarily mean it support 720p resolution.
Wik & The fable of souls was ported to the Xbox 360 in about 4 or 5 days. The controls were not final but they worked, all the game logic was running, the recorded demos could play back, the menu navigation worked, the sounds played, the graphics looked great and the performance was reasonable. The differente in CPUs (especialy byte order) made the port a little harder as did the difference in APIs. (For example the Xbox 360 does not have a Direct Sounds API.) But that 4 or 5 days or work was insignificant compared to the 4 months it took to make the game a shippable product.
Summary:
The coding is easy for any decent programmer. Adapting the whole product to conform to a console is a much bigger problem. But the biggest problem of all is getting the deal in place that lets you attempt any of the above.
Coolhand
11-17-2005, 10:21 AM
I take exception to most of that. It is accurate in terms of things a programmer must do or consider, but it is nearly irrelevant in the bigger picture of “how hard it would be to convert a pc game to the xbox xbox360 and possibly other consoles.”
Easy trigger! :)
His question was "how hard it would be to convert", and had nothing to do with getting a publisher, etc. I just put down information that would be useful to him as someone who has obviously never done console development before. If you have only ever developed for PC before, there are a lot of things that you need to consider about consoles that most PC developers are not aware of. Especially if you are thinking about a non-Xbox console (ie. PS2 AKA Hell on Earth).
If he had asked "how do I go about getting my pc game published on a console", then I would have given a different answer entirely :)
Adapting the whole product to conform to a console is a much bigger problem.
I thought that is what I was trying to get across :)
James is right though, the programming aspects are relatively straightforward for anyone with programming experience ("wow, these caches are small, I'll need to make some changes"). Even in the worst case scenario (like PC to PS2, or vice versa) sure you will need to write some extra code like a memory manager/dmac manager/etc, but the bulk of the changes will be on the content side with changes in the runtime data formats, etc.
To answer your question puggy, you're not going to find many articles on any of this as most API and hardware documentation is going to be under NDA. If I were you, unless you already have some shipped titles under your belt just forget consoles and concentrate on PC for now. No sense jeapordizing the release of your PC game because you spent so much time worrying about a console port that had little chance of happening anyway (not trying to be mean here, just being honest).
If your using Torque shader engine, Garage games will sell you a 360 licence and port for $10,000 per title at the moment. It's probablt the easiest but more expensive route.
If you can port it yourself, Currently MS are waiving a lot of the development costs, QA testing etc, and even forward $10,000 towards development costs offset from royalties.
Of course the hard part is going to be convincing MS that your games is something they want. After that it's proving that you have what it takes to port your game over. So don't expect to get much help without a proven track record of shipped titles.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.