Results 1 to 4 of 4

Thread: 2D Collision Avoidance Demo

  1. #1

    Thread Starter
    Addicted Member ChuckB's Avatar
    Join Date
    Jul 2002
    Location
    South Carolina, USA
    Posts
    157

    2D Collision Avoidance Demo

    Hi,
    I have been playing with the ability to detect when the mouse cursor collides or enters a box (building) and when the box is placed between the mouse cursor and various objects (characters).

    The attached program allows you to move 5 objects with the cursor keys. Movement of the mouse draws connecting lines and indicates which object's 'line of sight' is blocked by the building.

    For you gamers, there may be some helpful stuff in this small demo. This has helped me...I thought it might be helpful to some of you.

    Regards,
    ChuckB
    Attached Files Attached Files
    I learn Robotics, Electronics and Game Programming at http://www.gameinstitute.com

  2. #2

    Thread Starter
    Addicted Member ChuckB's Avatar
    Join Date
    Jul 2002
    Location
    South Carolina, USA
    Posts
    157
    Hi,
    I am trying to work out some code that allows an AI character to determine the shortest distance to travel around various objects. I am using nice rectangular objects that are oriented N-S or E-W for simplicity.
    I would like to have the characters automatically move in the previously attached program towards the mouse cursor...constantly readjusting themselves as the mouse cursor changes positions.
    Have any of you done such a thing before? Do you have a sample program that does this?
    When time permits I would like to modify the attached program to do just that.

    Regards,
    ChuckB
    I learn Robotics, Electronics and Game Programming at http://www.gameinstitute.com

  3. #3
    Addicted Member
    Join Date
    Apr 2002
    Location
    Israel
    Posts
    152
    well this will help you with path finding
    http://www.ur.co.nz/urcorp/default.a...ta_article=240

  4. #4

    Thread Starter
    Addicted Member ChuckB's Avatar
    Join Date
    Jul 2002
    Location
    South Carolina, USA
    Posts
    157
    Hi,
    Thanks for the URL. I'll read it tonight.

    Regards,
    ChuckB
    I learn Robotics, Electronics and Game Programming at http://www.gameinstitute.com

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