17,958 reputation
53681
bio website andrewrussell.net
location Brisbane, Australia
age
visits member for 4 years
seen 47 mins ago

Hi! I am Andrew Russell. I'm an indie game developer from Australia. I'm a Microsoft MVP for XNA/DirectX.

Visit my blog at AndrewRussell.net or follow me on Twitter @_AndrewRussell.

Spending too much time procrastinating on Stack Exchange? Or wish you could block the Internet for a while, but need to whitelist Stack Exchange? Check out my Kickstarter: Connect for a Reason.


My current game dev project is Stick Ninjas A 2D multiplayer platformer-shooter. I'm doing a weekly DevLog video series about it, which you can watch on YouTube.

My previous projects include:

  • ExEn, a cross-platform port of XNA that runs on iOS, Android and Silverlight
  • Light Blocks: cross-platform falling-block game to demonstrate ExEn
  • Dark: A 2D physics-platformer with fancy lighting effects (PC and Xbox 360)

Jun
15
comment Pixel-Perfect Collision With Rotation
Official tutorial: xbox.create.msdn.com/en-US/education/catalog/tutorial/…
Jun
14
comment How can I create a seesaw with Farseer Physics Engine?
World.RemoveJoint
Jun
14
answered How can I create a seesaw with Farseer Physics Engine?
Jun
12
revised XNA 4: RenderTarget2D textures getting transparent on fullscreen
Removed incorrect option
Jun
12
comment XNA 4: RenderTarget2D textures getting transparent on fullscreen
And option 1 is actually incorrect. It allows you to set the render target back onto the device without clearing it. It has nothing to do with content-lost and does not solve that problem. (I have taken the liberty of editing the answer to reflect this.)
Jun
12
comment XNA 4: RenderTarget2D textures getting transparent on fullscreen
Option 2 is slow if you do it every frame. It's reasonably fast if you do it once at start-up. Your exception is because you're using the API wrong (ask a new question if you need help). Option 3 requires a handler on every render target that doesn't get refreshed every frame.
Jun
9
revised Shifting from XNA/C# to C++?
added 17 characters in body
Jun
8
revised Rotation matrix for a 3D vector
deleted 484 characters in body
Jun
8
answered Rotation matrix for a 3D vector
Jun
2
comment XNA Guide text input - maximum length
Probably have to implement your own keyboard.
Jun
2
comment XNA Guide text input - maximum length
There doesn't seem to be a way to do this. What you see in the Guide class API is what you get.
May
31
comment Transparency in XNA-4 primitives
"Triangulation" usually implies working on concave shapes, given that convex shapes are trivial to triangulate. Generally you use a library to do the triangulation for you. A good library will handle polygons with holes correctly. Using quads is not really recommended - as they'll be converted to triangles anyway (quads are less efficient, less flexible). But using quads could be easier if you want a "quick and dirty" solution that doesn't depend on a third-party library.
May
31
comment Transparency in XNA-4 primitives
(It's worth pointing out that the solution you have linked - using a texture with the desired areas cut-out using alpha-testing - will also work. But it's a very different solution, and has a different set of tradeoffs for performance, visual quality and ease-of-use.)
May
31
comment RenderState in XNA 4
Here is the blog post that details the removal of the alpha test render state in XNA 4.0 (and the introduction of state objects). If alpha-testing is all you need, there is a built-in AlphaTestEffect that you can use.
May
31
comment Transparency in XNA-4 primitives
To help with your searching, the name of the general solution to this problem is "Triangulation" - ie: taking an outline (and possibly additional outlines for holes) and converting that into a collection of triangles that can be used for rendering.
May
30
comment XNA, how to draw two cubes standing in line parallelly?
@user3535716 Just set the DepthStencilState (as in János's code) before GraphicsDevice.DrawPrimitives gets called (same for other Draw* methods). What you will probably find is that the underlying cause of your problem is this.
May
29
comment XNA, how to draw two cubes standing in line parallelly?
Actually he's wrong. You cannot modify a state object once it has been set onto a device. Nor can you modify the default states. You'd need to create a custom DepthStencilState object, if you wanted something other than Default. Source. Suggest you edit it back.
May
24
awarded  Stellar Question
May
22
comment SpriteBatch, trying to reduce draw calls
Note that profiling this kind of thing can be tricky - for example: is it the CPU or GPU slowing you down? As I said, at this stage you've basically maxed-out the performance for SpriteBatch (providing every particle you draw uses a single texture - see here). To improve performance, you have to go beyond SpriteBatch. If the CPU is slowing you down (and it probably is), perhaps you need to offload onto the GPU (rough example here).
May
22
comment SpriteBatch, trying to reduce draw calls
Uh... the only time Immediate mode is faster is when you've only got a couple of sprites per batch. So unless that particle system has, like, three particles in it, you're going to want to use Deferred.