Time-constrained project - From scratch DX11 or Game Engine?

Started by
5 comments, last by deus.ex.nova 12 years, 5 months ago
Hey GameDev Community,

Over the past couple months, I've been diligently trying to learn DirectX 11 for my 3D project this year. So far I've read the book, Beginning DirectX 11 Game Programming, and I've learned quite a bit about the API, but it hasn't gotten me as far as I had hoped. It only left me with the bare-bones basics about DX11, and some of the example demo code left me in the dark. I want to go much further with my project/education in terms of advanced rendering (e.g. shaders).

Another unfortunate constraint for my project right now is time. It is a driving sim that will be replacing the current, and rather outdated, one in my lab (we didn't buy an off-the-shelf sim is because we want more control with the 3D elements and environment). I can tell that one of the grad students is anxious to get the sim up and running for experiments as soon as possible. There's no specific deadline, but we (I) need to make major progress on it. I've been looking briefly at engines like OGRE, Unity, Unreal, and CryEngine (based on some showcases, I may look further into CryEngine).

Left with just the basics of D3D11 and a time constraint, should I use a game engine for this project instead of working from scratch? I have a strong interest in 3D graphics, so I still plan on furthering my education and skills in that realm regardless of which method I go with here. Also, if any of you have any recommendations for other DirectX books, or advice regarding game engines, feel free to chime in.

Thanks a bunch!
Advertisement
The advantage of a home-brewed engine is rarely going to be speed of development, ease of use, or tools/productivity help. You might get going faster or more easily if you're very familiar with the underlying APIs, since an off-the-shelf engine takes time to learn. Still, the real advantage to DIY is control and customization, at least in the indie world where we don't get source code licenses to most things. You're going to have to learn an engine or learn DirectX, and odds are the former pursuit will have a better pay-off if you're running short for time.

If you can find an engine that lets you write your own shaders, then you're getting the most important part of the graphics side education anyway. The API (DX/GL/whatever) is not the interesting component.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
You can write your game using an existing engine. Or you can write and engine and also write a game second.

Either way you will be writing the game. The question is if you want to write an engine as well.



My first real experience with Unity was to make a simple racing game.

It took less than a day to get the basic vehicles in place and to get a very rough terrain with a circular valley for the race track. After that I spent less than a week (mostly in building the interesting level) and at the end had a reasonably good kart-racing sim, including rough ai, scratch audio, and vfx. YMMV.

If I had insisted on writing everything from scratch, I probably would have spent that whole week just trying to get the graphics systems written and mostly debugged and getting the level file loaders figured out.


And yes, Unity includes shader support. And a fairly nice tool called ShaderLab. And a great shader debugger. And you can see all that in real-time. And you don't need to write it and debug it and maintain it yourself. And it has educational licenses available. :-)

The advantage of a home-brewed engine is rarely going to be speed of development, ease of use, or tools/productivity help. You might get going faster or more easily if you're very familiar with the underlying APIs, since an off-the-shelf engine takes time to learn. Still, the real advantage to DIY is control and customization, at least in the indie world where we don't get source code licenses to most things. You're going to have to learn an engine or learn DirectX, and odds are the former pursuit will have a better pay-off if you're running short for time.

If you can find an engine that lets you write your own shaders, then you're getting the most important part of the graphics side education anyway. The API (DX/GL/whatever) is not the interesting component.


I guess this means I should go for a game engine for this project?


You can write your game using an existing engine. Or you can write and engine and also write a game second.

Either way you will be writing the game. The question is if you want to write an engine as well.



My first real experience with Unity was to make a simple racing game.

It took less than a day to get the basic vehicles in place and to get a very rough terrain with a circular valley for the race track. After that I spent less than a week (mostly in building the interesting level) and at the end had a reasonably good kart-racing sim, including rough ai, scratch audio, and vfx. YMMV.

If I had insisted on writing everything from scratch, I probably would have spent that whole week just trying to get the graphics systems written and mostly debugged and getting the level file loaders figured out.


And yes, Unity includes shader support. And a fairly nice tool called ShaderLab. And a great shader debugger. And you can see all that in real-time. And you don't need to write it and debug it and maintain it yourself. And it has educational licenses available. :-)


One day I would like to make my own engine, no matter how mediocre or limited. It would be a great experience, but for now my focus has to be on this driving sim.

I've been debating between CryEngine 3 (seems fully-featured, w/o having to pay) and Unity (option of custom shaders, hear it also has a great community). The one thing that has be a bit turned off about Unity is that some of the graphical effects (post-processing, global illumination, etc.) are provided through the Pro version only. Would I still be able to create those effects through my own shaders, or did they encapsulate the engine enough to prevent that? The fact that you have been able to create a racing sim in such a short time period is good news to me, in addition to finding a car tutorial on their website. Though the driving sim I need to make will not involve any sort of racing, the engine is simply a higher level layer on top of the DirectX API (and others) right?
Okay, so after playing around with the SDKs for Unity and Cryengine 3, I ran into a few concerns. The SDKs for Cryengine 3 and Unity seem to be heavily reliant upon the editor that they provide, rather than including a lower-level scripting language to use like UDK (Unreal) does. It also concerns me that Unity may be limited in power/efficiency, as I heard that there is absolutely no multi-threading support. However I think the most important issue is that I have to have some sort of low level support if I am to use a premade engine for my simulator. We need to be to carefully control variables in the 3D environment, and eventually we may also want to collect data from the simulator using an eyetracker.

Currently I'm leaning towards the Unreal Development Kit, because it has some sort of low-level scripting language while still being a powerful engine. Has anyone had experience with this engine that can enlighten me about its limitations? Also, does anyone have any experience with any other free DX11 engine that will provide the low level support that I require? It should at least have rigid-body physics and a good model loader inside (a big issue I've run into while programming DX11 from scratch).

