Sign in to follow this  
izanami

Newbie quesiton - what exactly can I use DirectX in game developement?

Recommended Posts

So a few days ago I downloaded CryEngine 3, it is powerful, so powerful that I can set the terrain, fog, light, import character, set AI, set movement, I have not researched into it in depth, but I guess a person without any programming knowledge can make a game with an engine like CryEngine 3, and there are plenty game engines around, such as UDK.
So where exactly can I use DirectX in game developement? Edited by izanami

Share this post


Link to post
Share on other sites
[quote name='izanami' timestamp='1347703301' post='4980329']
So where exactly can I use DirectX in game developement?
[/quote]

Everywhere. You can make any game you like using Direct X. And you can make games in many other frameworks / systems as well. Have you read anything about Direct X ? There's plenty of material in books and online about what Direct X is and what it does. When you try to do those things yourself you'll understand how Direct X can be helpful. Those engines you speak of were build with Direct X (or open gl perhaps), so if you want to do those things yourself without using those engines, then u can use Direct X. Or you might want to build your own engine. Which is very common. Not every game uses CryEngine or UDK, and those engines might not even be appropriate for the game you want to make.

[quote name='izanami' timestamp='1347703301' post='4980329']
I guess a person without any programming knowledge can make a game with an engine like CryEngine 3
[/quote]

I don't know much about CryEngine, but I very much doubt you can make a game without any programming knowledge (or at least anything original or sellable). If you want to make a game with CryEngine and you think you can do it, then go ahead, post back with details. I think you'll find it incredibily difficult and challenging if not impossible. I would say any game is challenging except the most basic games. So when you're facing that challenge you might not want the difficulty of tackling a complete game engine, but rather build the game yourself and have total control over the code. That's what DX can provide, more than that, it can provide extreme graphics capabilities, that other higher level languages and libraries cannot provide.

Share this post


Link to post
Share on other sites
DirectX, OpenGL and other libraries are at the core of the engines. You can't explicitly see them because the engine creates an infrastructure that serves as an abstraction of all that for you. For instance, effects like smoke will aggregate some D3DX Buffer for the sprite positions, a D3DX Effect for the rendering, all of that will be used by a Direct3D Device during the rendering...

Share this post


Link to post
Share on other sites
I reckon 99% of the commercial games are built on some engines, and 80% of the developement is on game engine and model creating (Maya, 3ds Max), the game world is huge, you cannot tweak everything but a small part of it, even the less complicated 2D games, Unreal Engine (from which UDK is made) is used in numerous games (Mass Effect, Mass Effect 2, Mass Effect 3, Borderlands), CryEngine (Crysis, Crysis 2, Crysis 3), Ubisoft's Anvil, Rockstar's RAGE. Cannot believe anybody nor any group is going to create a game from scratch, too time costing. I just started to play CryEngine 3, I guess if the game is simple, such as creating a character to run aroud a terrain to shoot enemies, then a game engine such as CryEngine 3 is more than enough, and it makes amzing graphics. If we require more complicated gameplay game logic then we have to dig deep into the game engine's source code to modify it.
That's why every game's game engine listed in Wiki as "Modified XXX engine".
That's what I guess.
PS: I do know what DirectX is and the cores of the majorities of the commercial game engines are: DirectX and C plus plus. I do not think OpenGL occupies more than 10% portion when come to commercial games, almost all the commercial PC games use DirectX, XBox uses only DirectX, PS3 has its own API, can see OpenGL in some games on mobile phone, of course, so are DirectX. Edited by izanami

Share this post


Link to post
Share on other sites
The thing you have to remember is that engines such as CryEngine cost money. Exactly how much money varies from engine to engine (the CryEngine, for example, has an [url="http://mycryengine.com/index.php?conid=70"]indie licensing option[/url] that costs 20% royalties; ouch). An indie has to carefully weigh expected sales against time spent developing and expenses such as artwork contracting, sound and music contracting, and engine licensing. If the license is going to eat too much of their revenue, then all of a sudden rolling their own becomes a more attractive option. It's not really as difficult as you might think, since creating a [/i]game[/i] from scratch is much less complicated than creating a fully-featured and general-purpose [i]engine[/i] such as CryEngine. You probably won't need, and won't have the manpower to take advantage of, every feature of the CryEngine. Typically, an indie is only going to be able to afford to generate assets for a small subset of the engine features. If he can roll his own to encompass just that subset, he can save himself a ton of money in royalties.

Share this post


Link to post
Share on other sites
Well said JT, and thanks for mentioning indie games, most of which I would imagine, don't use engines.

[quote name='izanami' timestamp='1347715290' post='4980360']
Cannot believe anybody nor any group is going to create a game from scratch, too time costing
[/quote]

Where on earth do you get that belief ? Plenty of people out there are making games from scratch. Many large corporates right down to 1 man indies. I'm making a game from scratch (using SlimDX), I'm 6 months to 12 months away from completion, but the time doesn't phase me at all. In fact if anything, I'm worried that's not enough time, given that I'm also studying part-time at uni. The time is just an investment, there are people on these forums that have been programming for 10-20 years or more. Some games can take 6 years or more from conception to completion and the whole range in-between. Time is just a cost that you have to face, to get what you want.

