Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

Check out my tutorial on Direct Draw

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

Advertisement
Direct draw will not be in direct x 10 and also I will not be using direct x 10 for now because direct x 10 only emulates the older versions.
Second I am just learning programming so it is a tone easier to use direct draw because you won’t have to know a ton of math. Also you can still make cool games like aoe 1 and 2 and that is what type of game I am trying to make. I don’t want no fancy dancy same as every one else 3d type game. Also I have people emailing me on how to use direct draw so I am trying to write a tutorial for them.

[Edited by - kingpinzs on January 11, 2006 3:05:07 PM]

Share this post


Link to post
Share on other sites
tone = ton (English/US) or tonne (metric)
anyway carry on.

edit: oh don't forget:

#include WIN32_LEAN_AND_MEAN
//then
#include <windows.h>
#include <windowsx.h>


and why a windowed mode?

Share this post


Link to post
Share on other sites
The reason I picked windowed mode is because it took me a few months to figure out how to display direct draw in windowed mode with clipping. And once you get windowed mode full screen will be so much easier..

also does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?

Share this post


Link to post
Share on other sites
In an encouraging way, it is more like an over commented program.

For example, this code description:-

[source lang=cpp]
//Create the primary surface to be drawn to the screen
DDSURFACEDESC2 ddsd;

ZeroMemory(&ddsd,sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE ;

g_pdd->CreateSurface(&ddsd, &g_pddsprimary, NULL);

ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;



doesn't really explain anything about what is actually happening. ie. why is this -- ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; -- needed? or, what is the NULL in g_pdd->CreateSurface( ... ) replacing?

It is good for those who have previously studied DD, but if you are intending for beginners, I would suggest being a lot more thorough. Explain anything and everything short of the C++ language itself.

Showing and describing structures etc... is also a very good idea. Functions, types etc... should also all be described.

Share this post


Link to post
Share on other sites
Quote:
Original post by kingpinzs
also does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?


It basically cuts out 'uncommon' things from the windows API from your program, thereby making your program smaller and possibly compile faster.

Share this post


Link to post
Share on other sites
Quote:
Original post by kingpinzs
also does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?




Correct me if I am wrong here, but isn't it supposed to be:

#define WIN32_LEAN_AND_MEAN

?

-AJ

Share this post


Link to post
Share on other sites
Good tutorial. I am just going over Direct Draw after not having worked on it for a while, and its helped a bit. Take the advice others in this thread have given you though to make your tutorial even better, especially in regard to the explanation of the flags your passing rather then giving a vague explanation of what the function does.

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!