1

Topic: Pixel-by-pixel intersections on directX?

All greetings of Portiruju 2D a toy from an old engine. There is a problem to make pixel-by-pixel intersections. At me units are represented by means of the animations saved in png. Animation it is simple  abreast the frames representing of driving of a unit. During each moment I display any one of frames. The picture square-topped with a transparency but displays I it I can with  and turn. I load a texture as LPDIRECT3DTEXTURE8 and I display means . In old implementation the code defined the general area at two pictures if they are superimposed, and then looked, whether there are opaque points in a frame of one unit which are superimposed on opaque points of a frame of other unit. If is - means we . There there was an old engine under PPC2003. And how it to make on , considering that now pictures can be displayed not 1:1 and ?

2

Re: Pixel-by-pixel intersections on directX?

Hello, mangaman, you wrote: M> And how it to make on , considering that now pictures can be displayed not 1:1 and ? To get f-tsiju which will convert point coordinates in world coordinates. Through a matrix of transformations of this picture.

3

Re: Pixel-by-pixel intersections on directX?

F> to get f-tsiju which will convert point coordinates in world coordinates. Through a matrix of transformations of this picture. And what it gives to me? We admit, at me a picture. It at rendering  in 1.3 times. I.e. on the screen I see more pixels, than in an initial texture. Actually. And further what to do?

4

Re: Pixel-by-pixel intersections on directX?

So you  them in 1:1 for determination of intersections as earlier, and on the screen draw scaling.

5

Re: Pixel-by-pixel intersections on directX?

VTT> So you  them in 1:1 for determination of intersections as earlier, and on the screen draw scaling. So it turned out that different objects have different . Scalings.

6

Re: Pixel-by-pixel intersections on directX?

Hello, mangaman, you wrote: M> And how it to make on , considering that now pictures can be displayed not 1:1 and ? And what if to take another  (to write most) which will be skejlit-rotatit a raster? What size of a picture are assumed? Also it is how much important precisely checks on pixels? Whether it is possible somehow  check to optimize? I made in due time the  for operation with a raster just under such needs.

7

Re: Pixel-by-pixel intersections on directX?

Hello, mangaman, you wrote: M> In old implementation the code defined the general area at two pictures if they are superimposed, and then looked, whether there are opaque points in a frame of one unit which are superimposed on opaque points of a frame of other unit. If is - means we . There there was an old engine under PPC2003. Not the best idea to sharpen the game logic (collision) under a drawing (texture). Try to manage any other means.