Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Basic DirectX Help w/ Asteroids type game

This topic is 6723 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

Hey, I''m a fairly good c++ programmer and am taking on the challenge of writing my own asteroids clone to keep my programming skills up over the summer. I have a plan for my asteroids game, but don''t know how to even draw a white line in DirectX. Could anyone help me out. Thanks a lot for any info. -CaptainNemo

Share this post

Link to post
Share on other sites
Well ,

programming directx can be rather complicated then simple..

u have to initialize a DDraw Object
get a pointer to a IDirectDraw interface
create a flip chain and some sufraces

and u dont have putpixel and drawline routines....u have to make ur own like in the beginning of programming

but u have extra fast blit routines, colorkey and direct video memory adress access to help u....

Add COM object interfaces and pointer of pointer of pointer to this mix...

As u can see its pretty complicated ...but i think no problem for an experienced C++ programmer ....

If u still wanna do it...fell free to ask more pertinent Questions...


Share this post

Link to post
Share on other sites
There are a number of books on the subject, but I think the easist is to download the SDK and work through the tutorials. The SDK can be downloaded [url=http://msdn.microsoft.com/directx/downloads.asp]here[/url]. Hum, hope that is right for embedding a link. If not sorry. The sdk is 128MBs so if you have a slow connection then it might be worthwhile to buy a book like "Teach Yourself DirectX 7 in 24 Hours" which has the SDK on CD-ROM. The SDK includes a sample asteroids game called donuts.

Ignore all the rest of the doc and select DirectDraw\DirectDraw Tutorials\DirectDraw C/C++ Tutorials and start with Tutorial 1. They only cover the highlights of each application so you need to look at the source code. After you work through the tutorials for DirectDraw you will have a basic understanding of DirectDraw. Like the person above said there are no GDI functions in DirectDraw, but you can get a device context so that you can use the GDI. It kind of defeats the purpose of DirectDraw, but even drawing a diagonal line effecently can be challenging starting out.

Share this post

Link to post
Share on other sites

  • 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!