windows game programming on Linux?

This is a discussion on windows game programming on Linux? within the Linux Programming forums, part of the Platform Specific Boards category; Is there a way to program games for Windows using the DirectX APIs on a computer running Linux? I'm just ...

  1. #1
    124
    124 is offline
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    windows game programming on Linux?

    Is there a way to program games for Windows using the DirectX APIs on a computer running Linux? I'm just thinking, being that a lot of the programs made for Linux are free, and from what my computer teacher tells me, Linux is safer being that the people who are hacking other computers and making viruses for them are using Linux. Thanks!

  2. #2
    Registered User
    Join Date
    Mar 2002
    Location
    South Africa
    Posts
    35

    Unhappy

    Quote Originally Posted by 124
    Is there a way to program games for Windows using the DirectX APIs on a computer running Linux? ...
    I have been thinking about this problem for a bit now, as I am just starting out as a freelance commercial software developer, and would very much like to use Linux all day, every day.

    There is, AFAIK, only one way: Run a hardware emulator. This will require you to:
    1. Buy VMWare (or similar)
    2. Buy Windows
    3. Obtain your IDE/development tools of choice
    4. Obtain your favorite Linux distro
    5. Install Linux
    6. Install VMWare
    7. Create a virtual machine and install Windows on it
    8. Install your development tool on the Windows VM
    9. Write your game. In Windows on Linux.


    When you come in in the morning, you will have the satisfaction of seeing Linux booting and logging into it, and actually working with it for about two seconds to start the virtual machine.

    After this, you would work on your game (in Windows) all day.

    At the end of the day you will return to your Linux desktop for about the same amount of time as in the morning.

    I don't know... but it just doesn't seem quite worth the VMWare license fee. Because this will automatically mean extra admin - you now have two OSes to keep happy and running, not just one. Granted, the 'extra' one is much less broken than the crucial one, but still - there will be overheads on your time.

    About the only situation I can see where this will be worth it, is when you want to develop a Windows client program for a database running on a Linux server, or something similar. I hear that you can run multiple VMs at the same time, and set them up in a network as well.

    So maybe this will be cool for you, if your game is to have network multiplayer capabilities.

    /*
    O yeah, I know didn't consider software emulators like Wine - a project like Wine can never be completely finished (i.e. it can never give you a real Windows environment). If I'm not mistaken, I got that from the Wine website. No matter how close it comes, you will always need a real Windows machine at some point.
    */
    I code.
    I think.
    Ergo, I think in code.

  3. #3
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    if you have a copy of the api for directx, you can write all the code you want to use it on whatever os you want.
    you can only build it to run on windows, but you can write it on linux.

    use a windows box to install the directx development tools, copy the files afterwards to your linux system, and point to the appropriate folder for the includes.

    btw, I've heard that even companies like EA Games uses linux to develop their games on, they just test on windows.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  4. #4
    Registered User
    Join Date
    Mar 2002
    Location
    South Africa
    Posts
    35
    Quote Originally Posted by Jaqui
    btw, I've heard that even companies like EA Games uses linux to develop their games on, they just test on windows.
    Now that's interesting... Looks like my solution will be to rethink the development process a bit. No more F9 to build&run the program so you can test it (I use Borland tools atm).

    If its true that EA does it that way, surely it must work quite well!

    Would you mind telling where you heard this?
    I code.
    I think.
    Ergo, I think in code.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Or just use a portable graphics library like OpenGL

  6. #6
    xhi
    xhi is offline
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    When you come in in the morning, you will have the satisfaction of seeing Linux booting and logging into it, and actually working with it for about two seconds to start the virtual machine.
    im sorry that does not make any sense to me.. but anyhow.

    vmware is a great program, i use it to test alot of stuff i write in linux that i want to be portable.. but as far as coding i do most all of it from linux. and if i were writing somthing windows specific such as directx i would imagine that i would just code in straight windows.. VMware is nice, but if you want to see the real performance of 3d apps you are writing, you should not have that VMware layer in there..

    and there is also the fact that i was never one to get satisfaction from the linux login.. all my appreciation for linux came after i logged in and actually used it..

    you should consider as Salem suggested, using opengl. you could write your game for linux, then port it to windows..

  7. #7
    Registered User
    Join Date
    Mar 2002
    Location
    South Africa
    Posts
    35
    vmware is a great program, i use it to test alot of stuff i write in linux that i want to be portable.. but as far as coding i do most all of it from linux. and if i were writing somthing windows specific such as directx i would imagine that i would just code in straight windows.. VMware is nice, but if you want to see the real performance of 3d apps you are writing, you should not have that VMware layer in there..
    Thanks for that, you're raising my hopes of ever working in Linux full-time.


    and there is also the fact that i was never one to get satisfaction from the linux login.. all my appreciation for linux came after i logged in and actually used it..
    Thats exactly my point.
    I code.
    I think.
    Ergo, I think in code.

  8. #8
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    Koedoe, I can't remember exactly where I heard it, and they won't let non employees into the offices, without an appointment.
    [ I live less than a mile from their main development headquarters ]

    I do know, from Google's about us pages that Google is standardised on linux for their entire operation.
    so Google's desktop search etc is all coded on linux, even though it doesn't run on linux.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  9. #9
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    498
    Microsoft uses Unix I think to code their software. But I don't care how they write it.

    But there's on thing: if you're using an Intel-based Linux, look up Wine (it's a recursive acronym for Wine Is Not An Emulator). Not only can it RUN (not emulate ) DirectX games, you will get even more stability if you use the provided Wine.lib to write your programs. Using Wine to run Windows programs rarely have performance loss, mainly due to the fact that it does not emulate Windows, it just does whatever Windows would do when you try to run a program. I haven't actually tried it, as I'm using a Mac, but from what I hear, it's supposed to be pretty good.

  10. #10
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Quote Originally Posted by 124
    Is there a way to program games for Windows using the DirectX APIs on a computer running Linux? I'm just
    You can write the code anywhere, will just be tough to link it with the DLLs.
    And you'll have to transfer the headerfiles over to the Linux machine which may or may not be allowed under the SDK license.

    thinking, being that a lot of the programs made for Linux are free,
    So are many programs made for Windows. In fact companies have sued Microsoft for making programs freely available (how's that folks, the "evil empire" being sued for giving things away for free instead of selling them)...

    and from what my computer teacher tells me, Linux is safer being that the people who are hacking other computers and making viruses for them are using Linux. Thanks!
    Your teacher is an obvious idiot.
    The percentage of hacked Linux machines is far higher than the percentage of hacked Windows machines. It's only in absolute numbers that more Windows machines are hacked but that's hardly surprising given that there are hundreds of them for every Linux box.
    And most virusses are written by script kiddies working on Windows machines using toolkits in which they just click some options in a program and it generates a new virus for them, no programming skill required.
    A lot of the "hackers" out there are of the same callibre and use similar tools.

  11. #11
    xhi
    xhi is offline
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    > The percentage of hacked Linux machines is far higher than the percentage of hacked Windows machines.

    i would be curious to see somthing that backs that statement up.

  12. #12
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by joeprogrammer
    Using Wine to run Windows programs rarely have performance loss, mainly due to the fact that it does not emulate Windows, it just does whatever Windows would do when you try to run a program. I haven't actually tried it, as I'm using a Mac, but from what I hear, it's supposed to be pretty good.
    if it works, it works well: http://wiki.winehq.org/BenchMark-0.9.5
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The problem is that Wine has only rudimentary support for DirectX - at least the last time I checked.

    Another problem is that I just can't get it work

    My advice is to use SDL and OpenGL, then the program ought to work everywhere. Not that it will save you the testing.
    Last edited by CornedBee; 03-10-2006 at 04:25 PM.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by CornedBee
    The problem is that Wine has only rudimentary support for DirectX - at least the last time I checked.

    Another problem is that I just can't get it work

    My advice is to use SDL and OpenGL, then the program ought to work everywhere. Not that it will save you the testing.
    yeah, wine's DirectX support still isn't the best...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  15. #15
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    if you hate Windows so much be a man and take the hit of not developing for it.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI library that works on windows and linux?
    By Logan in forum C++ Programming
    Replies: 2
    Last Post: 04-28-2006, 08:40 PM
  2. Compiling Linux kernel on Windows
    By jmd15 in forum Linux Programming
    Replies: 9
    Last Post: 04-10-2006, 07:28 AM
  3. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-21-2006, 11:23 PM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  5. Linux vs. windows
    By MicrosoftRep in forum Linux Programming
    Replies: 1
    Last Post: 03-20-2002, 01:42 PM

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