XNA - Drawing 2D Primitives (Boxes) and Understanding Matrices in Computer Graphics

Posted by MintyAnt on Game Development See other posts from Game Development or by MintyAnt
Published on 2011-11-20T20:45:39Z Indexed on 2011/11/21 2:09 UTC
Read the original article Hit count: 454

Filed under:
|
|
|

I have two issues which I wish to solve by creating 2D primitives in XNA.

  1. In my game, I wish to have a "debug mode" which will draw a red box around all hitboxes in the game (Red outline, transparent inside). This would allow us to see where the hitboxes are being drawn AND still have the sprite graphics being drawn.

  2. I wish to further understand how matrices work within computer graphics. I have a basic theoretical grasp of how they work, but I really just want to apply some of my knowledge or find a good tutorial on it. To do this, I wish to draw my own 2D primitives (With Vertex3's) and apply different transormation matrices to them.

I was trying to find a tutorial on drawing primitives using Direct3D, but most tutorials are only for c++, and just tell me to use XNA's Spritebatch. I wish to have more control over my program than just with Spritebatch.

Any Help on using Direct3D or any other suggestions would greatly be appreciated.

Thank you.

© Game Development or respective owner

Related posts about XNA

Related posts about 2d