Basic DirectX Help w/ Asteroids type game

Started by
1 comment, last by CaptainNemo 23 years, 10 months ago
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
Advertisement
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...

Bogdan
obysoft
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 here. 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.
Keys to success: Ability, ambition and opportunity.

This topic is closed to new replies.

Advertisement