Skip to main content
adjusted formatting on using method names in sentences and fixed "I'm"
Source Link

'mI'm currently working on a Worms game which involves terrain deformation. I used to do it with .GetData.GetData(), modifying the color array, then using .SetData.SetData(), but I looked into changing it to make the work done on the GPU instead (using RenderTargets).

All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use .GetData.GetData() every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.

What I would be okay with is using GetData.GetData() once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?

'm currently working on a Worms game which involves terrain deformation. I used to do it with .GetData, modifying the color array, then using .SetData, but I looked into changing it to make the work done on the GPU instead (using RenderTargets).

All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use .GetData every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.

What I would be okay with is using GetData once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?

I'm currently working on a Worms game which involves terrain deformation. I used to do it with .GetData(), modifying the color array, then using .SetData(), but I looked into changing it to make the work done on the GPU instead (using RenderTargets).

All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use .GetData() every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.

What I would be okay with is using .GetData() once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?

Tweeted twitter.com/#!/StackGameDev/status/56554187521146880
Source Link
Benixo
  • 669
  • 3
  • 14

XNA 2D Collision Detection without GetData()

'm currently working on a Worms game which involves terrain deformation. I used to do it with .GetData, modifying the color array, then using .SetData, but I looked into changing it to make the work done on the GPU instead (using RenderTargets).

All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use .GetData every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.

What I would be okay with is using GetData once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?