800 reputation
614
bio website martindevans.appspot.com/blog
location Worcester, United Kingdom
age 24
visits member for 4 years, 1 month
seen yesterday
Comp-sci student at Birmingham University (08 class) Startup indie game developer

Aug
26
comment Gaussian blur not working correctly
You seem to be applying both an X and a Y offset (I think, I do HLSL usually), which means you'll be sampling a diagonal line of pixels. The two stage gaussian blur should only offset in X in the horizontal pass, and only offset in Y on the vertical pass.
Apr
1
comment XNA 4: GetData from Texture2D and Set it into Texture3D with specific order
At the moment you're reading out the data, buffering it up in an array and then writing it all in one go. I'm not sure why that isn't working, but I think it might be worthwhile trying reading the data (in 32x32 sections) and then writing those sections to the Texture3D straight away (there's an overload of setdata for that).
Apr
1
comment XNA 4: GetData from Texture2D and Set it into Texture3D with specific order
What you have look right to me. It might be worth trying copying across the data level by level rather than buffering it in an array.
Oct
29
comment XNA hlsl tex2D() only reads 3 channels from normal maps and specular maps
I've found that a lot of applications do funky things with alpha when saving (e.g. if alpha is 0 colour data is discarded for that pixel). Are you absolutely certain the data being saved into your files is what you think it is?
May
28
comment How to sync game tick in peer to peer game?
exact synchronisation of clocks is impossible, so the question is how synchronised do you need? You'll need better sync if it's a twitch shooter vs a turn based strategy game. What kind of game are we talking about?
Jan
18
comment How do I implement a physics gun?
I know I need to handle translation, but I'm not sure exactly what the problem is that's causing rotation when I translate in the current version. Of course if I don't know that, then I don't know how I need to change the transform matrix to fix it :(
Dec
27
comment XNA: Networking gone totally out of sync
As far as I can tell this code shouldn't work for more than 1 vs 1. It says here (msdn.microsoft.com/en-us/library/bb975947.aspx) that sending the packet clears it. This does however means you can simplify the code a little to remove the (probably) superfluous flush and seek to zero
Dec
27
comment XNA: Networking gone totally out of sync
you definitely don't want to send network updates every frame. That's a fantastic way to overload router buffers and introduce massive latency.
Dec
14
comment XNA 4 Deferred Rendering deforms the model
If it renders correctly using basiceffect then I don't think it can be a problem with the primitive type. My guess would be something wrong with the vertex shader, but it looks ok :/
Dec
12
comment Improving SpriteBatch performance for tiles
Are you drawing other parts of the world which go "on top" of the tiles (e.g. characters) in the same spritebatch begin/end block?
Nov
25
comment Why is Spritebatch drawing my Textures out of order?
Have you tried SpriteSortMode.Immediate?
Nov
13
comment How to avoid circular dependencies between Player and World?
@snake5 Saying adding more classes adds overhead for the programmer is often completely wrong in my experience. In my opinion 10x100 line classes with informative names and well defined responsibilities is easier to read and less overhead for the programmer than a single 1000 line god class.
Sep
25
comment Checking for alternate keys with XNA IsKeyDown
Either that, or you preallocate an array of keys. I'll add something to my answer...
Sep
25
comment Checking for alternate keys with XNA IsKeyDown
@Jocull, absolutely right. Any takes a Func<Keys, bool> and IsKeyDown is a Func<Keys, bool> so all is fine :D
Sep
25
comment Checking for alternate keys with XNA IsKeyDown
@jocull, I don't need x => state.IsKeyDown(x), the above compiles just fine :)
Jan
16
comment What are some cool examples of procedural pixel shader effects?
@Michael: Fixed it to link to a page on his new website which includes the pdfs as well as a summary of the technique.
Jan
16
comment What is a good starting platform for a teenage game programmer?
@bobobobo you're welcome to write a better answer. This kind of question has no definitive correct answer though, which means that the best answers will all simply be listing possibilities.
Dec
31
comment How to create a very specific kind of joint in Farseer?
I don't understand why that didn't work, but I do see an alternative that is guaranteed to work. If you use a prismatic joint connecting the center to the two outer ones, with the minimum and maximum limit set to the length (remember to enable joint limit) then they cannot rotate around the center, only slide within a range of 0
Dec
30
comment How to create a very specific kind of joint in Farseer?
Hmm, I may be wrong with this, but if you attach the distance joints from the objects to the centre anchor anywhere other than the centre of the anchor I think that ought to prevent rotation of the system.
Dec
22
comment How to create a very specific kind of joint in Farseer?
Also, do weld joints serve the correct purpose? I thought they prevented relative rotation of the two welded points, which is not what you want?