Archived

This topic is now archived and is closed to further replies.

Plotting Pixels in D3D8

This topic is 5970 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

I''m currently making a game by using the ID3DXSprite interface in DirectX 8. How do you plot pixels? Is it possible to mingle the ID3DXSprite mode and still use DrawPrimitive?

Share this post


Link to post
Share on other sites
Yeah. Well, I''m trying to create a game, an asteroids -type clone except with a million extra bells and whistles (i won''t reveal in depth and i''m trying to create additions to the bitmapped explosions - particle systems. so basically i just create a small vertex buffer with one vertex? cool! thanx a lot -

Cipher3d

-gamedev rules!

Share this post


Link to post
Share on other sites
creating a vertex buffer with only one vertex is quite suboptimal. Unless of course you only have one vertex...

If I can restate your problem, it sounds like you want to have particle explosions with particles flying every which way. You probably also want them to be fairly random looking and nonrepetitive. If that's the case, consider the following:

Create a vertex buffer containing a random, very small cloud of points in 3D (I don't know, say 50ish points??) Now, on each frame, apply a scaling matrix to the point cloud to expand it. I haven't tried it, but this should give the effect of a burst of particles. But it's repetitive, so...

Each time there is a new explosion, apply a random rotation to the 3D cloud. If the points are random and the rotation is random, each explosion should look fairly unique. There may even be some value to slowly rotating the cloud during the rescaling to add extra motion.

Even if the exact details above don't work as you want them, this is probably a decent framework. If you really wanted to do something cool, you could use a vertex shader to explode along random, preset notmals and adjust the alpha of each particle so that they slow down and fade at the edges of the explosion.

Yes, yes, you're drawing 2D - by the time the 3D cloud is rendered, it is 2D, unless of course you have a DTI monitor...



Edited by - CrazedGenius on August 14, 2001 1:32:35 AM

Share this post


Link to post
Share on other sites