Reza Nourai's Game Development RamblingsRandom discussions about game development. Particularly math, physics, collision detection/response, and performance.http://blogs.msdn.com/b/rezanour/atom.aspxTelligent Evolution Platform Developer Build (Build: 5.6.50428.7875)2011-05-15T14:12:00ZMoving to wordpresshttp://blogs.msdn.com/b/rezanour/archive/2014/06/01/moving-to-wordpress.aspx2014-06-02T02:26:18Z2014-06-02T02:26:18ZTo give me a bit more flexibility and control over the blog, I'm moving this blog to http://rezanourai.wordpress.com/ . I've migrated the majority of the content over already. Also, feel free to look for updates on my twitter, @RezaNourai...(<a href="http://blogs.msdn.com/b/rezanour/archive/2014/06/01/moving-to-wordpress.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10530121" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxIntroduction to Geometric Querieshttp://blogs.msdn.com/b/rezanour/archive/2014/03/02/introduction-to-geometric-queries.aspx2014-03-02T15:04:18Z2014-03-02T15:04:18ZJust about every game, whether simple or complex, will require making geometric queries. It’s a fundamental part of building a game, so I wanted to cover it before we go further. Geometric queries also act as building blocks for many more things that we’ll talk about in upcoming posts.
So what is a geometric query , anyway? It’s a generic term that covers all questions involving shapes, positions, orientations, and anything else geometry related. Here are some common examples...(<a href="http://blogs.msdn.com/b/rezanour/archive/2014/03/02/introduction-to-geometric-queries.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10504404" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxReviving the bloghttp://blogs.msdn.com/b/rezanour/archive/2014/02/08/reviving-the-blog.aspx2014-02-08T22:13:20Z2014-02-08T22:13:20ZAs you may have heard, the Xbox One shipped! :)
I spent the past 2 years working on various OS components for the Xbox One, including much of the multitasking work for the system (what allows you switch quickly from app to app, or from game to app and back. And run multiple apps side by side), the live rendering of the game you see in the dash when you pop back with the Guide button, and various other things throughout. That's also the reason why my blog has been pretty quiet, things were intense...(<a href="http://blogs.msdn.com/b/rezanour/archive/2014/02/08/reviving-the-blog.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10497857" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Rotation Representations and Quaternionshttp://blogs.msdn.com/b/rezanour/archive/2012/04/29/math-primer-series-rotation-representations-and-quaternions.aspx2012-04-30T03:12:03Z2012-04-30T03:12:03ZWe saw the power and usefulness of transforms in the previous primer posts, and we’ll be using them quite a bit in our discussions of physics and graphics. One of the first tasks we’ll need to do is determine how to represent our transformations in code. We’re going to be creating, manipulating, and animating these transformations over time, so they must be easy and efficient to work with. Particularly, we’d like to be able to manipulate the individual components (translation, rotation, and scale...(<a href="http://blogs.msdn.com/b/rezanour/archive/2012/04/29/math-primer-series-rotation-representations-and-quaternions.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10298958" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMore posts coming, magazine article published!http://blogs.msdn.com/b/rezanour/archive/2012/04/22/more-posts-coming-magazine-article-published.aspx2012-04-22T19:34:51Z2012-04-22T19:34:51ZI apologize for the lack of updates in a while, but things have been pretty busy at work. I’m working on a new post and I’d love to get some feedback on what topics people want to see most in the future. Topics I have planned: Finish the math primer (rotations & quaternions) Collision detection infrastructure Common collision detection algorithms in detail (multiple posts) Physics simulation infrastructure Common physics integration and solver algorithms (multiple posts) Architecture and building...(<a href="http://blogs.msdn.com/b/rezanour/archive/2012/04/22/more-posts-coming-magazine-article-published.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10296248" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Matrices III: Affine Transformations and Matriceshttp://blogs.msdn.com/b/rezanour/archive/2011/11/20/math-primer-series-matrices-iii-affine-transformations-and-matrices.aspx2011-11-21T00:13:49Z2011-11-21T00:13:49ZWe’ve seen matrices used as representations of a basis, and we’ve seen them used as linear transformations, but what else can we do with them? So far, we’ve only been able to use matrices to transform vectors from one vector space to another. What about points and vectors in an affine space? There is another class of transformation, called an affine transformation, which does exactly this. Affine Transformations An affine transform is a transformation which maps points and vectors in an affine space...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/11/20/math-primer-series-matrices-iii-affine-transformations-and-matrices.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10238972" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Matrices II: Linear Transformationshttp://blogs.msdn.com/b/rezanour/archive/2011/10/02/math-primer-series-matrices-ii-linear-transformations.aspx2011-10-03T05:36:30Z2011-10-03T05:36:30ZIn the last installment of the math primer series, we looked at the basics of matrices. Today, we’ll take a look at using matrices for linear transformations, which are one of the most common uses of matrices in games. But, before we dive into linear transformations, let’s take a quick look at what a transformation is, and why we represent them using a matrix in the first place. A transformation is any operation that maps values from one space to another. In the context of standard algebra, we are...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/10/02/math-primer-series-matrices-ii-linear-transformations.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10219052" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxIntro to Physics in Gameshttp://blogs.msdn.com/b/rezanour/archive/2011/10/02/intro-to-physics-in-games.aspx2011-10-02T23:35:30Z2011-10-02T23:35:30ZI’ve decided to try something a bit different and mix in physics posts while I wrap up the math primer. Many of you might be more interested in the physics, or may already be familiar with the math topics, so this gives me a chance to have something for everyone. Today, we’ll look at some of the core concepts around physics simulations in video games. We’ll go over some terminology and approaches so that we’re all on the same page when discussing more involved topics in later posts. First off, we...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/10/02/intro-to-physics-in-games.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10219002" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Matrices I: Introduction and Basics Operationshttp://blogs.msdn.com/b/rezanour/archive/2011/09/05/math-primer-series-matrices-i-introduction-and-basics-operations.aspx2011-09-06T01:02:43Z2011-09-06T01:02:43Z  Few things are as ubiquitous in game and graphics programming as a matrix. In this installment of the math primer, we take a look at these structures, investigating not only their numerical significance, but also what they represent visually. Next time, we’ll see how to combine them with vectors and with other matrices to form complex transformations, which we rely heavily on in game code. Matrices are the Basis of Everything When we refer to a coordinate system, we represent the system with...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/09/05/math-primer-series-matrices-i-introduction-and-basics-operations.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10206510" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxBarycentric Coordinates and Point in Triangle Testshttp://blogs.msdn.com/b/rezanour/archive/2011/08/07/barycentric-coordinates-and-point-in-triangle-tests.aspx2011-08-07T20:50:00Z2011-08-07T20:50:00ZI know it’s been a little while since my last post, and I apologize. I’ll try and keep the posts a little more frequent moving forward.
In the last post, we briefly encountered barycentric coordinates and loosely defined them as the coefficients of an affine combination. While that’s true, we can do better. We can define a more precise definition, and we can take a closer look at what they really mean, both numerically and geometrically. That’s the topic of this post, as...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/08/07/barycentric-coordinates-and-point-in-triangle-tests.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10193459" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx2011-06-26T07:18:00Z2011-06-26T07:18:00ZIn this chapter of our primer, we’ll examine affine spaces, and see what affine and linear combinations are. Furthermore, we can use these concepts to define some other related concepts, such as affine and linear dependency.
Affine Space
An affine space can be thought of as any space containing points and vectors together, which follow the rules we established in the previous posts: any point plus a vector gives a point, and the difference of two points is a vector. The key is that affine...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10179119" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Vectors II: Vector Operationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/01/math-primer-series-vectors-ii-vector-operations.aspx2011-06-02T02:57:00Z2011-06-02T02:57:00Z  In the last installment of this math primer, we looked at the difference between points and vectors. Today, we’ll dive a little bit deeper into vectors, and the specific operations we can perform on them. More importantly, we’ll take a look at the geometric significance of the many operations, and how they can help us in building a game. We’ll focus primarily on unary and binary operations of vectors. There are a few interesting ternary operations as well, but I’ll leave those for interested...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/06/01/math-primer-series-vectors-ii-vector-operations.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10170551" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Vectors I: Points vs. vectorshttp://blogs.msdn.com/b/rezanour/archive/2011/05/19/math-primer-vectors-i-points-vs-vectors.aspx2011-05-20T01:40:00Z2011-05-20T01:40:00ZSome math and physics libraries contain separate data types to represent points and vectors. I’ve seen many people become confused by this, since more commonly packages use vectors exclusively for everything. What’s going on here? Why have 2 separate types? Well, the answer is quite simple. Strictly speaking, a point is not a vector and a vector is not a point! We’ll come back to why many packages, XNA included, use vectors to represent points and why that can make sense later.   Points A point...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/05/19/math-primer-vectors-i-points-vs-vectors.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10166523" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMath Primer Series: Intro, Notation, and Referenceshttp://blogs.msdn.com/b/rezanour/archive/2011/05/18/math-primer-series-intro-notation-and-references.aspx2011-05-19T02:56:00Z2011-05-19T02:56:00ZThis is the first part of a multi-part primer and reference for the math we’ll be using extensively throughout this blog. If you’ve been around game or graphics programming for any length of time, you’re probably at least somewhat familiar with many of these topics. However, you might be a bit rusty or might not know some of the more advanced details, so I’ll try and review as much ground as I can. Please either bear with me through the basics or just skip ahead to my later...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/05/18/math-primer-series-intro-notation-and-references.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10166135" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashxMy First Posthttp://blogs.msdn.com/b/rezanour/archive/2011/05/15/intro.aspx2011-05-15T21:12:00Z2011-05-15T21:12:00ZThe first post... what should I talk about? I guess a little about me, and a little about what's coming up in the blog.
My name's Reza Nourai, and I'm a developer on the XNA Game Studio Team. I like video games... a lot! I like to play them, and I like to make them. I've grown particularly fond of the interactive part of games. Specifically, the interactions between objects and their environment, the physical simulation of these objects, and collisions and responses when they come into contact...(<a href="http://blogs.msdn.com/b/rezanour/archive/2011/05/15/intro.aspx">read more</a>)<img src="http://blogs.msdn.com/aggbug.aspx?PostID=10164657" width="1" height="1">Reza Nourai - MSFThttp://blogs.msdn.com/rezanour_4000_hotmail.com/ProfileUrlRedirect.ashx