+ Reply to Thread
Results 1 to 20 of 20

Thread: Cross platform development

  1. #1

    Default Cross platform development

    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++.

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Des Moines, IA
    Posts
    1,262

    Default

    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.
    - Check out Stop That Hero!, a game in which you play the villain for once!
    - GBGames' Blog
    - Twitter: www.twitter/com/GBGames

  3. #3
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    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 :)
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  4. #4
    Senior Member
    Join Date
    Oct 2004
    Location
    Vancouver, Canada
    Posts
    655

    Default

    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.
    Ryan Clark
    Brace Yourself Games (Formerly of Grubby Games)

  5. #5
    Senior Member
    Join Date
    Aug 2004
    Location
    Utah, USA
    Posts
    844

    Default

    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.

  6. #6
    Senior Member
    Join Date
    Aug 2004
    Posts
    947

    Default

    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.

  7. #7

    Default

    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.

    Quote Originally Posted by Sybixsus
    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.

  8. #8
    Senior Member
    Join Date
    Aug 2004
    Posts
    947

    Default

    Quote Originally Posted by Ciperl
    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.
    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.

  9. #9
    Senior Member
    Join Date
    Aug 2004
    Location
    Sacramento CA
    Posts
    100

    Default

    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.
    Last edited by Evak; 02-04-2005 at 08:49 AM.

  10. #10
    Senior Member
    Join Date
    Dec 2004
    Posts
    166

    Default

    /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.

  11. #11

  12. #12
    Senior Member
    Join Date
    Nov 2004
    Location
    BC, Canada
    Posts
    357

    Default

    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.

  13. #13
    Member
    Join Date
    Jul 2004
    Location
    Bellingham, WA, USA
    Posts
    88

    Default 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.

  14. #14
    Senior Member
    Join Date
    Jul 2004
    Location
    France
    Posts
    163

    Default

    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).

  15. #15
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    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).
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  16. #16
    Junior Member
    Join Date
    Feb 2005
    Posts
    4

    Default

    Quote Originally Posted by StefanM
    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++.
    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.

  17. #17
    Senior Member
    Join Date
    Jul 2004
    Location
    France
    Posts
    163

    Default

    Oh, another thing you might want to remember is that standard Mac mice have only one button :]. (grrrr)

  18. #18
    Senior Member
    Join Date
    Jul 2004
    Location
    Des Moines, IA
    Posts
    1,262

    Default

    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.
    - Check out Stop That Hero!, a game in which you play the villain for once!
    - GBGames' Blog
    - Twitter: www.twitter/com/GBGames

  19. #19
    Senior Member
    Join Date
    Aug 2004
    Location
    Sacramento CA
    Posts
    100

    Default

    Quote Originally Posted by GBGames
    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.
    Last edited by Evak; 02-06-2005 at 11:22 AM.

  20. #20
    Senior Member
    Join Date
    Sep 2004
    Location
    Poole, Dorset. UK
    Posts
    319

    Default

    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.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts