Sign in to follow this  

DirectX/C/C#/C++ Programming Help

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

To create a mmorpg, must i know directx? And issit a must to know directx to create a game ? If so which programming languages need DirectX? C,C#.C++? Issit possible to create good games with C? I plan to give it a try.Although i know c++ is better. Last thing, wad type of games need the use of directx and wad type do not need? One mroe thing.. must i know Win32 to create games?

Share this post


Link to post
Share on other sites
The game gonna be on windows platform...must i erally noe directx to make a graphical game...cos i dun really noe how to put graphics by using c languague

Share this post


Link to post
Share on other sites
Quote:
To create a mmorpg, must i know directx?
No, you don't need to know DX, but it might well help...

Quote:
a must to know directx to create a game ?
DirectX is another tool in your shed. Use it if it's gonna help you out, but by no means is it the only tool at your disposal.

Quote:
which programming languages need DirectX? C,C#.C++?
Use whichever one suits you best. Do you have any experience with any of those languages? any other languages?

Quote:
need the use of directx and wad type do not need?
I refer to my previous answer - it's just another tool. Many games use it simply because it makes developing games a lot easier and a lot quicker. There isn't a definitive type of game thats for DX.

Quote:
must i know Win32 to create games?
You can get quite a long way without touching much Win32 code, but it will definitely help you out to at least understand the basic structures/designs and overview of the API.

Quote:
must i erally noe directx to make a graphical game...cos i dun really noe how to put graphics by using c languague
You could use GDI, GDI+, OpenGL or DirectX (to name a few). I'd personally choose DirectX, but thats influenced by the fact that I've been working with DX for 5yrs now [wink].

-----------------

