moving to directx advice please

Started by
31 comments, last by tok_junior 19 years, 1 month ago
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.
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.
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!
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]
The G'Bro GameDev Society! -The Southeastern US GameDev Gathering Group
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
DEPRECATED??!?!??!?!?!

what do you mean??!!??!
The G'Bro GameDev Society! -The Southeastern US GameDev Gathering Group
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.
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!
Hey, man, DirectDraw aint goin' nooowherrrrre! [cool]

I don't care what those bureocratic yahoos say! [flaming]

DirectDraw 4life! [grin]
The G'Bro GameDev Society! -The Southeastern US GameDev Gathering Group
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.

The G'Bro GameDev Society! -The Southeastern US GameDev Gathering Group

This topic is closed to new replies.

Advertisement