Skip to main content
GameDev.net gamedev.net
🔒 Locked

Just Curious...

Started by Grantyt3 Apr 8, 2006 at 12:19 PM 11 replies 1.1k views
Original Post
Grantyt3
Grantyt3
What do you have to do differently to make a game run on a PS2, XBOX, etc.?
Ravuya
Ravuya
You have to target whichever APIs they use, and have the thing signed by the console manufacturer. Additionally there may be endianness issues and memory/storage limitations.

That's a greatly oversimplified view of the problems in console development but it should give you a good idea.
Antheus
Antheus
Consoles tend to have considerably more specialized hardware, so you will want to consider the overall game design so it targets a specific platform. Then you use the API that console offers.

Cross-platform development is of course possible, but they complicate things considerably. Also, the portable development will commonly apply only to consoles of same generation, so you wouldn't go developing today's games for PS, PS2, PS3, x-box and x-box 360.

The challenges are essentially the same as with Linux/Windows/MacOS cross-platform development.
Grantyt3
Grantyt3
Tell me if you don't think this is a good idea, seeing that I'm just a hobbyist programmer, but I'm very interested in this (not in selling them, I'm just curious to see if I can do it)

#1 - I've read that you can't currently write homebrew games for Xbox 360, so what consoles can you currently develop at home for?

#2 - Most recent consoles support DirectX right?

#3 - As far as I can tell, at least for Dreamcast, you just need to compile it for the SH4 processor. Is there anything besides compiling for a different processor and making sure that the hardware is powerful enought to support the game?

#4 - Could anyone give me a little push to tell me what I should do?
Ravuya
Ravuya
Quote:
Original post by Grantyt3
Tell me if you don't think this is a good idea, seeing that I'm just a hobbyist programmer, but I'm very interested in this (not in selling them, I'm just curious to see if I can do it)

#1 - I've read that you can't currently write homebrew games for Xbox 360, so what consoles can you currently develop at home for?


None, unless you manage to track down a copy of the old PS2 Linux kit. You can get a couple of Korean consoles (such as the GP2X) that you can also develop for. If you want to do it semi-legally I believe you can find independent development gear for almost any of the consoles, but you may have to modify your console which violates the DMCA. We can't tell you anything about this, and will have to ban anyone who does provide this, in order to keep GDNet legal.

Quote:
#2 - Most recent consoles support DirectX right?

No, just the PC and the Xbox. Write your code in a portable, intelligent way, which you should be doing anyway, and then you can port it to whatever API -- whether proprietary ones like the PS2 and GameCube, OpenGL, or DirectX.

Quote:
#3 - As far as I can tell, at least for Dreamcast, you just need to compile it for the SH4 processor. Is there anything besides compiling for a different processor and making sure that the hardware is powerful enought to support the game?

Compiling for a different processor alone entails a lot of work to make sure that your code is endian-independent, respects data sizes properly and takes advantage of pipelining, extra instructions that vary from CPU to CPU, the presence (or not) of FPUs, and the way that particular family of processor manages memory and registers.

Most compilers these days should take care of all of that for you, but it's something to be aware of.

Another enormous problem is the relatively small amount of memory various machines have; you need to rebuild your code and data to take advantage of that, for example. It's why console ports are generally non-trivial and outsourced to "port houses".

Quote:
#4 - Could anyone give me a little push to tell me what I should do?

Learn PC development, if you haven't already. Get as close to the metal as you can to understand the fundamental differences between consoles, because it's not just a matter of a compiler switch.
Grantyt3
Grantyt3
Just because a system supports DirectX doesn't mean you couldn't make a game using OpenGL or another API does it?

And what makes hardware compatible with DirectX? I thought it was just in the software...
Antheus
Antheus
Quote:
Original post by Grantyt3
Just because a system supports DirectX doesn't mean you couldn't make a game using OpenGL or another API does it?

And what makes hardware compatible with DirectX? I thought it was just in the software...


It actually goes the other way.

A console "supports" DirectX in sense, that the API you work with are defined using DirectX.

So when you choose to do something, you use DirectX API. The SDK and runtime software on the console implements everything between DirectX API through drivers to actual hardware. Since consoles use fixed hardware, many of these bindings can be very tight and specific. Unlike PCs, where a complete range of graphic cards must be supported, console DirectX API implementation can be simply hardcoded to a specific chipset.

Now, you could use OpenGL or any other API. But that would most likely mean, you'd need to rewrite just about entire graphical system, including drivers.

This of course depends on actual hardware used, and it would probably be possible to use existing high-level code, but it's just not worth the effort. Consoles have highly limited resources, need optimized implementations on all levels, and often allow for various hacks to make things work. This is all developed by the manufacturer.

Unlike PCs, that are general purpose machines, designed for high degree of interoparibility at all levels, consoles are extremly specialized. You take what is provided, and solve your problems using what you have. If it's missing, you can try to either work around it, simulate it or drop it.

While newer consoles are getting more powerful and even flexible, they are still a far cry from what PCs offer in terms of flexibility.
Grantyt3
Grantyt3
Does anyone have an opinion of which console, old or new, would be easiest to get started with?
SirSmokey
SirSmokey
The Gameboy Advanced has alot of documentation and quite a big community behind it for a console (yeah i know it's a handheld but it should give you an idea as to what's involved). Check here for more info. Also there's a free book that never got published about programming the GBA.
There's also quite a bit of info for programming the NES here.
Grantyt3
Grantyt3
Thanks! This question will probably be answered when I read those links, but I'll ask just incase: It seems that the older systems like that can only be programmed with their cpu's assembly language. Is that true, or can you compile C?
Grantyt3
Grantyt3
Wow, that book sure makes learning GBA programming extremely easy. It uses a complete GBA development for Windows called HAM. That's been my problem so far. With PS2, you have to use GCC and all this other command line based crap that never works. Not to mention, all the links are broken on the sites. Why don't people make dev environments more often??? Well, thanks for the link, I understand a lot better now. Too bad I don't have my Gameboy anymore, that'd have been cool to see it run on the actual hardware instead of an emulator. I might have to go pick up a used one...
Smit
Smit
Quote:
Original post by Grantyt3
Wow, that book sure makes learning GBA programming extremely easy. It uses a complete GBA development for Windows called HAM. That's been my problem so far. With PS2, you have to use GCC and all this other command line based crap that never works. Not to mention, all the links are broken on the sites. Why don't people make dev environments more often??? Well, thanks for the link, I understand a lot better now. Too bad I don't have my Gameboy anymore, that'd have been cool to see it run on the actual hardware instead of an emulator. I might have to go pick up a used one...


You could probably find one on Ebay for about £10 - £20.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.