Newbie guy with newbie question...

Started by
2 comments, last by Flack 22 years, 1 month ago
Hey guys, In RTS games, or any games I guess, what parts of the games are done with what? What Im trying to say is if the game is done in C++, is all of its functionality done with C++? Im guessing that the graphics are done with DirectX or something. So, do you have your code call DirectX functions? For example, are the mouse functions done using C++ or DirectX (like movement in a RTS and stuff like that)? Sorry if my questions are too general/stupid or make no sense Any info is greatly appreciated. Thanx Flack P.S. What are most games programmed with anyway (rts games, games like diablo, and fps games)? Is it C++ or all kinds of stuff?
Advertisement
Um... you might want to start with the ''for beginners'' link above

Most games these days are programmed with C++, but you can use any language to program a game. The tools that go into making a game - editors and such - can be programmed with C, C++, VB, Pascal etc.

DirectX is an api not a language - so C++ or DX is not much of a question. DX can be used to handle the mouse, there are other ways.

"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
It really depends on your platform you are developing for. If you are using windows your code will call various DirectX funcions to perform Input, Sound, or Graphics unless you use OpenGL for graphics or OpenAL for sound. It realy depends on what the developer chooses to use.

DirectX, OpenGl and OpenAL are all APIs that a programmer can use with many languages.

Of couse a developer could just forget using APIs and write code directly to the hardware like dos programs do but why reinvent the wheel. Plus Windows doesn''t look kindly on programmers poking around at the hardware it usally not worth the effort fighting windows

As for what language the APIs are written in it could be anything. I would think DirectX is written in C/C++ but I don''t know for sure.
I think you are lacking in the understanding of a few things. DirectX is not a programming language. It is incorrect to say "I program in DirectX." DX is a library that you can use. Granted, you can use it from different languages, but you are still using the language to make the calls.

Most games are done in a bastardized C/C++ hack together. I have NEVER seen any pure C++ code used in a full scale project. It could be done, but SO MANY schools and such still teach procedural coding with C++ libraries and barely touch on the oop stuff.

But to summarize - most games are done in C/C++ using DirectX or OpenGL libraries for the graphics.

Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.

This topic is closed to new replies.

Advertisement