How to do 2D in DX8?

Started by
10 comments, last by Spartacus 23 years, 1 month ago
quote:
should I cover COM before I move into using DirectX, or will my learning DirectX teach me the basic COM principles?


You need to understand the "principles" of COM. That is, that it is backwards compatible (DX3 games work on DX8 machines). It is usefull for more, but not really for tetris games...


quote:
I rushed over to Microsoft''s site to see if I could get a 7.0 SDK, but I only saw listings for 8.0


I think you can type #define DX_VERSION 7.0 or something similar at the top of your header and DX8 will act like DX7. You then use the IDIRECTDRAW7 interfaces etc etc. Well... at least that''s what I used to do to make DX7 work like DX5 (to use andré''s books =)


quote:
As far as using Direct3D to perform 2D operations... is it easy, and will I be able to create, let''s say a full blown 2D platformer, using Direct3D?


D3D is very good for 2D work, as stated previously. All you really need to understand to get started is that instead of defining a sprite by having an X,Y coordinate and a Width and a Height (ala DDraw) you define it by it''s vertices (corners). It is not much of a change in logic, but you _do_ have to type different things to initialise it

Once you get a little more advanced, you will realise that you can do lots of stuff using simulated, DX8 2D, that wouldn''t be possible (at an acceptable speed) in DDraw, like alpha blending, billinear filtering for scaling, stretching (parralelograms - impossible in DDraw?) , rotation, ahh the list goes on =)<br><br><br><BLOCKQUOTE><font size=1>quote:<hr height=1 noshade><br>And if so, will my users be required to have 3D hardware to benefit from the Direct3D implementation? or in the case that they don''t will it all fall on software rendering? <br> <hr height=1 noshade></BLOCKQUOTE></font> <br><br>Yes. If the user doesn''t have a 3D card, DX will simulate 3D emulation. It won''t be terribly fast, but seeing as Microsoft have fully paid coders working round the clock on this, the software engine is probably pretty good anyway.<br><br><br>Err.. i have probably confused more people than I have enlightened… but anyway… have fun!<br> </i>
Advertisement
gasp... that was me... twice in 1 minute that''s a record!

This topic is closed to new replies.

Advertisement