Skip to main content
gamedev.net
🔒 Locked

directx 2d

Started by pcvsee 5 replies 400+ views
Original Post
pcvsee
pcvsee
is it possible to create 2d games using directx 8 api''s? since ddraw and d3d has been combined, and when initializing an object or surface, it is assumed that you will use it for d3d, can i still use surfaces for 2d purposes? the sdk document never mentioned using directgraphics for 2d purposes.
Snyper
Snyper
You can still make a 2d game using directx 3d 8. All you have to do is ignore the z axis. And d3d 8 dont use surfaces anymore, at least you dont see them now. So you will now just work with polygons an such. Like OpenGL. So if you wanted to display some character, you would just set up a small quad (2 triangles) of what ever size you need, and texture map the picture (of your character) on that polygon(s), then render it.

-Snyper
=============================Where's the 'any' key?=============================
Snyper
Snyper
Also just to let you know. Just b/c you have the new SDK, doesnt mean you cant use the older DirectX interfaces. If you still wanted to use direct draw. Just use the IID_IDirectDraw7 interface like you have always did. But if you use d3d 8 to do your 2d game, it will prolly go faster b/c of hardware acceleration.

-Snyper
=============================Where's the 'any' key?=============================
pcvsee
pcvsee
thanks for the advice. but if i were to use d3d 8, that would mean that all my characters, landscapes, objects, etc. will be made up of meshes. i think this is all too much just to create for example an 2d isometric rpg or something else. isn''t there anyway to use bitmap images to use as your sprites? i think i''m gonna have to quit 2d programming and start taking 3d seriously.
furby100
furby100
If you use the identity matrix as your projection matrix and use D3DFVF_XYZRHW (pretransformed 2D vertices) and no Z-Buffer etc.... blah blah you''ve probably read all this stuff in another thread.... I''m putting it in the FAQ.



Please state the nature of the debugging emergency.


sharewaregames.20m.com

furby100
furby100
PS. Quad is now a supported primitive, you no longer need to use two triangles. I knew MS would see sense eventually.



Please state the nature of the debugging emergency.


sharewaregames.20m.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.