DirectX 9 question

Pages: 12
I'm looking to learn directx 9 - 2d for C++ only, where is the best site to go for that? not direct 8 or 7. not directx 9 3D, not directx 2d in vb or c#
Wow, not only has it been a day since I posted this and got no replies but everyone else has gotten a reply to their threads since I posted mine.
What gives????
MSDN would be your best bet. But when you download the DirectX SDK you get a bunch of documentation and tutorials.

DX isn't really C++ question. It's a DX question. This would be better asked on a DX forum/user-group.
I'm talking about tutorials and stuff like that. But on Directx 9 2D only.
Yea. You are talking about rendering in DX using a 2D Perspective instead of 3D. It's the same as 3D, except you are rendering it in a different perspective.

OpenGL calls them perspectives, It's been so long I don't remember what DX calls it. I would look at NeHe 's tutorials. They have really good DX/OpenGL Tutorials for GameDev.
the only 2d directx tutorials i can find are for directx 8 or older.
Yes. To render 2D in DX9/OpenGL is the same as rendering 3D. Except the 'perspective' changes. So it will render it at a set distance. So if you render everything at 0(Z) and set your camera viewport to be only distance 0-0.1 then everything is rendered in 2D.

I don't want to use 3d models to make a 2d game. So I won't use 3d. I need 2d.
Ok. 2 Major Options.
1) User legacy DirectDraw in DX9. It's been officially dropped and is the legacy way to do 2D work.
http://www.programmersheaven.com/2/FAQ-DIRECTX-What-Is-DirectDraw

Or. Using 3D Techniques you can do either of:

1) Bitmap Framing (or other Image). You have a series of images specifically layed out so you can load them and cut them up into frames. Just like a cartoon is made. Then you render these to the screen at Z=0. So they are in 2D

2) A sprite format that has pixel information (vertices). They are also rendered to the screen in 3D with Z=0.

In a nutshell, render everything in the same way as 3D. Just with the Z=0. The bonus with this way is you can make the game 2D but with some 3D conponents (e.g floors, levels etc)
problem with using 3d to make 2d games is you need to be able to make the 3d models, and that is something i can't do.
I think you will find the opposite is true. Making 2D models is much harder than 3D. Loading 3D models is also easier than 2D as you can find various open formats and sources to load them (e.g OBJ, MDL, 3DS).

Check out www.ogre3d.org :) You might be surprised.
like i just said, I can't make 3d models or I'd just learn to make 3d games instead of 2d games. I can do normal 2d images not models.
Something like Ogre would still be useful, as alot of the rendering framework is taken care of. You'd just need to write an importer for your 2D Model format, and a rendering function to render it to the screen.

Again, I can't make models at all. period. I've tried and failed. this is why I only want to make 2d games. which means 2d images not 2d models.
Arggh.

You are going to want to create an animation by drawing each frame seperately, or develop a sprite model (2D Model).

You will load them into the software through your own handler as a 'Model'. Model is simply a term used for something that has animations (as yours should simulate) and characteristics to render it (as yours will do).

2D Models more work than 3D imo.
Last edited on
2d images are like gifs, jpegs, png. not mdl, obj, mdx

I want to use 2d images since its all i'm able to make graphics wise.
Then using the coding to tell it which images to show and when.
in a nutshell yes. But I do have concerns as to why you are unable to make a 3D Model. Coding the system around doing this is going to be far more complex than creating simple models.

For reference. The XBLA (XBox 360 Live Arcade) SDK comes with a sample game. A 2D Asteroids game. But upon inspecting of the development process and code you quickly learn the ships are actually 3D Models rotated to look 2D. The asteroids are just JPEG images (because they don't animate, change or split up). So even MS is using 3D to simulate 2D.

Some things you will have to code.
Keyboard Input, Mouse Input (if used), Texture Loading/Management (Images), Rendering, Game Logistics etc
Last edited on
I just suck at making models.
Ahh well. Good luck with your game :)

I know I have been coding bits of mine on and off for a few years now.
so basicly no help finding what tutorials i would need to learn this.
Pages: 12