Archived

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

2D with DirectX

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

Hey! I''m just starting to use DirectX, and I was hoping to make a small 2D game. But I’m not really all that interested in knowing the “inner workings” of DirectX; I just want to make my little game. So I started reading some of the tutorials here on GameDev, but most of them are outdated, or someone has commented that the author is doing it all wrong. So I was hoping that someone here could point me to a “newbie”-wrapper for making 2D graphics in DirectX, or preferably a 2D engine. It just has to fairly easy to use. And if possible have network support (if anyone knows of a good up to date DirectPlay tutorial that would be nice too). And of cause it has to be free. (I write in C++ BTW). Thanks in advance for any help. Jacob “Lillemanden” Richardt

Share this post


Link to post
Share on other sites
If you are using DirectX 8 or later and c++ then all you have to do is draw a primitive and texture it or shade it in a color (dx8 and later don''t support 2d graphics like previous versions did). Also if you are looking for a wrapper check out some of the Directx framework files in the samples folder in the SDK directory. They can make somethings such as 2d easier in directx.

r3alityc0d3r
icq: 252463839
r3alityc0d3r@hotmail.com
"I am the Architect. I created the Matrix...Your life is the sum of a remainder of an unbalanced equation inherent to the programming of the Matrix. Which has led you, inexorably... here." Great Architect - Matrix Reloaded

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Lillemanden

But I’m not really all that interested in knowing the “inner workings” of DirectX; I just want to make my little game.




Maybe SDL is up your alley.

Share this post


Link to post
Share on other sites
r3alityc0d3r: That is what i''ve been looking into, but since I have no experience with D3D, it''s not so easy for me to do that.

alnite: That might be what I''ll end up with, but then I won''t have hardware alphablending.

Anonymous Poster: I''ve heard of SDL before, I think I''m gonna take a look at it.

Thanks for the replies.

Share this post


Link to post
Share on other sites
How about using DirecX8's ID3DXSprite and IDirect3DTexture8 interfaces, I think they're fairy simple to use as well as powerfull, and of course there'sthe advantage that you can conbine 2D and 3D

[edited by - j_vitel on October 10, 2003 1:38:56 AM]

Share this post


Link to post
Share on other sites
that D3DXSprite is a good idea. I used it to make a tetris game and worked pretty good. The thing i got hung up on whas how to place them where i wanted them on the screen. enter translation.

r3alityc0d3r
icq: 252463839
r3alityc0d3r@hotmail.com
"I am the Architect. I created the Matrix...Your life is the sum of a remainder of an unbalanced equation inherent to the programming of the Matrix. Which has led you, inexorably... here." Great Architect - Matrix Reloaded

Share this post


Link to post
Share on other sites
In fact, it''s quite simple to use : You just have to set up a orthogonal projection matrix... you then simply put the screen coords as your vertex x and y.

You can use z to do some kind of "depth" sorting for your elements.

Metron

Share this post


Link to post
Share on other sites