Sign in to follow this  

Modify a texture by pixels

This topic is 3585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I want to implement explosives weapons in my game like C4. To draw my map, I'm using the ID3DXSprite interface with one texture (which contains tiles : grass, wall etc). To be more realistic, I want that the wall could be destructible by pixels not by tiles (not like bomberman). So, for destructible objects in the game, I will create a class which contains a texture (LPDIRECT3DTEXTURE9) and others properties. But I want to know how to modify a texture by pixels. Or if my method is wrong, how can I proceed ? Thanks for all !

Share this post


Link to post
Share on other sites
Printing an explosion decal over the terrain would actually be way faster than changing the color of the pixels one by one.

Share this post


Link to post
Share on other sites
Ok, but I don't see how to draw the decal only on the destructible objects. I mean, if there are others tiles around.



Thanks for the help :)

Share this post


Link to post
Share on other sites

This topic is 3585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this