Browsed by
Month: October 2010

My name is Crappy Coding Guy, and I use Texture2D.GetData

My name is Crappy Coding Guy, and I use Texture2D.GetData

In a previous post about texture modification, I mentioned the evils of transferring data from the GPU to the CPU, and then presented an example showing one way to avoid doing it. The post wasn’t really about deformable 2D terrain or collision detection, but was intended to help newer game programmers open up a new way of thinking when it comes to using the GPU to accomplish tasks.

Since that post, and the one showing a video of my WP7 game, I’ve received a couple of questions about how I do the collision detection in Guardian, which would seem to require the use of Texture2D.GetData.

Guardian WP7 Bosses

Guardian WP7 Bosses

Added some tough “boss” asteroids. This one just has a single kill point so it’s relatively simple. Later waves will require destroying multiple targets for the kill. Still need to add a destruction sequence when it’s destroyed, rather than just fading away like it currently does.