Archived

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

Which is better way to learn???

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

I was just wondering which it better to learn: *DirectDraw 7 then after that Direct3D or DirectGraphicd(whichever you perfer). or *2D stuff in directgraphics and then the 3D stuff in direst graphics. The reason i want to learn 2D is i want to make a starcraft type game and it is easier to learn 3D if you know 2D. Please give your reason behind your repley.

Share this post


Link to post
Share on other sites
2-d stuff using D3DXSprite instead of DirectDraw.

Reasons: easy alpha blending, transparency, scaling, etc.. Not to mention that DirectDraw could be consider deprecated. D3DXSprite is so easy.

Also its rather efficient. I''m getting about 3300 frames per second on a super mario clone I''m writing for fun.

Share this post


Link to post
Share on other sites
Well DirectDraw doesn''t take very long if you want to learn it All it really does is copy memory chunks... everything else you have to do yourself. Whether you want the latter experience is up to you.

Just ask yourself, do you simply want to use the high-level routines or do you want to understand them, by experimenting yourself? That said, your game may not require anything more complex than simply blitting, in which case it would be wasteful to bother with DirectXGraphics, and especially limit yourself to power-of-2 textures (ick... still the worst thing by far about method 2).

I''m not advocating either way... it all depends on what your plans are.

Share this post


Link to post
Share on other sites
Yes, I am knit picking... but D3DX does not require power of 2 bitmaps. Though internally its a power of 2, in the interface its quite irrelevant. You select a view/dest rect to display.

That said, I still use power of 2''s for two reasons:

1.I''m used to it, and so I know how they will "come out".

2. It should be more memory effective since using non-power of 2''s just results in the next largest power of 2 being used

Outside of that, yes Direct3DX can do alot for you. But why this is a bad thing and you would want to code non-hardware accelerated color keying, blending, etc.. is beyond me. Out of curiosity, does DirectDraw support sprite rotation/scaling?

Share this post


Link to post
Share on other sites
Lo,

DirectDraw supports scaling but not rotation, well actually DirectDraw does support rotation but no graphics cards work with it. Which Sucks.

Cya...

Coin



[edited by - Coin on May 8, 2003 9:10:34 AM]

Share this post


Link to post
Share on other sites
Actually, it really depends on your current skill level. If you are relatively new to programing, then I wouldn''t suggest trying to learn game programming right away. It is better to learn how to program all the different parts of a game seperately. Once you have good understanding of all of the different parts, then putting them together to form a game will be cakewalk.

I would suggest taking time creating your own programming libraries. I would suggest making classes for images, sound/music, various ADT (Abstract Data Types) like linked lists and trees, various mathematical structures and their operations, and anything else you might find useful. While creating this library, I would stop to use what you have developed to form small applications. Basically, you want to do things you know you can complete. Maybe you can create a mp3 player with a track-list. Maybe you can create a small drawing program. Maybe you can create a graphical screen-saver. How about making a program that playes movie files?

If you try learning in this fashion, you will find that you will develope better-structured code faster than most people. You will also develope a good practice of using and updating code that you have already completed. You also don''t spend a majority of your time just writing the same code again and again. If you try to develope some kind of game engine in the beginning, then it will probably never be used. You would most likely realize how bad the code is.

As for choosing between Direct3d or Directdraw, I would say that you should use neither. Directdraw is dying out, and Direct3d shouldn''t be tackled until you have a good understanding of programming in generel (Otherwise your code will blow!). If you want to learn some graphics techniques, then I would suggest starting out with GDI or GDI+. OMG, why in the world would I suggest that? Well, GDI is used in pretty much every windows desktop application. Also, in the case of GDI+, Microsoft is actually focusing on GDI+ as it''s main 2d focus. In fact, it actually has support for alpha-blending.

Share this post


Link to post
Share on other sites
I would start with DX7 with DirectDraw since it''s lots easier since you don''t need to hunt for 3D meshes and blah blah blah. You can just whip something up in whatever 2D paint program you have and you''re good to go.

Then when you want to move on, go to D3D 7 which can be used on top of DirectDraw so you don''t have to make a blind leap. Then, when you''re comfortable with 3D go to DX 8,9 or OpenGL.

Personally I prefer OpenGL but I''ve used DX8 and it''s not too bad either.

You really want to learn the concepts of game programming first and you only need 2D for that. You don''t want to overload yourself right off the bat with the unneccessary complications of 3D.

Ben

Share this post


Link to post
Share on other sites
Its a good idea to learn DirectDraw first, I think. DirectDraw is way more easy to learn and you can get things working in a less complex way. For example, to start up DirectDraw and set the display mode, you would do this:


LPDIRECTDRAW7 lpdd7;
LPDIRECTDRAW lpdd_temp;

lpdd_temp = DirectDrawCreate(...)


lpdd_temp->QueryInterface(IID_DIRECTDRAW7,&lpdd7);


lpdd7->SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);

lpdd7->SetDisplayMode(640,480,8,0,0);

lpdd7->Release();


Whereas for DirectX Graphics you have to create a whole bunch of additional structures for just setting up!

USE DIRECTDRAW!!!

Share this post


Link to post
Share on other sites