When to switch to D3D/OpenGL?

Started by
32 comments, last by Ronald Forbes 23 years, 10 months ago
At what point in experience could one safely make the big jump over to the 3D side of programming? Everyone says to start out with the simple 2D stuff but when should you start doing some 3D? Cuz I''m not having much luck convincing my friends that Space Invaders in DX is alot of work.
C:DOSC:DOSRUNRUN DOSRUN
Advertisement
If I had to do it all over again, I would do it the same way, skip 2D altogether and jump into the mind bending, headache bringing programming that is 3D =)

It''s really up to you, I know people that swear by 2D games and I know others (like myself) who don''t touch the stuff, never did, never will. 3D is just so much fun! you''ll find yourself using your left hand to represent your 3 axis and your right hand moving your left hand to represent rotations and you''ll have a constipation look in your face while you try to figure out an algorithm, meanwhile your loved ones will conspire to have you institutionalized.

Rick
I''d say if you can do the maths you can go straight into opengl, the api is quite easy to use and it hides you from some of the scary parts of 3D. To use D3D it''s best to know ddraw, but you sound like you are already familiar with it. You also need to know a bit more 3D maths for D3D. You get more control in D3D, but it does tend to give you a headache trying to use it.

-- Kazan - Fire Mountain Games --
Kazan, can you please explain to me how you need to know more math to use one API and less to use another? Are you saying maths become easier if I wish to do 3D collision detection simply by using a specific API? I just don''t see how.

Rick
No, collision detection isn't linked in any way to your API


Simple things that you would do when you first learn an API, like making a triange rotate and translate requires more maths in D3D. In OpenGL all you need is a glTranslatef() followed by a glRotatef() for each axis to move your triangle. With D3D you must create your own rotation matrix for each axis you rotate around and a translation matrix, you then multiply them in the correct order so that you have a composite matrix of all your transformations, then tell d3d to use this matrix to transform your triangle.

-- Kazan - Fire Mountain Games --

Edited by - Kazan on May 27, 2000 3:37:00 PM
use D3DUtil_SetRotateXMatrix!!, or create a own matrix (for many effects) And you have to apply the matrix in this orden :
-rotationy
-rotationx
-rotationz
-translation

hard to learn???
And you may apply another matrix (such scale, deformation,projection,...), and experiment with many combinations.



-eng3d.softhome.net-
-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"
If you think you can handle it, then jumping into the third dimension should not be a problem. Taking this step requires the choice of an API - OpenGL or Direct3D - unless you want to write a software 3D engine. It is true that a good grounding in math will help you no end, and will aid you in many of the hurdles you come to, it''s also true that the API''s can hide some of the math (see Kazan''s post) but it''s still best to know what is going on. As for API specific merits, well, I use OpenGL, so I can point you to a set of really good tutorials:

http://nehe.gamedev.net/

They rock, and should be good to get you started. I don''t know of any concrete D3D tutorials, so I can''t help you if you make that desicion.

-Mezz
D3D needs more math?



....

Once you feel bored with 2d, it''s time to go to 3d. There isn''t much of a step at all, it''s just a matter of will to learn.

Since you know direct draw, adding direct 3d isn''t as hard as it seems. You can mix them quite easily (as long as you stay in software mode).
___________________________Freeware development:ruinedsoft.com
#include
#include

D3DMATRIX RotXMatrix;

D3DUtil_SetRotateXMatrix(RotXMatrix, g_DEGTORAD(90));
for (int i = 0;i < NumOfVertexInObject;i++)
D3DMath_VertexMatrixMultiply(MyVertex, MyVertex, RotXMatrix);


See all that math a beginner has to learn to rotate something in D3D?

This topic is closed to new replies.

Advertisement