I would like to support multiple platforms for my games, at least windows and mac. What do i have to think about? Are there any good information online for cross platform game development with open gl maybe? I plan to program in c++.
OpenGL is cross-platform. The only thing you need to worry about are the operating specific initialization, such as wgl for Win32. SDL is also cross-platform. gcc is cross-platform. Look into the ports mingw for Win32 and xcode for OS X. Unfortunately most game development discussion is Windows specific. However, for Mac game development, you can look at Apple's game developer resources. Also, if you don't want to work on the Mac yourself, Red Marble Games can offer to handle the porting for you.
I develop on Linux and sell on Windows and Mac, from a single code base. The short story : I use SDL and gcc on all platforms. Search my old posts, I'm sure I explained what I do before with much more detail
I'm using SDL for my game, too... it is truly excellent. I've been testing my builds constantly on Linux, MacOSX, and Windows, and haven't had a single problem. Over on the game programming wiki we've got some SDL Tutorials, if you're interested in learning more. If you're on Windows, you can download Dev-C++ for free (a C++ IDE which uses gcc/g++ for compilation). Other platforms also have free IDEs which work well with SDL.
You might want to look into using an engine or SDK that is cross platform, such as PTK or Torque(if you need 3D). BlitzMax is now out and it's now crossplatform, however it's basic (not C++), but still very good. The Win32 version is still in beta and a 3D module is underway.
Is Torque on a Mac actually any good? I've heard ( and witnessed ) some pretty patchy results with Torque on Windows. I've seen it running quite well on moderate PC's and then again I've seen it running like a dog on a pretty high spec PC. But the only people I know who have witnessed the Mac version say the performance is horrible.
I'm having a blast working with Torque on my dual G5 2.5 Not sure what you mean by "horrible performance". Maybe if you had some more specifics about performance issues I could help your friends with some tips that I have found on the Mac. But besides that, there are a bunch of studios working with Torque and the cross platform issue is a huge selling point. One Story: the guys over at BraveTree (ThinkTanks, etc.), they brought a game dRacer to IndieGamesCon last October. The game was only on Windows when they arrived. They saw that Apple had loaned IGC twelve awesome G5s with huge cinema displays. So they went home of Friday night worked on the game. The next morning (Saturday), before IGC started they installed a full Mac version of dRacer on all the machines... Talk about cross platform. Because of the functionality of Torque they were able to completely port their racing game over to Mac in less than a night. Plus some of the performance was even better on Mac.
I don't think they were developing. Just trying out the engine and maybe some other people's demos. They didn't offer anything more specific than horrible performance in everything they tried.
hmm, torque is slow on the low end athlon1200 geforce 3 I have. Also all the games look pretty dull due to poor lighting and dated rendering engine which doesn't support much in the way of multitexturing. The newer shader version looks a lot nicer but it still has a lot in common with old torque somehow, and is slower than I expected, although I'm not going to make final judgement on it till its out of beta. I'm currently using blitzmax, we wrote a 3D module of our own in a little over a month, currently working fulltime on a indie sports game. If your interested you can check out a .WMV video I made yesterday 4mb. http://s93153354.onlinehome.us/rifa2.wmv still early days yet, been working on the game for 2 weeks but blitzmax is proving excellent, and the game runs pretty fast. On antonys Pentium 2 350 with a 5200FX about 55FPS. Currently were not using any shaders or extensions, just the basic multitexture blend modes, and were hoping to get good openGL compatibility, allthough we havent tested on many systems yet. Blitzmax isn't really what I'd call basic in the traditional sense though. It's more like C++ with a streamlined commandset tailored towards games so you can write games a lot faster.
/inserts obligatory Java comment Java is cross-platform to beyond Windows, Mac and Linux, and there is more than one wrapper for OpenGL for Java, too.
For more variety you could also give Allegro a try. Allegro supports DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows, QNX, BeOS and MacOS X. It also compiles on a large variety of compilers. If you want OpenGL for graphics, be sure to check out AllegroGL. AllegroGL is still in its infancy on the Mac platform, but its still pretty decent (I am currently using it in my project). If you have any questions, be sure to visit the community forums.
Ogre Ogre is a C++ 3d graphics engine which runs on Windows, Mac, and Linux. The 1.0 version is coming out sometime this month.
Obviously, you have to use technologies that are available (and working) on all the target platforms. If you use C/C++, the standard C library functions, and cross platform input/output libraries like SDL and OpenGL, the only thing you have to be careful about is endianness (byte ordering is different on x86 and on PPC).
Indeed, what took me 4 hours to port my codebase from x86 to Mac was identifying and fixing the endianness issues in the Stream classes. I'll state the obvious : endianness is an issue only if you save chunks of memory and read them in the other platform (ie fwrite(&pStruct)) or access them in memory. Everything else should Just Work (TM).
I simply just implement the core components that I will be using for my game for each platform. This might be a graphics object, a sound object, and the interface for the game. Once you do that just have the game interact with those components. If you want to port the game all you have to do is implement those components for another platform. This has help me.
Oh, another thing you might want to remember is that standard Mac mice have only one button :]. (grrrr)
Regarding BlitzMax: it is only cross-platform on the Mac at this time. B-) They plan on porting to Win32 and Linux, but haven't released anything for it yet.
Actually GB the PC and linux versions are in late beta and you can use them if you purchase the Mac version, so you get all 3 versions with the purchase of one. The game engine were making is cross platform allthough we use primarily Win32. Bmax seems to be really good considering its only been out for aproximately 6 weeks). For a beta it's very stable indeed, you can compile the same source code on any of the 3 platforms. Can even compile the mac version on the PC via PearPC if you really want to. Not that I'd recommend it.
I second that one Evak. I too have the BMax win32 Beta and find it an excellent piece of software. I'm also looking forward to "Trinity" so that I can switch our development full time to the BMAX platform and release on Linux,Win and Mac.