how to make a FAST SetPixel function?

Started by
5 comments, last by Ilankt 20 years, 8 months ago
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]
How appropriate, you fight like a cow!
Advertisement
Impossible. Use textures or surfaces. Pixels are ALWAYS slow.
(Or tell your user to stick a sticker on the monitor)

.lick
lol...
damn...
if i will use a sprite 1*1 pixel, it wont be slow?
How appropriate, you fight like a cow!
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
--------------------------------------------- If God with me, Who against me?Personal Web Samuel Prince Blog...
err.. why not just use points (D3DPT_POINTLIST)?
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
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
// Full Sail graduate with a passion for games// This post in no way indicates my being awake when writing it

This topic is closed to new replies.

Advertisement