OpenGL vs DirectX for Windows 3D Multiplayer Game

9d9815f3421448af491d8cd571c68419
0
eugene 101 Jan 31, 2012 at 06:41

Hi Friends,

I have idea to make top view 3D Multiplayer game for Windows. So since I am new in area of game programming it is better to choose wise in beginning than sorry later :)

Game should work in Windows XP, VIsta and Windows 7.

So first thing is to choose technology, so my question is:

  1. Should I use Visual Studio and DirectX 9 ?

  2. Should I use CodeBlocks with MinGW and OpenGL ?

Thanks in advance,

eugene

Senior Software Developer
MSc Astrophysics

5 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Jan 31, 2012 at 06:51

Well, Visual Studio vs MinGW and D3D vs OpenGL are two quite orthogonal questions. :)

But if you’re developing on Windows, IMO the Visual Studio IDE can’t be beat. And if you’re targeting only Windows for the final project, you might as well use Direct3D, but really either D3D or OGL will do.

9d9815f3421448af491d8cd571c68419
0
eugene 101 Jan 31, 2012 at 07:15

Thanks for fast reply.

Well since graphically you are saying there is almost no difference, than what about sound and networking ? The game should have some basic sounds, nothing special, but multiplayer should be able to support a big number of players, like up to 20 000. So is it better to use DirectPlay for this requirement or use for example FreeBSD server and write your own socket server ?

9b281ba547fc2ca89c4727606d12fe53
0
Kim_Johannsen 101 Jan 31, 2012 at 09:57

Remember, Direct3D and OpenGL are only API’s to the graphics driver. The best API is dependant on the driver. If the driver supports both API’s, there would theoretically be no difference. But i always recommend, to write your engine to support both, then you are on the safe side that your game runs on almost every 3D accelerator. But if you don’t have the time or resources, stick to Direct3D for games, as Direct3D is mostly supported by the most windows graphics drivers. Fx some Intel graphics cards have got bad support for OpenGL.

DirectPlay? Does that still exist? If it does, forget it. It is depraced, and it only supports up to 32 players.

If you have 20.000 players, i would recommend to write your own server. Then make use of an SQL server for the account data, inventory, player ip’s etc. and then make the clients communicate with each other peer2peer. The SQL server then provides the client ip’s, and then your client decides which other clients it should request movements and other events from.

If anyone else have got some corrections, feel free to correct me! :-)

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Jan 31, 2012 at 16:57

#Kim Johannsen - Note (just to write details down, though basically you’re right): actually OpenGL and Direct3D are not only API’s to the graphics driver, there are also OpenCL, DirectCompute, C++ AMP and vendor specific CUDA. You *can* write renderer (like OpenGL or Direct3D is) in these, though you won’t use the hardware parts of GPU (there are still some of them) and do everything in software on GPU. You can also render in software on CPU (quite effectively today). Anyway OpenGL and Direct3D are only hardware based renderer apis out there.

500367065665a05a847242a39a0bc69e
0
mmakrzem 101 Feb 06, 2012 at 10:38

For sound support, you’ll probably want OpenAL if you want something that is cross platform compatible. Have a look here:

http://www.marek-knows.com/downloads.php5?vmk=audioEng

I’ve posted video tutorials showing how to use OpenAL at the link above.