PDA

View Full Version : Mac Games from C++


pileofheads
2004.07.13, 03:37 PM
Hey.

My friend and his brother are in the process of building a MMO, and have recruited me to help. They plan on teaching me C++ so I can help program, but mainly they want me for my artistic skills.

Anyway, they are both PC freaks. The game their building sounds really cool, and I was curious how hard it would be to make it dual-platformed or whatever. As I said, they're coding in C++ and plan on using Direct X and Direct 3d for graphics.

What would I have to do to port this for a Mac?

Thanks :blush: Obviously I'm new at this... so be patient.

Josh
2004.07.13, 04:30 PM
MMO = ?

Porting or dual developing a game is hard work, especially if they are using a Windows-specific API (application programming interface) such as DirectX and Direct3D. Given that you are still in the process of learning C++, I'd say porting a Windows-specific game is a bit too much.

Start small -- get confident using C++, learning OpenGL and the Mac API of your choice and then try making small games.

ThemsAllTook
2004.07.13, 05:08 PM
The best thing to do if you want a cross-platform game is to code it as such right from the beginning. You'll definitely want to stay away from DirectX/Direct3D; use OpenGL instead. Also, you might want to consider using something like SDL, which is a cross-platform toolkit for application development. Although, if I'm not mistaken, you have to pay a royalty if your game uses SDL and is sold for money...

I've coded cross-platform applications before (using the native APIs on each platform), and if you know how to do it, it's really not too bad. Basically, what I did was write an abstraction layer, where all of the platform dependent code resides (using #ifdefs to separate Carbon code from Win32 code), and calling the abstraction layer from the application code. A bit tedious at times, but doable.

One thing, though: If you're new to programming, a cross-platform multiplayer online game is NOT a good place to start.

Alex Diener

sealfin
2004.07.13, 07:31 PM
Although, if I'm not mistaken, you have to pay a royalty if your game uses SDL and is sold for money...
You're mistaken; SDL is licensed under the LGPL - as long as you dynamically link to an un-changed copy the SDL library/framework, you don't have to make any of your source/object code available.

The legalese is here: Licensing the Simple DirectMedia Layer library (http://www.libsdl.org/license.php)

ThemsAllTook
2004.07.13, 09:05 PM
Ah, right, that's the way it is. I always forget...

Alex Diener