Jump to content
  • Advertisement
Sign in to follow this  
vellamatic

C++ Compiler For Pc, Xbox And Ps3

This topic is 2717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I'm currently writing a game engine component for music. I'm writing this in C++ on PC. The IDE I'm using is Code::blocks while the compiler is gcc (on minGW). Everything's working fine and dandy on PC. Now I'm thinking of porting my program for use in Xbox and PS3. However I have no experience in this.

Is there a particular compiler that I should use which would make it easy for me to have a program that is compatible with all 3 platforms (i.e. PC, Xbox & PS3)? If not, which compiler should I use for which platform?

Any other non-compiler-related information about this issue would also be very much appreciated.

Cheers.

Alan.

Share this post


Link to post
Share on other sites
Advertisement
The only real way to get a game onto Xbox is to:
a) Use XNA and Xbox Live Community Games or whatever it is. This requires C#.
b)Become a licensed developer.

PS3 development will now be possible with the key cracking and whats happened, but I have no idea if compilers have support for it yet. It would probably be a specialist one, however.
If you want official PS3 development, again you'd need to be licensed.

Share this post


Link to post
Share on other sites
For PS3 homebrew (either with the new hacks, or if you just didn't upgrade your firmware and can still run linux) you can just use GCC.
For the actual PS3 development, you'd have to get a devkit from sony, and use their compilers (based off GCC if I recall).
For the XBOX, you'd have to use C# and XNA game studio to develop without a devkit.
With a devkit, the C++ code would be run through the regular Visual Studio CL compiler.

But that shouldn't be your concern. The bigger issue is that libraries that are "cross platform" between linux and windows, aren't always cross platform to the consoles. You'll have to change all your system calls (timers, threads, file io, sound, graphics, etc.) to use the APIs provided by each console's SDK. If you are using any middleware, make sure it runs on all those platforms.

Share this post


Link to post
Share on other sites
If you ever do end up porting your library to consoles, you'll have a LOT bigger problems than compiler compatibility. But if for some reason you really want to prepare for that, then I would recommend making sure your code is compatible with VC++.

Share this post


Link to post
Share on other sites
As has been posted, the console compilers are private, but the Xbox one will be "MSVC-like" and the PS3 one will be "GCC-like", so getting your code working in those two is a good start ;)

Share this post


Link to post
Share on other sites
Thank you all for your replies. You've been very helpful.


If you ever do end up porting your library to consoles, you'll have a LOT bigger problems than compiler compatibility.


Could you elaborate on this? What would be the biggest hurdles I could encounter when porting to consoles? KulSeran already mentioned system calls which would need to be tailored according to the particular system I'm working on. Is there anything else?

Alan.

Share this post


Link to post
Share on other sites

Thank you all for your replies. You've been very helpful.



Could you elaborate on this? What would be the biggest hurdles I could encounter when porting to consoles? KulSeran already mentioned system calls which would need to be tailored according to the particular system I'm working on. Is there anything else?

Alan.


E.g., look at console specs. Wikipedia mentions "256 MB system and 256 MB video" for the PS3. Compared to that, my commodity PC is a monster (4096 MiB sytem and 1024 MiB video).

Share this post


Link to post
Share on other sites

Thank you all for your replies. You've been very helpful.



Could you elaborate on this? What would be the biggest hurdles I could encounter when porting to consoles? KulSeran already mentioned system calls which would need to be tailored according to the particular system I'm working on. Is there anything else?

Alan.


Performance and memory footprint would likely be your largest concerns. Having a small memory footprint is obvious...memory is extremely tight on consoles and every MB counts. CPU performance is trickier...your code might be blazing fast on a beefy PC CPU with 4MB of L2, but grind to a halt on a weaker console CPU. On Xbox 360 it means using the vector units for any heavy-duty math, and making sure it can run well not on the main thread. On the PS3 you pretty have to run it on the SPU's no matter what you're doing so that you don't hog the single PPU.

Share this post


Link to post
Share on other sites
Thanks guys. It looks like porting for consoles is no walk in the park.

My last query is about iPhone. I have no experience with Apple products but I realize that there is a big market for mobile casual games running on iOS. Does anybody have any idea how to start porting C++ code to this environment? I realize that there might be many steps to this but what are the key hurdles and where would one start? Anybody had to go through this?

Cheers all.

Alan.

Share this post


Link to post
Share on other sites

Thanks guys. It looks like porting for consoles is no walk in the park.

My last query is about iPhone. I have no experience with Apple products but I realize that there is a big market for mobile casual games running on iOS. Does anybody have any idea how to start porting C++ code to this environment? I realize that there might be many steps to this but what are the key hurdles and where would one start? Anybody had to go through this?

Cheers all.

Alan.


You could take a look at this: http://www.airplaysdk.com/

It is not free however but offers portability between lots of platforms in C++, and they claim it is easy to manage too.

I have been tempted to take a look myself but iPhone development doesn't really interest me at the minute. Let me know what you think!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!