Path: chuka.playstation.co.uk!dialup-07-22.netcomuk.co.uk!user From: ira@netcomuk.co.uk (Ira Rainey) Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: pixels Date: Mon, 07 Jul 1997 20:22:09 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 23 Message-ID: References: <33c122d9.168381829@news.scea.sony.com> NNTP-Posting-Host: dialup-07-22.netcomuk.co.uk X-newsreader: MT-NewsWatcher 2.2.2 In article <33c122d9.168381829@news.scea.sony.com>, jamin1@psu.edu (Jamin Frederick) wrote: > Hi, how's it going? I'm working on my pixel-by-pixel collision > detection algorithm, and I've run into a problem of actually trying to > access pixel data of sprites. It seems like I won't be able to access > the data the lies in the video memory once it has been transferred > from the main memory, since there are no api calls to do this It's just a thought, but how about setting yourself an area of memory aside, the size of the bounding box of your sprite, as a buffer. Then when you want to test to see if a collision has occured, first test the bounding box area, if that is true then copy that bounding box into your main memory area buffer using StoreImage(); then test it there. If the pixels collide you can run your collision stuff, if not drop back to the main loop. What does anyone else think? Ira -- "The difference between the impossible and the possible lies in determination" -- Tommy Lasorda