Results 1 to 3 of 3

Thread: Sprite collision with 2 Sprite Engines in DelphiX

  1. #1

    Sprite collision with 2 Sprite Engines in DelphiX

    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?

  2. #2

    Sprite collision with 2 Sprite Engines in DelphiX

    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()
    The views expressed on this programme are bloody good ones. - Fred Dagg

  3. #3

    Sprite collision with 2 Sprite Engines in DelphiX

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •