Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Classic Games (Games) Graphics Software Windows Games

Breathing New Life Into Old DirectDraw Games 274

An anonymous reader writes "I bought a bunch of old Wing Commander games for Windows, but they use DirectDraw, which Microsoft has deprecated. They don't work too well under Windows 7, so I ended up reimplementing ddraw.dll using OpenGL to output the games' graphics. I wrote an article describing the process and all the fun workarounds I had to come up with, and released all related source code for others to hack on."
This discussion has been archived. No new comments can be posted.

Breathing New Life Into Old DirectDraw Games

Comments Filter:
  • by Dexter Herbivore ( 1322345 ) on Tuesday September 07, 2010 @02:29AM (#33495436) Journal
    and we didn't need gimmicks like motion controllers, photo-realistic graphics and high framerates to enjoy them.
  • Or you could (Score:3, Insightful)

    by Rosco P. Coltrane ( 209368 ) on Tuesday September 07, 2010 @02:31AM (#33495462)

    use an older version of Windows in a virtual machine.

  • by Anonymous Coward on Tuesday September 07, 2010 @03:07AM (#33495638)

    You must be a real hoot at parties.

  • Re:Or you could (Score:3, Insightful)

    by M. D. Kristopeit ( 1890086 ) on Tuesday September 07, 2010 @03:19AM (#33495690)
    NOT INSIGHTFUL. virtual machines are NEVER the optimal solution. ddraw.dll has been reimplemented at the lowest level... given that, why would anyone choose to rather use a virtual machine?

    the only appeal of using a virtual machine was to a lazy developer WHO DIDN'T WANT TO DO IT RIGHT.

    thanks story submitter... glad someone out there still understands, and has some pride left.

  • Re:Or you could (Score:5, Insightful)

    by dintech ( 998802 ) on Tuesday September 07, 2010 @03:25AM (#33495716)

    But to run Wing Commander on modern hardware, it doesn't need to be optimal. 80/20 rule dude.

  • Re:Wine? (Score:5, Insightful)

    by advocate_one ( 662832 ) on Tuesday September 07, 2010 @03:30AM (#33495736)

    "Funny you should mention that..." I blew this morning trying to get some old PS2 hacking apps running on Wine. In the end I just installed w98 on a spare box. Wine is classic YMMV. It's a good, worthy project, but man, you just can't _count_ that's it's going to deal with even small old VB6 apps ahead of time. Use restraint for recommending it unless you've done exactly what's being discussed.

    what seriously pisses me off with WINE is that something works with one version of it, but breaks in the next... the database is almost useless with regards to being kept up to date and I'm too old for all this hassle now... and there's TOO much emphasis on having the very latest game running on it to the detriment of making sure other games don't become broken by changes made to support the latest and greatest...

  • by Suiggy ( 1544213 ) on Tuesday September 07, 2010 @03:35AM (#33495766)
    Yes, DirectDraw still exists on Windows 7, ddraw.dll is still there, and the headers are still a part of the Windows SDK and DirectX SDK. The problem is that graphics card vendors no longer care to test that their drivers work properly with DirectDraw, so it's really hit or miss if you get support.
  • Re:Or you could (Score:5, Insightful)

    by kinema ( 630983 ) on Tuesday September 07, 2010 @03:38AM (#33495784)
    What is learned by simply booting up a VM and loading a game? In the story submission he specifically mentioned "all the fun workarounds" that he had to come up with get everything to work on a modern system. Don't you think doing a cleanroom reimplementing a subsystem like DirectDraw presents a great learning experience?

    No, I wouldn't have done this if you had payed me; I have my own interests and passions. I'm not at all interested in graphics programming or for that matter video games, though, apparently someone is and I think it's great that he saw a problem and decided to attempt to find a solution for it.

    This is what being a geek is all about. Bravo.
  • Re:Wine? (Score:5, Insightful)

    by bmcage ( 785177 ) on Tuesday September 07, 2010 @04:30AM (#33495988)
    Wingcommander ran great in wine last time I played it in 2008. I suppose windows developers don't follow linux development?
  • by Achromatic1978 ( 916097 ) <robert.chromablue@net> on Tuesday September 07, 2010 @04:40AM (#33496032)

    My bottlenecks are network supply (10Gbps to five clients with dual network ports and jumbo frames not sufficient).

    Well, yes, I'm not entirely surprised your system has trouble pushing tens of gigabits of data whilst reading from a ten TB dataset and live-rendering 3D on a bank of 3 x 3 3200x1600 screens. All this on a side project "when you find the time", too, impressive. To the best of my calculations you'd have what, 7 PCI-E slots?

  • Re:Wine? (Score:2, Insightful)

    by Anonymous Coward on Tuesday September 07, 2010 @04:58AM (#33496120)

    there's TOO much emphasis on having the very latest game running on it to the detriment of making sure other games don't become broken by changes made to support the latest and greatest...

    You aren't really proposing an alternative though... Automated testing is practically impossible and manual testing is a huge, huge job if it means play testing thousands of games before every release. just saying "don't make mistakes" is not useful.

  • Re:Or you could (Score:5, Insightful)

    by Your.Master ( 1088569 ) on Tuesday September 07, 2010 @05:17AM (#33496166)

    It's only already done if the only ddraw game you want to play is Wing Commander 1-4 (Windows versions). And only with conventional monitor setups and only if you never want to capture the window content, due to the kludges involved. And if you can stand the known bugs he mentioned, eg. the blinking screen effect described in Wing Commander 4.

    So basically, it's only already done if you want a suboptimal experience. But you were just talking about how you wanted an optimal solution, and how a solution that basically works better than this is "never" the optimal solution. To be fair, it sounds like 1-3 work pretty well, but for 4 you have to put up with some crap. And any other ddraw game is unlikely to work all that well.

    This is a fun an interesting reverse engineering project. Stop being such a prick about it.

  • Re:Wine? (Score:5, Insightful)

    by mr_mischief ( 456295 ) on Tuesday September 07, 2010 @05:21AM (#33496188) Journal

    Automated testing of all the applications is pretty much a nonstarter. However, automated regression testing to make sure function calls with the same arguments in the same context don't give different results just because you debugged a different set of arguments or in a different environment are easy to do with a proper test harness. The hard part is mapping the applications to test cases, but that's not impossible, just time consuming and somewhat difficult.

  • by Anonymous Coward on Tuesday September 07, 2010 @05:22AM (#33496200)

    He said "At the time", and since he bought it in 1998 - at the time means that his friend was in war in 1998 ... so your explanation is very improbable ...
    It doesn't matter. Reason of my posting is to correct the prejudice about my country. In 1998 there were no combat zones in Bosnia and his friend could not be in danger in any way that could be presented in a game about war.

  • by Anonymous Coward on Tuesday September 07, 2010 @05:43AM (#33496302)

    Maybe you should take a look at what Direct2D and DirectDraw does before making some silly assumption that Direct2D is more suitable for simulating DirectDraw behavior.

    Direct2D effectively acts as a hardware acclerated scanline renderer, so it is more comparable to GDI than DirectDraw. DirectDraw surfaces are actually much closer in design to Direct3D and OpenGL textures. So your real question should be why he didn't chose Direct3D instead. My guess is that he liked OpenGL's API better and this is about fun after all - nobody was paying him.

  • Re:Wine? (Score:3, Insightful)

    by gmthor ( 1150907 ) on Tuesday September 07, 2010 @05:56AM (#33496360)
    The Problem with Wine is, that from the user point of view, it is extremely unstable. It tried it out a couple time with games that had Gold or Silver status. None of them worked with the version I tried.
    I think I would be really worth it, to stop developing more features for a while and add as many regression tests as possible to the project. So that the project gains stability. Since in the end, the real success is always determined by the end user.
  • by tehcyder ( 746570 ) on Tuesday September 07, 2010 @06:00AM (#33496364) Journal
    Did you not know that it was a space combat game?
  • Comment removed (Score:3, Insightful)

    by account_deleted ( 4530225 ) on Tuesday September 07, 2010 @06:44AM (#33496492)
    Comment removed based on user account deletion
  • Re:Wine? (Score:2, Insightful)

    by Josh04 ( 1596071 ) on Tuesday September 07, 2010 @06:54AM (#33496520)
    You call that a ridiculous wine bug? No, this:

    http://bugs.winehq.org/show_bug.cgi?id=421 [winehq.org]

    is a ridiculous wine bug.
  • Oh stop (Score:5, Insightful)

    by Sycraft-fu ( 314770 ) on Tuesday September 07, 2010 @08:37AM (#33496948)

    The "Back in the day things were so much better," stuff gets annoying no matter what it is about and games are no exception. Were there good games back in the day? Sure were. Guess what? There were also bad ones, you just don't remember them as well. This is in part because our memory tends to deliberately filter out bad experience, but mainly because good games you played a ton, bad games got set aside.

    Know what else? There are good games now. The modern graphics and so on have not stopped people form being able to make good games.

    Also I don't like this elitist "purist" thing that people pretend to of "Oh I don't even like the graphics, I just want good gameplay." Guess what? The graphics and sound can well be a part of that. When games are visually appealing it can add to the immersivness. It is easier to lose yourself in a convincing world.

    So stop getting all "Get off my lawn," about games. There are great old games and you can still enjoy them with the help of emulators. However don't hate on new games just because they look better. That is not a bad thing, it is a good thing.

  • Re:Oh SNAP! (Score:3, Insightful)

    by pandaman9000 ( 520981 ) on Tuesday September 07, 2010 @09:35AM (#33497386)

    You are in with the old crowd here. S.T.A.L.K.E.R. is a few years old, except for Pripyat, and even then the graphics are the most dated part of the game.

    And, yes, gameplay is what really matters. I still break out M.U.L.E. occasionally, and, guess who joins? My hardcore gaming kids, aged 8, 12, and 14.

    Read that again: Game play IS the top priority in a game's longevity.

    M.U.L.E.
    Age of Empires
    Age of Mythology
    DOOM/DOOM2
    Freelancer
    Serious Sam
    Oblivion
    Rainbow Six 3: Raven Shield
    Counter Strike (Half-Life1 AND 2 versions)
    Quake, Quake2 CTF

    These are just a few that drive home the "game play matters" idea. Notice how almost all of those are over 5 years old? My guess is that it is that we are in the era of "Milk the online play", and past the "Make it worthy of replay" era.

  • Re:Wine? (Score:3, Insightful)

    by Urza9814 ( 883915 ) on Tuesday September 07, 2010 @09:37AM (#33497406)

    Have you ever tried to use Wine in Windows? Last time I attempted was a couple years ago, but I remember spending hours trying to get the damn thing to work, only to eventually just give up. Wine is great on Linux, but the processes to get it installed and to use it for Windows could be greatly improved.

  • Re:Or you could (Score:3, Insightful)

    by CarpetShark ( 865376 ) on Tuesday September 07, 2010 @09:51AM (#33497508)

    older computers are as cheap and plentiful as dirt

    You're kidding me. The effort to get an old computer, set it up, install the crappy old OS from slow floppies/CDs, mess around with limited memory and IRQs and realising at the last minute that you can't just transfer over wireless or USB... it'd be cheap if your time is worth nothing. Otherwise, running a VM (or just about any other method) is probably faster. I'd love another physical amiga, but I know I'd never use it, next to having a copy of UAE.

  • by MobileTatsu-NJG ( 946591 ) on Tuesday September 07, 2010 @11:50AM (#33498524)

    ...and we didn't need gimmicks like motion controllers, photo-realistic graphics and high framerates to enjoy them.

    Oh please. Wing Commander was that game you played when you had just dumped a large sum of money into a new computer system and wanted to show it off. VGA graphics, expanded memory, Sound Blaster, megabytes of graphics, multi-media CD-ROM, FMV, etc. That was the one game you always had an optimized boot floppy around for. "Didn't need gimmicks*" my ass, I bet you bought the speech pack for it!

    The games were fun, but let's be realistic, none of the Wing Commander games were intended for modest machines.

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...