Jump to content
  • Advertisement

Archived

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

r3alityc0d3r

DirectX9 and 2D games

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

Is it just me or does Dx9 not do 2D easily? It looks like they took out DirectDraw and Surfaces. Makes making a simple Tetris clone kinda hard. For example, with Dx7 you could load a bitmap on a surface and it would be full screen. Now it seems like I have to load a bitmap as a texture (which has a limit of 512x512) It just seems like Dx9 makes 2D games really hard. Is there something I''m missing here? Any help would be appriciated.

Share this post


Link to post
Share on other sites
Advertisement
have not looked at dx9 yet but they removed 2d from dx8.

I thought they were going to put it back in 9.

if you can''t find any resources on the net for dx9 and 2d there is a lot on dx8 and 2d.

cheers

Share this post


Link to post
Share on other sites
2D(DirectDraw) wasn't removed from DirectX8 and is still present in 9. It just isn't being updated anymore.

[edited by - Xanth on September 21, 2003 7:29:44 PM]

Share this post


Link to post
Share on other sites
huh. I did a search on MSDN for surface stuff. first i searched for IDirectDrawSurface9 and found nothing. I guess they don''t use the same naming convention of past Directx SDK''s. What i did find was the IDirectDrawSurface Interface with no nine at the end. I don''t know why they did this but (shrugs shoulders) its m$. I am gonna see if i can still load a bmp on a surface using this interface. I hope so. make my tetris game look better btw here is the interface description from msdn.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/htm/idirectdrawsurfaceinterface.asp

Share this post


Link to post
Share on other sites
quote:
Original post by r3alityc0d3r
What i did find was the IDirectDrawSurface Interface with no nine at the end.


That''s old school DirectDraw. You probably want to use the Direct Draw 7 interface.

Anyways, I wrote an article on 2d in Direct3D 9 if you want to check that out.

Share this post


Link to post
Share on other sites
DirectDraw 7 is the best choice. Some books still mention it. You may think I am psycho, but why not learn OpenGL or another graphics API for 2D?

Scott Simontis
e-mail:ageofscott@comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites
Actually I want to make future games in direct3. Everyone on the forums says start out with a tetris clone so that is what i am doing. This hopefully will be on of the few 2d games i''m gonna try and program.

Share this post


Link to post
Share on other sites
Have a look here: http://www.gamedev.net/reference/articles/article1838.asp
This is Johnny Watson''s article on how to get started with directdraw.

Yes, the latest version is DD7 so you should only use the 7 interface.

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/vbddref_36g3.asp

this is the directdraw SDK documentation on MSDN, just click the menu on the left for C++. I don''t know why I can''t save that URL... hmmm.



Share this post


Link to post
Share on other sites
About that tutorial from Johnny Watson, I copied it exactly as printed and added the necessary files, but I got the following set of errors while building the VC++ project...what did I do wrong?


--------------------Configuration: dxtest1 - Win32 Debug--------------------
Linking...
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay::UpdateBounds(void)" (?UpdateBounds@CDisplay@@QAEJXZ)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay::CreateWindowedDisplay(struct HWND__ *,unsigned long,unsigned long)" (?CreateWindowedDisplay@CDisplay@@QAEJPAUHWND__@@KK@Z)
dxtest1.obj : error LNK2001: unresolved external symbol "public: __thiscall CDisplay::CDisplay(void)" (??0CDisplay@@QAE@XZ)
dxtest1.obj : error LNK2001: unresolved external symbol "public: __thiscall CDisplay::~CDisplay(void)" (??1CDisplay@@QAE@XZ)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CSurface::Destroy(void)" (?Destroy@CSurface@@QAEJXZ)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay:: Present(void)" (?Present@CDisplay@@QAEJXZ)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay::Blt(unsigned long,unsigned long,class CSurface *,struct tagRECT *)" (?Blt@CDisplay@@QAEJKKPAVCSurface@@PAUtagRECT@@@Z)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay::Clear(unsigned long)" (?Clear@CDisplay@@QAEJK@Z)
dxtest1.obj : error LNK2001: unresolved external symbol "public: long __thiscall CDisplay::CreateSurfaceFromText(class CSurface * *,struct HFONT__ *,char *,unsigned long,unsigned long)" (?CreateSurfaceFromText@CDisplay@@QAEJPAPAVCSurface@@PAUHFONT__
@@PADKK@Z)
Debug/dxtest1.exe : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.

dxtest1.exe - 10 error(s), 0 warning(s)

[edited by - obi-wan shinobi on September 22, 2003 5:07:18 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!