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

23h
comment XNA - Store and define level event
(Note that I just added a quick update to my answer on the question you linked.)
Apr
8
comment Farseer: How can I break a body into multiple pieces?
In the original those loops are intended to set the center position of each of several rectangles to different values. But the original doesn't have valid parameters (as the writer indicated: "off the top of my head"). Like I said: check the overloads for CreateRectangle. There is a version that takes both half-sizes and a position.
Apr
6
comment Farseer: How can I break a body into multiple pieces?
You need to learn how to debug small programs. Take a very close look at PolygonTools.CreateRectangle (look at the Farseer source, read the doc comments). What parameters does it take? With the parameters you are giving it, will it output what you expect? If you step through in the debugger and inspect the output, does it match your expectation? What about the overload that takes more parameters - are they parameters that you need to set? Repeat the process for new BreakableBody. You will find the bug.
Apr
4
comment Farseer: What can I do so that a body can move through a special kind of bodies?
Study the Farseer samples. There are samples that demonstrate this.
Apr
2
comment gap when drawing string with xna
@ClassicThunder SpriteBatch should be setting those states itself when you call Begin.
Apr
2
comment How do I convert a .dds texture to .png bitmap in C#?
To those voting to close this as "off-topic": It's not. Check the rules. It's covered under "asset pipelines" and "game-related APIs".
Apr
1
comment How can I determine the contact point of a collision?
@Homer_Simpson Ack. Another simple bug in my code :\ Although I really hope you were able to figure that one out on your own! (Please keep in mind that I'm typing these out directly, no IDE.)
Mar
31
comment How can I determine the contact point of a collision?
To answer your additional question: worldPoints[0] is the first point (zero-based indexes) and worldPoints[1] is the second point (if it exists - re-read my answer for why it might exist). worldPoints[2] will give you an "index out of range" error ([2] refers to the third point, but the number of points is limited to two).
Mar
31
comment How can I determine the contact point of a collision?
@Homer_Simpson Apologies. That was a bug in my code. The point count is actually stored in the contact manifold. See my latest edit.
Mar
30
comment Height and width of a Farseer body?
Body.UserData can store any object. So you can simply store it in that field as a Vector2. Then use a cast like (Vector2)Body.UserData to access it.
Mar
30
comment How can I determine the contact point of a collision?
@Homer_Simpson I've updated my answer to hopefully clarify things.
Mar
30
comment How can I determine the contact point of a collision?
Note that the contact point will never be mathematically "exact". It will be close enough.
Mar
29
comment gap when drawing string with xna
The default parameter to Begin is DepthStencilState.None. So as long as you are passing that or null, or using an overload where it is not specified, the depth buffer should not be the issue.
Mar
28
comment How can I create a bomb explosion in Farseer that pushes nearby objects away?
It's worth pointing out that Farseer comes with a sample that implements explosions. It's "AdvancedDemo5" (in the current source). It's similar to the proximity method in Classic Thunder's excellent answer, only less-sophisticated (a fixed-magnitude impulse within an AABB).
Mar
28
comment How can I create a bomb explosion in Farseer that pushes nearby objects away?
I wonder if the particle system performance could be improved with a custom particle system, given that Farseer bodies are quite "heavy" objects (performance-wise). There seems to be lots of potential for various hybrids between the ray-casting method and the particle-system method.
Mar
19
comment How can I use a Texture2D larger than 2048 x 2048?
Here's my answer to a similar situation over on Stack Overflow.
Mar
18
comment Looking for XNA patterns
Please keep in mind that this is not a meaningful decoupling unless you have multiple DrawModel types (at the same time). It will be far quicker to keep a simple architecture (ie: member Draw methods) and, when the time comes, to create a branch in version control (you are using that, right?) and do a "Find All References" to the Draw method and modify those methods to modernise the graphics. There is an excellent chance that any complicated architecture you create now will be "wrong" for advanced graphics in any case! So the less code you have to write and maintain now, the better.
Mar
18
comment Looking for XNA patterns
(Also take a look at this presentation (YouTube) for some more relevant thoughts.)
Mar
18
comment Looking for XNA patterns
@nuclearsweet A lot of game development is getting a "feel" for how much architecture you need. It's very easy to go overboard. If you start with something extremely simple, you can get an idea of how little architecture you can get away with. Generally: less architecture == less code == easier to modify == better. (Work down my list in my afforelinked "game architecture" answer, not up.)
Mar
18
comment Unit Testing a C#/XNA Game Project
And the idea that unit tests need to be run "often enough" (as in: always, in an automated way) is bogus. Code that doesn't change obviously doesn't need to be re-tested. And when the code is being modified, the developer doing the modifications should be doing so while utilising the appropriate available tests (visual, code-based or otherwise). Obviously there exists code with a certain risk profile where an automated test is a worthwhile time investment. But such scenarios are especially rare in game-development.