How to implement a Worms style destructible terrain in XNA?

前端 未结 4 722
轮回少年
轮回少年 2021-01-30 18:16

I want to prototype an idea for a game I have. The idea for this game is that the player will dig through the ground, creating tunnels and finding treasure.

I\'m looking

4条回答
  •  天涯浪人
    2021-01-30 18:54

    Here are two examples that build on each other of how to do this with pixel shaders in XNA 4. Both examples include sourecode.

    http://www.syntaxwarriors.com/2012/xna-alpha-mapping-with-pixel-shaders/

    http://www.syntaxwarriors.com/2012/xna-alpha-mapping-with-pixel-shader-and-rendertarget2d/

    Doing this with pixel shaders is very fast as all the heavy lifting is done on the gpu.

提交回复
热议问题