Cross platform question

This is a discussion on Cross platform question within the Game Programming forums, part of the General Programming Boards category; As far as determining which OS the game is running under is it better to use preprocessor directives or find ...

  1. #1
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    320

    Cross platform question

    As far as determining which OS the game is running under is it better to use preprocessor directives or find some code on google to see if it is mac, windows, or linux. Or should I just let someone else use the GPL to port it?

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,803
    Well what kind of game are you making? Is it going to be text based or use some sort of graphics?
    Woop?

  3. #3
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    320
    It is using allegro which is cross platform just a small RPG to see how well this group will work together. The reason I ask for how to see if it is mac, linux, or windows is in the filenames since I know on windows you would use something like "art\\blah.bmp" and on linux you use "art/blah.bmp" or that is at least according to a friend of mine that is using linux much more than I am.
    Last edited by ~Kyo~; 08-25-2005 at 04:06 AM. Reason: typo

  4. #4
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,803
    You use the \\ because it is an escape character so thats why when you open files you use this. Oh and you should use the grabber to put your bitmaps into a .dat file it is quite handy.
    Woop?

  5. #5
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    320
    lol sorry I had a typo
    from what I have heard \\ is for windows and / is for linux I was told \\ will not work on linux and need to know if that is true and if it is I need some way to figure out what OS it is running under

  6. #6
    ---
    Join Date
    May 2004
    Posts
    1,379
    re-read prog-bmans post

  7. #7
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    320
    He never said if it worked on linux or not and since I will be as bold as to make the assumption that most users on this site use windows I would still like to see it worded as you use \\ in both of those OSes or you use \\ in windows and / in linux

  8. #8
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Use / in both OSes; use \\ in Windows.
    http://groups.google.com/group/comp....3ac81f37b60ca9
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  9. #9
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    320
    Quote Originally Posted by Dave_Sinkula
    Use / in both OSes; use \\ in Windows.
    http://groups.google.com/group/comp....3ac81f37b60ca9
    Alright I get it now thanks for all who posted.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. platform game logic, problem
    By Akkernight in forum Game Programming
    Replies: 7
    Last Post: 02-23-2009, 09:49 AM
  3. MinGW Linking GUI Program
    By Tonto in forum Tech Board
    Replies: 19
    Last Post: 08-23-2006, 03:28 PM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  5. Visual C++ 2005 linking and file sizes
    By Rune Hunter in forum C++ Programming
    Replies: 2
    Last Post: 11-12-2005, 09:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21