Click to See Complete Forum and Search --> : Blocking Movement (Collision detection)
kedaman
Jul 27th, 2000, 01:17 AM
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.
Type tMap
Tile as byte
Collision as byte
End type
Public Map() as tMap
or
Public Map() as byte
Public MapCollision() as byte
GKCopperDragon
Jul 27th, 2000, 12:36 PM
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.
kedaman
Jul 27th, 2000, 02:17 PM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.