Results 1 to 3 of 3

Thread: Blocking Movement (Collision detection)

  1. #1

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You could use an collision array along with your map tile array, or you could have an UDT for each Tile containg both collisions and Tile and have a single array of the UDT.
    Code:
    Type tMap
      Tile as byte
      Collision as byte
    End type
    
    Public Map() as tMap
    or
    Code:
    Public Map() as byte
    Public MapCollision() as byte
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  2. #2
    New Member
    Join Date
    Jul 2000
    Location
    Chicago
    Posts
    6

    Unhappy

    I am using a flat bmp for the base background, and am only using 32X32(pixel) tiles for sprites. How can I have it check to see if there is a tile with a tag of (lets say) 3, if they want to move up, check above to see if there's a blocking sprite, and the same for any other direction.
    If I weren't insane, someone else would be. :-p

    Steve

  3. #3

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What about your sprites then, are they attached to a grids of 32X32 or are they freely placed on the background?

    If you have your Sprites independent from the map, you could put them in an array of UDT or using a classmodule
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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