Archived

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

Ilankt

how to make a FAST SetPixel function?

Recommended Posts

I need to make a mini-map for my RTS game, and I dont have any ideas, only to put alot of pixels, but SetPixel API STINKS, so, what to do? Edit:I'm using DirectX 8.1 and C++. [edited by - ilankt on August 13, 2003 3:53:15 PM]

Share this post


Link to post
Share on other sites
What i do, is create the surface once and create a visibility mini-map, then if any actualization is needed in the mini-map or the visibility mini-map, i send them to a quey and updated each 3 seconds, so it just cost me a few pixels that are updated each 3 seconsd if so.

But set the pixels with Lock and update your memory, it is faster than SetPixel.

Hope this help


---------------------------------------------
If God with me, Who against me?
Sitio de desarrollo de videojuegos en español
Digital Moon Studio...

There is no spoon

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
err.. why not just use points (D3DPT_POINTLIST)?

Share this post


Link to post
Share on other sites
Ok here''s how im doing it.

When i load up my map i create the mini map or you can have a pre made texture. The usijng y partical system ill be drawing very small quad with difffuse set to the colour of the player.

Basicly sine your using all triangles there no worry about pixel plotting slow downs

Share this post


Link to post
Share on other sites
Although I am not the one that decided to use them and admittadly don''t have any idea if using them is a good idea or not for a minimap but I believe my team is using the d3dx sprites for the minimap units markers.

// Full Sail Student with a passion for games
// This post in no way indicates my being awake when writing it

Share this post


Link to post
Share on other sites