CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Collision

  1. #1
    Join Date
    May 2001
    Posts
    155

    Collision

    I'm trying to make a game. I have a picture box, that has a picture of a ship in it. Then i have the enemy ship on the other side of the screen. When the enemy ship fires a weapon how do i make it detect if the weapon has hit the first picturebox, from any side??

    --Ant
    --------------------------------------------------
    Want a javascript Editor? Visit:
    http://members.fortunecity.com/ants12/jeditdload16.htm
    Or email me:
    [email protected]

  2. #2
    Join Date
    Jun 2001
    Location
    Israel
    Posts
    228

    Re: Collision

    it may fit less for windows and more for dos but you can set a timer (or by GetTickCount) to be activated from the time the "bullet" was fired, in small periods of time to check the location of the bullet(calculated by time, speed and direction mathematically) in compare to the location of the ship until it is out of bounds.
    Your game, you play with it :0)

    ----------
    The @host is everywhere!
    ----------

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured