Breathing New Life Into Old DirectDraw Games
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."
I haven't read TFA yet
but wouldn't this have been a prime use-case for Wine on Windows?
See for example DOSBox: it lets you run old games with near-perfect results, and running them in DOSBox is much, much, much easier than getting them to work on a real DOS machine was, back in the days.
Funny you should mention DX3. Microsoft actually removed some surface caps flags in the transition from DX3 to DX5, and silently flipped the orientation that .BMP files were loaded (i.e. loaded them 'right way up' rather than 'upside down' as they're stored in the file). I know that was like three ice ages ago in Dev Years, but it still hurts when I think about it.
I realise that TheFineSummary talks about Windows 7, but there's still a fair number of XP boxen out there, for which Direct2D isn't an option. That said, I'd guess (as the article is down) that it's more of an ideological position, or - given that it's clearly a hobby project - just what the author is familiar with, or enjoys using. Given that we're talking about playing games here, I'd go with the latter explanation.
I do intend to RTFA when it recovers, since I find replacing/subverting dlls quite fun. I kludged up some code a while back to create a shim dll that can be used as the basis for selectively replacing functions in dlls, while calling through to the 'real' one for the other functions, so you can easily hack some functionality without having to re-implement the whole thing.
If you were blocking sigs, you wouldn't have to read this.
Minecraft is the most fun I've had in a computer game for years, and practically everyone I have shown it to has downloaded it and become obsessed - yet the graphics are kind of shit - but even then, it requires a reasonably modern computer to run quickly (drawing millions of cubes is quite time consuming, I guess - does anyone know how he draws everything so efficiently? Does MC only render blocks that are unoccluded? If so, how does it figure that out? I'm really intrigued by the tech behind MC). I wonder if the game would be more fun if it had better graphics? I kinda think it would.
Two years ago I went through this process on Windows Vista, and I realized later you didn't need to install DX9. The root problem was that the default DX10 installation on Windows Vista was missing older DX components, including DirectDraw. DirectDraw could be installed by manually reinstalling the DX10 runtime. Is it the same on Windows 7?
Heads up for combat soldiers family and friends, get a grip. Stress is one thing, wigging out is another and helps no one.
Plenty of combat soldiers/Marines/airmen game in-theater! Deployments have loooooong, boring stretches and gaming is a popular distraction.
"This post is an artistic work of fiction and falsehood. Only a fool would take anything posted here as fact."
5 slaves, each rendering 1920x4800. Each machine is a single E5530; 2xFX1800; 4GB memory. Luckily, I have a totally excellent colleague who helps me with the networking/file server config (when he can find the time).
We find it much better to compress the data prior to network transmission and perform a parallel decompress on arrival to the clients. Not exactly rocket science.
Thanks man.
.
Indeed, in fact, this was precisely one of the problems DirectX was always designed to solve from the start, it was designed to provide a multimedia API that could both move with the times and retain backwards compatibility.
Issues with older games tend to come down to hardware specific optimisations, obsolete libraries such as Glide, or OS specific code.
For the most part, stuff written with Microsoft's officially provided Windows APIs even back to Windows 95 (and sometimes even further back than that) tends to still run. It's the stuff that doesn't use those APIs that often causes the problems.
For better or worse, backwards compatbility is one thing that Microsoft certainly does tend to get right most the time. It's just that companies often ignore backwards compatibility when building new apps and just build for the now. Sometimes this is excused, i.e. game companies doing low level optimisations to improve performance, other times it's some MBA falling hook line and sinker for the sales pitch of some fly by night company providing an obscure set of code libraries and mandating all his developers use it.
I still have apps I wrote in C using the raw Win32 API back in 1995/1996 that work absolutely fine to this day.
Chances are if a game doesn't run, DirectX version is the least of it's troubles.
I kludged up some code a while back to create a shim dll that can be used as the basis for selectively replacing functions in dlls...
A slightly more sophisticated solution would've been Detours.
Or, if you didn't feel like coding, WinAPIOverride32.
For what it's worth, I have Q3 Arena running on XP in a VirtualBox VM, under 64-bit Fedora. It's all running on an Acer 5536 laptop with 4Gb ram and an ATI 3200 video chipset. It's not state of the art, not high-end, and it still runs fast and smoothly - far more so than the original hardware which introduced me to this game. I appreciate the merit of your comment, but draw your attention to Moore's Law.
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.
I agree with this completely. I've recently been playing a fair amount of STALKER -Shadow of Chernobyl, and -Clear Sky lately.
The realism of the gameplay is partly due to realism in graphics and sound. Although at the same time, the world you are in is so open, and you are free to explore as you want/need to.
You are, after all, in a real place that actually exists. If you've seen pictures of the area around Chernobyl since the accident, then you'll recognize a lot of places as you play through the game. You'll be walking around, stop to chat to someone, hear a dog bark in the distance, a crack of thunder and it will start raining...then a radioactive mutant will be trying to rip your head off.
Many FPS games guide - or force - you to the next objective, so you don't have the opportunity to look around, find interesting places, and interact with many different characters in the game world.
This game is completely different. You can spend days walking, exploring, collecting goodies, not do a single mission, and it doesn't leave you thinking "I've not progressed any in this game."
I guess what I'm getting at is, good graphics and sound can certainly enhance a good game. But at the same time, no matter how good the graphics are, a crappy game is still going to be crappy.
"City hall" in German is "Rathaus" Kinda explains a few things......
... yet for some, it still continues today. You never get over seeing that much tea, man.
I know, I was there and it haunts me every day.