17,468 reputation
43579
bio website andrewrussell.net
location Brisbane, Australia
age
visits member for 3 years, 9 months
seen 11 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)

Jul
11
comment How do I get access to the SpriteBatch service in my Sprite class using XNA?
You are telling me that it will work and that it might be more performant (it is, if consecutive sprites share the same texture). I don't disagree with you! You suggest that it is more "convenient" - I think you mean "convenient to write". Whereas an indicator of a good architecture is that it is convenient to read. All of these factors need to be balanced. All I am saying is that, on the "nice architecture" factor alone, having a member who's state is shared and changed externally is an ugly design (especially in a class designed to be inherited from).
Jul
11
comment How do I get access to the SpriteBatch service in my Sprite class using XNA?
In particular, the latter design can encourage ugly hacks like: { End; Begin(my settings); DrawMyStuff; End; Begin(try to reset); } - and that is very much un-nice. And, again, architecture is a matter of taste - these are not hard-and-fast rules. You might recall that I don't like DrawableGameComponent, and one reason is that it can force you to use this less-nice architecture (which works, it's just not nice).
Jul
11
comment How do I get access to the SpriteBatch service in my Sprite class using XNA?
@BlueRaja: For performance, it is best to batch together sprites (that have the same texture), and often performance will take precedence over a "nice" design. It is nice to say "share this SpriteBatch object, but leave it in its base (not-in-batch) state when you're done". It's also reasonably nice to say "my draw function takes a SpriteBatch parameter that is already in-batch with the correct settings". It is not so nice to say "share this SpriteBatch object, and trust us that we'll put it in the right state before calling your Draw method".
Jul
11
answered How do I access variables in the Game1 class from another class in XNA?
Jul
11
answered How do I get access to the SpriteBatch service in my Sprite class using XNA?
Jul
10
answered XNA Content Pipeline With Map Creation Utility
Jul
10
comment XNA Content Pipeline With Map Creation Utility
@Roy T: If you have so many tiles that your packed texture is "too big", chances are you probably need to be packing them into one or more textures for rendering performance.
Jul
7
awarded  Enlightened
Jul
7
awarded  Nice Answer
Jul
4
answered in XNA 4.0, How to get the matrix or Vector3 of a model?
Jul
4
answered Changing multisample count or disable/enable multisampling while the program runs?
Jul
3
comment Timer not going off
Normally in XNA you'd use GameTime.ElapsedGameTime in your Update function to provide timing (to count up some time, for a delay, you'd accumulate it in a variable).
Jul
3
comment Using a shader messes up my alpha in XNA
(Of course if you're happy to do color.rgb *= intensity; as your brightness fix-up, then you're still probably better off doing this as a post-process effect.)
Jul
3
comment Using a shader messes up my alpha in XNA
(Alternately, I'm pretty sure most graphics cards offer gamma correction at the output stage - but, you're quite right, XNA doesn't give you a method to access this.)
Jul
3
comment Using a shader messes up my alpha in XNA
@Califer there's no difference in the way that shading works. You're still running a standard pixel shader. The difference is in the way you render. You render your entire scene to a render target, and then you render that render target as a full-screen quad to the screen, via your post-process pixel shader. The "Bloom Postprocess" sample demonstrates how to do this for bloom. All you have do to is find out an algorithm for doing gamma correction.
Jul
2
revised Using a shader messes up my alpha in XNA
added 41 characters in body
Jul
2
answered Using a shader messes up my alpha in XNA
Jul
2
comment Using a shader messes up my alpha in XNA
The number of bits of alpha is only relevant to the stored texture. Once you load it, it works like any other texture and all calculations have the full range of alpha values. Also the default is uncompressed textures, and I doubt Califer changed that.
Jun
29
comment How can I test different TV display types for my XBLIG game?
Here is the relevant documentation
Jun
29
comment XNA and C# vs the 360's in order processor
@Roy T. The "XNA Math Library" (part of DirectX) and the "XNA Framework" are two completely different things with a very unfortunate naming collision. The documentation you linked does not apply to the XNA Framework. The XNA Framework maths types do not use the SIMD/Vector unit.