Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Farseer to make a game in XNA and I can't seem to figure this out.

I've decided to use MSTerrain for making my game's terrain because I wanted destructible terrain and MSTerrain seemed like the best bet. Unfortunately, I'm stumped on how to actually show the terrain. When I generate the terrain it's visible in debug view, but MSTerrain does not have a Draw method, so I'm wondering how it is supposed to be drawn to the screen? Is it worth pursuing?

I'm starting to think that MSTerrain is more trouble than it's worth, is there another better way to do this with bodies?

share|improve this question
This page has an example of what can be done with MSTerrain in farseer: maybe that can help you decide if its worth pursuing. – JensB Feb 5 '13 at 14:17

MSTerrain works by using the Marching Squares algorithm which expects a bit field to determine whether terrain exists or not. Normally you would pass in a black and white texture that defines where the terrain exists and then MSTerrain triangulates it. The handy part of this whole process is that you can then apply changes to this terrain and only have to rebuild those small parts.

Drawing an MSTerrain is left to the user as each terrain will likely be rendered differently. The most basic method would be to use the AlphaTest effect and use the texture that defines the terrain as the template for the graphical version of the terrain. This would allow holes and chunks to be changed without changing the initial graphical representation of the terrain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.