Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


DirectX11 2D Book


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
9 replies to this topic

#1 ~Helgon   Members   -  Reputation: 357

Like
0Likes
Like

Posted 28 November 2012 - 11:59 AM

Hi,

can someone suggest me a DirectX Book which is specified on 2D programming? (or isn't it like XNA where 2D and 3D are "pretty" splited?).
It should be written for DirectX11.


Regards Helgon

from time to time i find time


Sponsor:

#2 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 28 November 2012 - 01:32 PM

http://my.safaribooksonline.com/book/programming/game-programming/9781435458956 < Maybe start with that?
(Hopefully I get this right)
Pretty much any book about DirectX will have 2D practice / tutorials in it. As far as a book just made for "2D Programming" I wasn't able to find one while looking. I'm sure someone else here has seen one and hopefully they'll jump in here soon. Besides that book, you could also try these online tutorials: http://www.rastertek.com/tutindex.html

Hopefully that helped. :)

#3 Ravyne   GDNet+   -  Reputation: 7885

Like
1Likes
Like

Posted 28 November 2012 - 02:50 PM

Are you wanting to learn Direct2D or 2D rendering via Direct3D?

Direct2D can do bitmaps and all that jazz, but its really more oriented towards vector-style 2D Graphics.

If you do 2D via Direct3D, then you have to deal with the 3D API, setting up your pipeline and whatnot, but everything simplifies when you drop the z-axis from your game logic/rendering (even if you still use it to z-order sprites, etc), and you can hide all the details in a wrapper class just once if you like, and never have to look at it again. There's probably also a plethora of 2D engines already built on Direct3D 11, or which can be readily ported from Direct3D 10.

Most good Direct3D books that aren't aimed at experts will have a few chapters that are applicable, which is generally good enough coverage. I don't think there's been a dedicate book on the topic since Focus on 2D in Direct3D, which was DX9-era, I think. If you can get a copy of that, the concepts should apply, but the code won't just copy and paste into Direct3D 11.

#4 MJP   Moderators   -  Reputation: 11620

Like
4Likes
Like

Posted 28 November 2012 - 03:34 PM

If you do 2D via Direct3D, then you have to deal with the 3D API, setting up your pipeline and whatnot, but everything simplifies when you drop the z-axis from your game logic/rendering (even if you still use it to z-order sprites, etc), and you can hide all the details in a wrapper class just once if you like, and never have to look at it again.


Or you can just use SpriteBatch, and call it day.

Edited by MJP, 29 November 2012 - 01:49 AM.


#5 ~Helgon   Members   -  Reputation: 357

Like
0Likes
Like

Posted 28 November 2012 - 05:32 PM

Are you wanting to learn Direct2D or 2D rendering via Direct3D?

Direct2D can do bitmaps and all that jazz, but its really more oriented towards vector-style 2D Graphics.

If you do 2D via Direct3D, then you have to deal with the 3D API, setting up your pipeline and whatnot, but everything simplifies when you drop the z-axis from your game logic/rendering (even if you still use it to z-order sprites, etc), and you can hide all the details in a wrapper class just once if you like, and never have to look at it again. There's probably also a plethora of 2D engines already built on Direct3D 11, or which can be readily ported from Direct3D 10.

Most good Direct3D books that aren't aimed at experts will have a few chapters that are applicable, which is generally good enough coverage. I don't think there's been a dedicate book on the topic since Focus on 2D in Direct3D, which was DX9-era, I think. If you can get a copy of that, the concepts should apply, but the code won't just copy and paste into Direct3D 11.


Thanks for the answer. To be honest i didn't even know that there is something called Direct2D. In fact that's what i wanted but after reading your post i realized that setting it up in 3D environment just without the Z-Axis is a better solution.

Can u post some of the older Directx9 books which cover this topic (2D Games in Direct3D)? I think it would help to get into it. The porting is not the problem.

Regards Helgon

Edited by ~Helgon, 28 November 2012 - 05:33 PM.

from time to time i find time


#6 KingofNoobs   Members   -  Reputation: 301

Like
1Likes
Like

Posted 29 November 2012 - 03:50 AM

Helgon,

I would HIGHLY recommend following MJP`s advice and going with SpriteBatch. I have just finished up (well almost) a several months journey getting my spriting working well in D3D11. I have never used SpriteBatch, but I assume it is efficient and easy to use. Send me a PM if you`d like to see my code.

I wonder as I wander...

http://www.davesgameoflife.com


#7 ~Helgon   Members   -  Reputation: 357

Like
0Likes
Like

Posted 29 November 2012 - 10:02 AM

Helgon,

I would HIGHLY recommend following MJP`s advice and going with SpriteBatch. I have just finished up (well almost) a several months journey getting my spriting working well in D3D11. I have never used SpriteBatch, but I assume it is efficient and easy to use. Send me a PM if you`d like to see my code.


Hi, yeah i would like to see your code (to get a feeling)

and the SpriteBatch really seems to be pretty nice. At least even if i wanna do it totally by my self i can have look there how they done it.

Is it made by Microsoft (http://directxtk.codeplex.com/) or is it a project of someone?

Edited by ~Helgon, 29 November 2012 - 10:03 AM.

from time to time i find time


#8 Celiasson   Members   -  Reputation: 504

Like
1Likes
Like

Posted 29 November 2012 - 10:26 AM

As other people already pointed out Spritebatch in DirectX 11 looks pretty nice. Unfortunately I haven't tried it yet, but it looks really neat. Here is some simple documentation, i didn't look too much into it, but it seems fairly simple and there are some further reading in it as well(which I haven't read).

http://directxtk.codeplex.com/wikipage?title=SpriteBatch

Hopefully this can be of any help. If you do anything nice I would love to see the result as well!

#9 ~Helgon   Members   -  Reputation: 357

Like
0Likes
Like

Posted 30 November 2012 - 05:06 AM

So.. no suggestions of any Directx9 books which cover doing a 2D Game in Direct3D ?

from time to time i find time


#10 MJP   Moderators   -  Reputation: 11620

Like
1Likes
Like

Posted 30 November 2012 - 03:33 PM

Is it made by Microsoft (http://directxtk.codeplex.com/) or is it a project of someone?


It was developed by a Microsoft employee (Shawn Hargreaves, who used to work on the XNA Framework), but I don't think it counts as an "official" Microsoft project or anything like that. Either way it totally works, and it has a very similar feature set to the SpriteBatch in XNA (which many many people successfully used to make their 2D games).




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