As a general answer to your posts... you might well wanna do a lot of the basic research, I could be wrong but guessing from your post I'd say you're not an experienced programmer/games developer (that doesn't have to be a bad thing!). a MMORPG is a heavy-weight project. I've been making games of various types for years and years now, and I'd still be wary of taking on a full blown MMORPG without a lot of planning and a lot of free time.

hth
Jack

Share this post


Link to post
Share on other sites
I believe you should use c++, as it has oop and is the fastest there with c.

I use directx for all my games as I have learnt all the d3d,dsound,dmedia,dinput.

opengl is just as good but doesnt have the d3dx functions which can do calculations etc for you, instead of you having to do it yourself, eg directx is like windows, and opengl is like linux

Share this post


Link to post
Share on other sites
minor nitpick...

Quote:
opengl is just as good but doesnt have the d3dx functions which can do calculations etc for you
It's called GLUT (openGL Utility Toolkit?). Not having used it extensively, I can't say if it's better/worse than D3DX, but it's at least comparable.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by lutzzz
so can i make a graphical game just by noeing c++ or c?


yes, but that will require learning about back buffers etc, eg using dc's,

eg you paint all your graphics for the frame onto a backbuffer( a dc) and then copy that backbuffer onto the screen.

So you should learn back buffering, bitblting, masking, and setpixel.

Share this post


Link to post
Share on other sites
and even to show it on the screen he'd need to call SOME API function somehow ... so NO, you cannot write a graphical program of any sort using JUST C++ (cause C++ ONLY provides stream input and output built in, not graphical) ... and c++ provides no means to play sounds etc ...

so what you need is a language (C++, C, C#, Java, Python, ruby, perl, etc ...)

and then you need to pick a primary platform or set of targeted platforms (Windows, Mac, Linux, etc ... like for console games you would pick XBOX, PS2, Gamcube, Gamboy Advance, etc ...)

and then you pick you primary progamming APIs / Platforms -

Such as:

Graphics core API -
OpenGL, Direct3D, DirectDraw, GDI, GDI+, Java2D, etc ...

Sound core -
OpenAL, DirectSound, SDL multimedia, DirectMusic, Win32 API ...

Input core -
GLUT input, DirectInput, SDL input, Win32 API

those 3 things pretty much require something not build into windows ... the most common choices for REAL games are:

1. Windows API and DirectX for everything (Half Life 2?)
2. Windows API and DirectX for everything but graphics, OpenGL for graphics (Quake 3)
3. Windows API and DirectX for everything but graphics and sound, OpenGL for graphics, OpenAL for sound (Unreal 2k4, maybe Doom 3)

For LEARNING or doing smalltime games, the more common choices are:

1. OpenGL for graphics with basic GLUT for input, no real windowing, and minimal multimedia (can add OpenAL as desired for sound)
2. OpenGL for graphics SDL for input, multimedia, windowing
3. DirectX for everything.

And then there are the all-in-one platforms, Java and .NET, of which .NET is much better at making games - because it allows full access to DirectX.

Personally, I found C# using pure .NET (GDI+) easy to develop basic apps for, and then C++ using .NET and DirectX seems better for games.

But really I like OpenGL best for 3D graphics, so I currently use DirectX for my non 3D stuff, and OpenGL (with GLUT) for my 3D experiments.

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
It's called GLUT (openGL Utility Toolkit?). Not having used it extensively, I can't say if it's better/worse than D3DX, but it's at least comparable.



GLUT does many things but is not comparable to D3DX. Mainly GLUT handles the creation and management of windows and their input. It also does a few other things, but all relate to window management.

Perhaps you are thinking of GLU which is a different library. It is more comparable to D3DX than GLUT, but still doesn't handle many of the things that D3DX handles. D3DX has helper functions for animation, math, meshes, precomputed radiance transfer, shaders, shape drawing, texturing, fonts, rendering to surfaces and env maps, sprites and a host of other things.


[Edited by - bit64 on December 1, 2004 12:32:46 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by johnnyBravo
opengl is just as good but doesnt have the d3dx functions which can do calculations etc for you, instead of you having to do it yourself, eg directx is like windows, and opengl is like linux


isn't the "feedback" mode of OpenGL basically the same as DirectX callculation functions (I have only barely used the feedback function and NEVER used the DirectX funcs, so I may be wrong) ...

feedback mode allows you to run a series of opengl commands and then read the result ... so it is used to "calculate" the mathmatical result that is 100% identical to what the rendering engine will do with a sequence of commands ... very usefull for mouse coordinate space conversion (in ortho mode) and similar situations.

Share this post


Link to post
Share on other sites
I've never heard of feedback, but personally I don't really like either opengl or directx, i find their code ugly.

Hopefully one day someone will create the greatest graphics api that is clean and consistent!

Share this post


Link to post
Share on other sites
Quote:
isn't the "feedback" mode of OpenGL basically the same as DirectX callculation functions (I have only barely used the feedback function and NEVER used the DirectX funcs, so I may be wrong) ...



No. He is talking about the math functions included in D3DX. Such as D3DXQuaternionConjugate. Have a look:
D3DX Math functions

Share this post


Link to post
Share on other sites
Quote:
Original post by Xai
and even to show it on the screen he'd need to call SOME API function somehow ... so NO, you cannot write a graphical program of any sort using JUST C++


Okay, I speak for those for whom 13h still means something! If you've never set 0xA000 directly, you missed out brother. There's nothing wrong with writing the damn video mem yourself.

Quote:
But really I like OpenGL best for 3D graphics, so I currently use DirectX for my non 3D stuff, and OpenGL (with GLUT) for my 3D experiments.


GLUT rocks. Use it til you have a good reason not to use it. If you use DX just for the math routines.... whew. I guess programming an actual game is probably the least of your worries, right?

Share this post


Link to post
Share on other sites
Quote:
GLUT rocks. Use it til you have a good reason not to use it. If you use DX just for the math routines.... whew. I guess programming an actual game is probably the least of your worries, right?



So let me see if I understand you. It is okay to use GLUT for your window routines (because creating a window with input is so very hard), but if you use D3DX for your math routines you have no hope of making your own game?

Share this post


Link to post
Share on other sites
Quote:
So let me see if I understand you. It is okay to use GLUT for your window routines (because creating a window with input is so very hard), but if you use D3DX for your math routines you have no hope of making your own game?


Yeah, the D3DX math library sucks! Have you seen code written with it? It's like someone vomited up a colon full of D3DXCapitolLetters for each D3DXSingle D3DXOperation. I was especially amused by the example, which I assume was chosen for its complicated-soundingness "D3DXQuaternionConjugate"... ooooooo.

Do you know what that is? It's a freaking minus sign! In my math lib it looks like this: -

My point wasn't just that the D3DX lib sucks, it's that if you're making a decision to use DirectX because of D3DX math routines... well that's great!

In other news, the great thing about GLUT is that it's retardedly trivial to set it up, and you get x-platform for free... Windows? SGI? Linux? Dare I say, OSX? It's there. Then you decide you need something more substantial, no problem, you haven't invested any time in writing GLUT-specific code so there's no net loss. It's the main principle of YAGNI. Spend time getting it DONE, not making it more complicated.

Share this post


Link to post
Share on other sites
Quote:
I was especially amused by the example, which I assume was chosen for its complicated-soundingness "D3DXQuaternionConjugate"... ooooooo.


I wasn't aware that it sounded complicated. Perhaps I should have used a better example for you. Perhaps D3DXPlaneIntersectLine would have been better.

Quote:
Yeah, the D3DX math library sucks! Have you seen code written with it? It's like someone vomited up a colon full of D3DXCapitolLetters for each D3DXSingle D3DXOperation.


So your beef with D3DX isn't that it doesn't work, or works poorly, it's the syntax and non-portablility. Of course, your preference for syntax is a personal thing and not necessarily shared by others, and portability is great if you need it. But you consistantly contradict yourself with quotes like these:
Quote:
Spend time getting it DONE, not making it more complicated.
and then suggesting that people don't use D3DX because of syntax, and that they should write their own math routines.

Also, you failed to mention (probably becuase you have never used D3DX), that all of the overloaded operators are available for Quaternions. By the way, the conjugate is different than the unary minus operation.

// unary operators
D3DXQUATERNION operator + () const;
D3DXQUATERNION operator - () const;

// binary operators
D3DXQUATERNION operator + ( CONST D3DXQUATERNION& ) const;
D3DXQUATERNION operator - ( CONST D3DXQUATERNION& ) const;
D3DXQUATERNION operator * ( CONST D3DXQUATERNION& ) const;
D3DXQUATERNION operator * ( FLOAT ) const;
D3DXQUATERNION operator / ( FLOAT ) const;


Share this post


Link to post
Share on other sites

This topic is 4760 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this