PDA

View Full Version : Sprite collision with 2 Sprite Engines in DelphiX



Carring
03-05-2005, 09:00 PM
I want to use 2 Sprite Engines in my game. The idea is to use one for moving background objects along with the engine when the background moves (for instance: DXSpriteEngine.Engine.X := DXSpriteEngine.Engine.X - 1).
The other Sprite Engine I want to use independent for the mousesprite, because when I put the mouse sprite in the first sprite engine it moves away, along with the objects and background and that is obviously not what I want.
I got it working, BUT now I cannot get collision detections between
the images of the 2 Sprite Engines.

In short: How can I get collision checking between images of 2 different Sprite Engines?

czar
03-05-2005, 10:55 PM
Why not handle the collisions your self? If you know the x and y pos and the width and height then you can check if a point in one sprite falls within the rectangle of the other sprite pointinrect()

Carring
04-05-2005, 04:48 PM
Thanks for your suggestion. Yes, I have already started using coordinates for collision as an alternative. Still I am curious if it's technical possible with DelphiX to get the collision function to work between 2 Sprite Engines.