Jump to content
  • Advertisement

Archived

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

kp

GetPixel function?

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

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

Share this post


Link to post
Share on other sites
Advertisement
Yes it is possible, dont ask me how though, but you really dont want to do that, reading from videomemory is very slow

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!