GetPixel function?
Hi everyone!
I''m thinking about the collison detection for my game and I wonder if it''s possible to get the color of a pixel from my surface (lpddsprimary) and return it as a RGB-value or as a hexadecimal color value.
// kp
Yes it is possible, dont ask me how though, but you really dont want to do that, reading from videomemory is very slow
Collision Detection is usually a two-step process. A larger stage where you have a virtual box(bounding box) around the sprite and compare it to other bounding boxes to see if they overlap. 95% of the time you can do this quick check and it should suffice.
Or you could have a spite with 2 or more bounding boxes.
How accurate do you need it ?? Because in any furious action the user''s not going to notice TOO much.
Are we talking 3D or 2D??
ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site
Or you could have a spite with 2 or more bounding boxes.
How accurate do you need it ?? Because in any furious action the user''s not going to notice TOO much.
Are we talking 3D or 2D??
ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement