Jump to content
  • Advertisement
Sign in to follow this  
nex7

moving to directx advice please

This topic is 4825 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 have a small iso engine and am porting it to directx from GDI... now..From my understanding the way to do this is to create a quad and set it to the size of the screen...texture it...and then draw to that texture just like i would in GDI Am I going wrong here or is this the way to do it in directx 9? i dont want any 3d.

Share this post


Link to post
Share on other sites
Advertisement
The general approach is to take your 2d artwork (tiles, sprites, etc) and load them as textures in d3d. Then for each object on the screen create a quad and texture it with one of your sprite textures. Updating a texture and drawing that texture to the framebuffer each frame will be much slower than using the hardware accelerated pipeline to composite your sprites into the scene. You might use a fullscreen textured quad for something like a background image behind the sprites though.

For an isometric game you have another option for the tiles. You could set up an orthographic projection with the same orientation as the sprites. Then draw square quads for the tiles and they will appear as diamonds due to the transform. Reset to a top down ortho projection and draw your sprites as normal. This allows you to use square textures for the sprites and avoid some of the work of dealing with diamond tiles.

Share this post


Link to post
Share on other sites
ugh..that is so much more work lol.

so for each tile...i would create a new quad...and texture it...ok

then lay em down looking straight down at the quads. i assume i would use some alpha blending to get rid of the area around the diamond then position the quads so that the diamonds line up. yes?

now for scrolling i would have to then remove quads from opposite my move direction and add them in the move direction.

how would this work for layering...normally to get several different things on a tile you would layer the tiles...would i then render another quad on top of the other one...or would i use Sprites for everything but the terrain?

thank you!

Share this post


Link to post
Share on other sites
Since you say you don't want to get into 3D, you should use DirectDraw 7 instead of DirectX Graphics 8 or higher, that way you don't have to get into 3d at all.

DirectDraw and Direct3D used to be 2 different APIs, but for version 8 and up, they have been merged.

Because of this merger, you will have to get into 3D to some degree if you want to use DirectX 8 or 9.

But since your game was made in GDI, you are probably not going to be able to compleletly port it to DirectDraw. Try to creep away from GDI as much as possible. [grin]

Share this post


Link to post
Share on other sites
thanks for the advice...

i have a version working in directdraw but every time i write code i always see...DEPRECATED!!! and that worries me.

should i be worried about this?

you guys are great :D

Share this post


Link to post
Share on other sites
I mean they killed it man...heartless!!! heartless i say!!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/ref/microsoft.directx.directdraw.asp


Warning: Microsoft® DirectDraw® has been deprecated. Deprecated components of Microsoft DirectX® 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.

Share this post


Link to post
Share on other sites
I suppose that this is for directx 9 and as you stated they have been merged...but i dont want my apps to be limited by deprecated api...

i can see it now...

my poor app being deprecated right along with direct draw. The future...gotta think about the future!

Share this post


Link to post
Share on other sites
But seriously, if it were me, I wouldn't worry about it, the simplicity and thus lowered development time makes up for the future incompatibilities, but thats just me. [wink]

But if you want some money for this game, or it is very important to you that it works for 253 years to come (exaggeration), then yeah, go the 3d route.

Quote:
Warning: Microsoft® DirectDraw® has been deprecated. Deprecated components of Microsoft DirectX® 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.


I don't really know, but I'm sure that microsoft been saying this for years.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!