Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

DirectX game engine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 02 October 2011 - 09:12 AM

Hi, this seems to be a nice place, it is also recommended in a lot of places around the internet, so I thought I come here for some help.

I know C++ console and win32 programming, as well as winapi, however I want to step up to game programming and DirectX, as well as start a project that I could show to people around the internet. I already have an idea for it, by the way - in short and without giving any spoilers, it is a 2D side-scroller.

I have been looking around and found tutorials only for old versions of DirectX, so I would like to ask if there are any actually useful tutorials I could use with the current version (June, 2010) of DirectX. It would be better for me if it would be a full game engine tutorial, I don't want to learn part-by-part, as this is a very slow process for me.
I have found many SDL/Allegro/other libraries tutorials, but I don't want these, instead I want to write a DirectX mini-library by myself.

Thanks for reading. :)

Ad:

#2 Jason Z   GDNet+   -  Reputation: 2367

Like
0Likes
Like

Posted 03 October 2011 - 02:21 AM

That is a pretty big topic... I think there are a few tutorials floating around, but none that cover an entire rendering engine. Your best bet would be to pick up a book on the topic - the Mike McShaffrey book or some of the Dave Eberly books would be good choices to get started. Also, if you are looking only for information on D3D, you will need to choose a version (9,10, or 11) and then start reading up on how the API itself works.
Jason Zink :: DirectX MVP
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article

#3 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 03 October 2011 - 08:44 AM

Well, I decided to go part-by-part framework way after all. I have a framework, although I am having some trouble with it... I will create some new threads and hopefully get help and be able to write a fully working engine to start creating the project.

Thanks for the books, I will also look into them after my birthday next month, when I will get some money.

#4 NightCreature83   Crossbones+   -  Reputation: 1148

Like
0Likes
Like

Posted 03 October 2011 - 09:22 AM

Well, I decided to go part-by-part framework way after all. I have a framework, although I am having some trouble with it... I will create some new threads and hopefully get help and be able to write a fully working engine to start creating the project.

Thanks for the books, I will also look into them after my birthday next month, when I will get some money.

I wouldn't even bother with the DX9 or 10 runtimes just go with the DX 11 one and use the feature levels to support all lower levels this will allow you to write a render engine that is using a single API but can target multiple level of devices. This is far easier than learning DX9 and then switching to DX10/11 the API between these two changed quite dramatically.
Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2

#5 yckx   Members   -  Reputation: 767

Like
0Likes
Like

Posted 03 October 2011 - 11:16 AM

If you're considering a D3D11 book, consider Jason Z's own, which can be found in his sig. Also, look at the sample browser that came with the DX SDK. To be brutally honest, being able to follow the sample code and documentation is a pretty good measure of your readiness to begin DirectX programming.

And it's a mistake to dismiss libraries such as SDL and Allegro. Writing an engine is sexy, but until you have a few games under your belt, you lack the knowledge of what the engine should be and do, and the experience to code it effectively. Such game libraries are designed to get you up and running fairly quickly, and their usage provides valuable experience rather than a crutch.

ApochPiQ has posted this advice a number of times: just start hacking at code and make some damn games. Take note of the code you don't like, the trouble spots, the bits where you think there must be a better way; but don't get hung up on them. So long as it works, move on and finish your game. Then go back and analyze those bits you took note of, before. Use what you just learned on your next game. Each game's code will become less bad than the last, and after a few games you'll start developing a common codebase which can form the basis of the engine you want to build.

#6 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 03 October 2011 - 12:28 PM

NightCreature, I don't have a Dx11 compatible video card, so this isn't possible for me. Thanks for the advice though.

yckx, in fact I have created a few games using these libraries, and that is why I dismissed them: they had numerous bugs and "go-arounds". I was constantly seeking help in their forums, using the search function and then re-writing a big part of my code because I had to use a go-around. That is why I want to learn DirectX and C++ and create my own engine, so I wouldn't need to use these go-arounds.
If you are interested, these games were tic-tac-toe, tetris clone, space shooter, pong and arkanoid clones. I didn't finish Arkanoid though, the go-arounds pissed me off so hard at that point, that I deleted the library and started learning winapi, now going to the world of DirectX.

#7 Jason Z   GDNet+   -  Reputation: 2367

Like
1Likes
Like

Posted 03 October 2011 - 03:24 PM

In that case, I would recommend that you take a look at our book on D3D11 (as yckx mentioned, there is a link in my signature). You can still use D3D11 as long as you are running Vista or Win7 - using the feature levels options you can degrade down to your current hardware level, but still use the D3D11 API. I would recommend that you take a look at the table of contents on Amazon to see if the book is what you are looking for - but if you want to know all about how the API works inside and out, it is the book you want.

You can also take a look at the rendering framework that was used for the samples in the book, Hieroglyph 3, which will give you at least some insight into the rendering side of an engine. It isn't production code, but it should give you a good idea about how my engine works. There are quite a few samples to check out too, and the code is freely available under the MIT license.
Jason Zink :: DirectX MVP
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS