DirectX 2D but 3D

Started by
4 comments, last by neonfaktory 21 years, 4 months ago
Hey everyone, got a question I was hoping someone could help me with. The game I''m making is a 2D game, overhead deal, BUT, I would like to incorporate the power and speed of 3D elements into it to speed up the processes. Right now my bitmaps don''t support alpha blending (nice sharp edges, woo!) and have to be rotated in software which means huge performance drop in a 2D game! SO, I was hoping someone could direct me to a nice tutorial or especially some kind of wrapper that handles the nitty gritty of the 3D environment. Just keep in mind what I want to do is VERY simple - probably wouldnt even require TRUE 3D elements, just 2D sprites rendered how they are in 3D. As of now how DirectX handles 3D is way above my head and I really don''t want to mess with system stuff - I''ve got about half of my game programmed in DirectDraw, but the limitations I''m experiencing have made me want to switch over to something prettier. Thanks for any help you can provide!
weee!
Advertisement
Your answers lie with ID3DXSprite. Now you have alpha blending, sprite rotation, and scaling at the your command.

- master_ball

----------------------------
We R 138
-- master_ball --------------------------------student seeking future game dev career, advice welcome
Yeah, ID3DXSprite is your best bet (for now). After you get comfortable with that interface, you might want to look at creating a textured-quad interface. In the long run, it will be more powerful, and probably faster. I am currently using ID3DXSprite, but will start working on a better engine soon. Good luck!

-Mike
Hey thanks, but is that included in DX7? That''s currently what I''m using because I hear DX8 changed alot... Took out DirectDraw or something? Anyway, I can''t seem to find it in the DX7 documentation, and would also have NO idea how to implement that... like what needs to be created in order to use "Draw" and use those parameters. I''m not very DX savvy, and have been using a wrapper to get as far as I have because I wanted to get right into the game programming instead of all the setup and system stuff ;(. If i was smarter I would probably find that more helpful, haha, but thanks - if it comes down to it I might try converting to DX8 or something because that looks like exactly what I''m looking for... but I think I''d be lost without my precious, precious wrapper
weee!
No its not in Dx7. ID3DSprite is only part of DX8 to help people used 2D in a 3D environment (cause with Dx8 there isnt any DirectDraw). ID3DSprite probably does exactly what your wrapper does (but in 3D env), with the exception of destination blitting (which annoyed me).

Anyway, if you wnat to used 3D, there is two ways to do this:
1) Use Dx7 Direct3D Intermiediate mode and emulate 2D (Nehe tutorial on Opengl has the theory to do exactly the same in Dx)
2) Move onto Dx8 (Recommended) that way you can use ID3DSprite (a wrapper object in reality) to do 2D and have 3D stuff to work with.
Anyone have a nice link for where to learn D3DX stuff? I''m sure I can find one if I hunt, but if anyone knows anywhere nice and fast, that''d be cool. I tend to find the SDK Documentation confusing at times...
weee!

This topic is closed to new replies.

Advertisement