Share this post


Link to post
Share on other sites
Nice pic's of CE3, but most indies aint gonna make a game that looks like that, even if they have that power at their disposal. You need good artists, musicians, animators etc. You've gotta get down to earth about what you can do. And there are other games that need to be made, not just super-realistic first-person games. I don't think Minecraft, Legend of Grimrock, Braid or Plants vs Zombies were made with CryEngine or anything like it, that's just a few. Civ, Starcraft, Warcraft, Thief (going back a bit), and thousands more games weren't made with those major engines.

Share this post


Link to post
Share on other sites
I was talking about those commerical games. I actually need to change the title, replace "game" with "commercial game". I guess those commerical games should be developed as soon as possible, as the longer it takes, more cost it demands (staff salary etc). I mentioned above if the game is simple, then of course an individual or a small group can create it, but even a simple shooting game - as an example a character runs on a terrain to shoot enemies, if you make it from scratch (from modeling character, modeling terrain, programming AI, movement, game logic) requires lots of time investment, even more time and effort if you want to make it more realistic with lighting, fog, environment interactive, more complicated gameplay logic etc
Unless if it was an enthusiast, then he could take forever to make it, as he is more studying and enjoying than creating the game.
A game such as Plants vs Zombies which seems a tiled map based game to me, and it does not support online multi-players, so I think it can be made fast by Java or C++ or XNA once the graphic design is compeleted.
The nearest game I have played is Skyrim, very impressive.
Any commerical game insider can tell me how to make a nonlinear open world game like that (by hundreds staff I know)? How much do they reply on the game engine? How much and what parts spent on the DirectX C++ programming?
Thanks. Edited by izanami

Share this post


Link to post
Share on other sites
Telling you how to create an open world game is a non-trivial task unlikely to be handled in any sort of detail in a medium such as a forum post. Not to mention, for a "commercial game insider" it might represent disclosure of company trade secrets or violation of NDAs, if the question is answered in too much detail. I highly doubt you are going to receive the answer you are looking for here. In fact, due to the untidiness of your grammar, I'm having a hard time figuring out exactly what it is you are after here.

Share this post


Link to post
Share on other sites
I was asking what do they do with DirectX in schduled commercial games as I see the game engines are so powerful, is it a routine to go down to the game engine source code to do some modification first then start to create the game on it then do programming at later stage? I think there is no answer to this, as it is different among games. As for the open world games, I am not asking for souce code, nor detailed as such "How do you guys implement the dragon shouts in Skyrim". as an example - I always wonder how do they make the game world, the world in which the player moves from one place to another without perceptive loading scene, how do they draw the game world at realtime rather than creating a model etc
I do not consider there is a concern of disclosing company secrets or breach NDA (is it an America thing? Then I am not American). But if that's his concern, then I am not asking FLeBlanc ?even if he does know), I might not get the answer I want at here, no worries, there are plenty forums and posting at forums are all about discussing, and there are plenty unsolved threads. Edited by izanami

Share this post


Link to post
Share on other sites
The video driver sits on top of the hardware, DirectX sits on top of the video driver, the engine sits on top of DirectX. Whenever the engine wants to create an object that is to be drawn on screen, it requests the pertinent buffers from DirectX, and implements the pertinent data and interfaces in an engine-specific manner, shielding the end user from the specifics of the DirectX API. In effect, the engine is a middle man. DirectX is still involved, but the end user of the engine doesn't have to muck with it. The guy that wrote the engine does.

As far as implementing an open world game, one of the key obstacles you have to overcome in your design is streaming. This is how they implement large worlds without loading screens. At any given time, the only world geometry that is currently resident in memory is what is required to draw the view, plus some buffer area around it to account for movement. As the point of view translates, additional world geometry is streamed in and stuff that moves beyond the padding zone is pushed out. Given the relatively slow rate of movement compared to the size of the visible area, this means that a relatively small amount of data is loaded each update. This is also why large open-world games frequently do have loading screens when you teleport elsewhere, as you can no longer incrementally stream in the data you need. You have to load the new visible zone all at once.

It's a fairly complicated problem that requires a strong understanding of multi-threaded programming, task scheduling, and representation of the world in order to simplify the process and make it as tight and streamlined as possible. Each company is probably going to have their own framework for it, and yes, that framework and the details of it is probably going to be covered by an NDA.

I don't understand exactly what you mean by "how do they draw the game world at realtime rather than crating a model etc". They... uh... draw the game world by populating buffers with data and issuing draw calls to the engine.

Share this post


Link to post
Share on other sites
Thank you very much JTippetts, that's really helpful.

Sorry for the confusing question, I meant in those games they draw the view at realtime through computing, not creating a fixed scene box, and you did answer it in deails, thanks again. Edited by izanami

Share this post


Link to post
Share on other sites

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