Thanks again. smile.gif

Okay, so after playing around with the SDKs for Unity and Cryengine 3, I ran into a few concerns. The SDKs for Cryengine 3 and Unity seem to be heavily reliant upon the editor that they provide, rather than including a lower-level scripting language to use like UDK (Unreal) does. It also concerns me that Unity may be limited in power/efficiency, as I heard that there is absolutely no multi-threading support. However I think the most important issue is that I have to have some sort of low level support if I am to use a premade engine for my simulator. We need to be to carefully control variables in the 3D environment, and eventually we may also want to collect data from the simulator using an eyetracker.


You didn't dig very deep into either one, then.

I'm more familiar with Unity than CryEngine, but from what I understand it is similar in this respect.

The Unity editor you see at first glance is just what you describe, it is very simplistic. That is intentional. You can throw Unity at a teen and they can create a very simple virtual environment without either a programming background or an art background.


However, after you use Unity for a short time you will discover that programmers will spend almost all their time in either the built-in MonoDevelop or with the Visual Studio integration.

Dig a bit deeper into Unity and you will discover that it will load and run C# and other compiled managed code. Or you can drop your own managed DLL into the assets folder; you are free to p/invoke your libraries as needed within your code. It supports other scripting languages (JavaScript and Python). I can also assure you it supports multithreading, so I'm not sure where you heard that; maybe it was with a very old version from years ago?

Are you sure you are giving due diligence to your product comparison?


You didn't dig very deep into either one, then.

I'm more familiar with Unity than CryEngine, but from what I understand it is similar in this respect.

The Unity editor you see at first glance is just what you describe, it is very simplistic. That is intentional. You can throw Unity at a teen and they can create a very simple virtual environment without either a programming background or an art background.


However, after you use Unity for a short time you will discover that programmers will spend almost all their time in either the built-in MonoDevelop or with the Visual Studio integration.

Dig a bit deeper into Unity and you will discover that it will load and run C# and other compiled managed code. Or you can drop your own managed DLL into the assets folder; you are free to p/invoke your libraries as needed within your code. It supports other scripting languages (JavaScript and Python). I can also assure you it supports multithreading, so I'm not sure where you heard that; maybe it was with a very old version from years ago?

Are you sure you are giving due diligence to your product comparison?


I heard that there was no multithreading from a post on the Unity forums, but the person might have outdated knowledge. Admittedly, I did not explore the Unity documentation enough. However, my knowledge lies more with C++ than C# (I was in the process of learning C# when I discovered that native DirectX was C++ only). I did explore the CryDev website enough to see that it had little official documentation in regards to scripting. There are some coding examples here and there, and the community docs are just as similar. I'm shocked that UDK is still considered 'beta', but has better documentation than the Cryengine SDK.

This topic is closed to new replies.

Advertisement