Sign in to follow this  
Kr00pS

Modify a texture by pixels

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

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