Change vertices on-the-fly

Topics: Developer Forum
Nov 19, 2012 at 12:32 AM

I'm developing a side-scroller type game with a destructible, editable environment. My plan is to use the image to vertices function to do this.

But is there performant way to keep changing the body by sending a new image when the landscape changes? Or what would be the best way to do this?

 

Thanks!

Coordinator
Nov 20, 2012 at 8:22 PM

The best way is to use the marching squares algorithm in the engine. Take a look at the Testbed project (find it under the download tab at the top of the page) and load the DestructibleTerrainMSTest - it is the one with the green monkey in it. (use O and P keys to circle the tests)

Nov 22, 2012 at 10:52 PM

Thanks!

As always, soon after posting I actually found this. I have been through all the tests, but that one was skipped because the project was missing the XNA define. I've got a new question about MS so will create a new thread.