Jump to content
  • Advertisement
Sign in to follow this  
TimChan

Is using DirectDraw enough?

This topic is 5050 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

are Isometric games(say DiabloII, Age of Empire...) only made with ddraw? [Edited by - TimChan on August 19, 2004 10:04:41 AM]

Share this post


Link to post
Share on other sites
Advertisement
Diablo II had an option to use D3D. I think it was primarily used to improve lighting effects. I don't know about other specific games, but I do know that doing 2D games using a 3D API is definitely a viable option, and has many benefits over using a 2D API. The biggest downfall is that it is usually a bit more complicated to get the basics working. But once you have the basics working fine, a lot of stuff becomes a lot easier.

Plus, 3D APIs are still up-to-date and active, whereas 2D APIs, especially DirectDraw, are becoming old very quickly.

I would recommend at least considering using a 3D API for any 2D game you might make. I think someone found a bunch of useful links on the topic... in this thread.

Share this post


Link to post
Share on other sites
I would say it is 'iffy' as to how long DirectDraw will stay around.

Our solution to the problem was to make our engine be able to use 'any' api through an adaptor interface system, while this system provides great flexibility in the choice of API, it also imposes some harsh constraints (mainly every api adaptor needs to support the same function set, or you get feature 'spotyness'), I have written 2D rendering code in both DirectDraw and Direct3D, and my summary is this.

Using DirectDraw gives you simple, and fast 2D blitting with color keying, advanced features such as alpha blending, are nearly impossible to implement and maintain speed.

-DirectDraw, simple, no advanced features

Using Direct3D for 2D rendering, at times, felt very overkill and as required me to 'bend' the API at times into ways it felt it did not want to be bent, the main problems were texture size constraints, to be safe you should not create a texture bigger than 256x256 pixels, this means that to support larger images (a full screen background image for instance) you will need to build a system to provide 'large image emmulation' which splits the single large image, into a bunch of smaller ones, and can then draw them as one. The other drawback was the need to batch images by texture, this is very counter intuitive to normal 2D programming, and required the building of a batching system, and required use of the ZBuffer. For all this though, you get, Alpha Blending, Color Modulation, Rotation, Texture Filtering, and managed textures (not lost durring alt-tab).

-Direct3D, hard to implement if your of 2D background, lots of features

I hope this have given you some guidance as for which to use, use the one that bast suits your needs=)

Share this post


Link to post
Share on other sites
For 2D drawing currently I think SDL is one of the best (if not the best) option. Unless you want to use many special features from Direct3D, paying the price of a harder implementation, I'd go for SDL.

It's an alive API, not like DDraw, and features things like Alpha Blending, which you wouldn't have unless you used Direct3D. Even more, SDL is multiplattform, and can be used for audio, input, event management, networking...

If you already know DDraw or other similar API going for SDL is an easy step. After all, the "S" stands for "Simple".

And even when the basic library might not have many functions besides of the basic ones, you can download free libraries that implement almost everything you need (primitive drawing, fonts, loading images from almost any format, rotozoom, etc..)

You can download it freely from: www.libsdl.org

Hope it's helpful for you.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sante05
It's an alive API, not like DDraw


That's a superfluous statement, considering the SDL uses DDraw by default on Windows. The biggest benefit from SDL comed from putting a common interface on mutiple platforms. But even for a single platdform there's a benefit, as you would be implementing most of what it provides anyway.

Share this post


Link to post
Share on other sites
Quote:
Original post by Aldacron
Quote:
Original post by Sante05
It's an alive API, not like DDraw


That's a superfluous statement, considering the SDL uses DDraw by default on Windows. The biggest benefit from SDL comed from putting a common interface on mutiple platforms. But even for a single platdform there's a benefit, as you would be implementing most of what it provides anyway.


It still is actively supported. If Direct Draw support now was to be removed totally from DX in the near future (although perhaps very unlikely), I am quite certain SDL would evolve around this. This could be done either by adapting OGL or D3D, or actually start to write a Windows specific hardware abstraction interface (eg. what Direct Draw currently does).

Share this post


Link to post
Share on other sites
DirectDraw can never, and will never dissappear more than it already has, DirectX has to support it. But it is no longer included in the SDK's officially, you need to dig to find it. This is very unlikely to change.
DirectDraw is fine for any kind of 2D game, you will just have to rethink a lot of effects and stuff that DirectDraw can't do. Other than that, you'll be fine with DirectDraw.
Want a piece of advice though? Go with D3D or OGL, and you won't have to do any compromising.

[Edited by - Bad Maniac on August 30, 2004 5:48:43 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Unwise owl
I am quite certain SDL would evolve around this. This could be done either by adapting OGL or D3D, or actually start to write a Windows specific hardware abstraction interface (eg. what Direct Draw currently does).

This has already been implemented: SDL will automatically switch to GDI rendering if the machine lacks DDraw support.
It seems very unprobable that microsoft would decide to drop GDI within the next couple of decades.

Share this post


Link to post
Share on other sites
Quote:
Original post by doynax
This has already been implemented: SDL will automatically switch to GDI rendering if the machine lacks DDraw support.
It seems very unprobable that microsoft would decide to drop GDI within the next couple of decades.


Not really, since it WILL be dropped when Longhorn arrives.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!