Thread: Box Collision

  1. #1
    Shiftytitan
    Guest

    Question Box Collision

    Hi

    I am wondering where can i find an adequet tutorial for this subject.

    I need to know how to use this for a side-scroller game i am building.

    All help is appreciated

    Thank-you

  2. #2
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Do you want axis-alligned boxes or ones that can be rotated? Axis aligned is pretty simple and rotated isn't too bad either.

    For both, you generally just want a class which contains info about the box's location, height and width (and orientation if it's not axis-aligned). If you are dealing with axis-aligned boxes it's really simply to do because you are only concerned about vertical and horizontal collision separately, otherwise it's a little bit more complicated but not much.

    Just remember that when you do collision to take into acount the location of the object between updates as well (usually treating the intermediate transition as a linear translation is fine). I'd write more but I'm heading out the door. I'll post again tomorrow if no one else responds by then.

  3. #3
    shiftytitan
    Guest

    THANKS!!

    Thank-you, i apreciated your post dearly, and am now continueing on my game. thanks!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  4. bounding box collision detection
    By DavidP in forum Game Programming
    Replies: 7
    Last Post: 07-07-2002, 11:43 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM