18,118 reputation
53682
bio website andrewrussell.net
location Brisbane, Australia
age
visits member for 4 years, 1 month
seen 4 hours 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
16
revised Loading a stream/asset on Android MonoGame without ContentManager
Fixed title and tags
Jun
16
comment Spritesheet filesize gets huge after compiling
@ClassicThunder Specifically, the XNB format has a compression mode that is basically equivalent to zipping the file. By default it is only turned on in release builds. The setting is in your game project properties (not the content project itself), under "Content Build".
Jun
16
comment How do I align the matrix used in SpriteBatch and the matrix used in BasicEffect?
@EmirLima Yes, but usually that is not the objective. The objective in most cases - including the OP's case - is to line up with screen pixels in the same way that SpriteBatch does. See the links in my answer for more details (and note, of course, this applies to XNA and DirectX 9, but not to DirectX 10 and OpenGL).
Jun
15
comment Tile textures on 3D models. HLSL shader code maybe?
This will only give the OP's desired effect if their model's UVs extend beyond the 0-1 range. To get tiling without modifying the model, you'd need to also multiply UVs in the pixel shader, to get them to the desired range.
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.