# Tile collision..how?

• 2008-09-18, 07:25
Tile collision..how?
hi guys

i jus want know about the tile collision, in our game we are creating our environment or game filed with tiles and i jus throw a ball in air wen ot hits any of the tile the corresponding tile should remove...how to [b]detect the collision[/b] ?..ball is not jus a sprite its a strips of image ..i am drawing the image using drawRegion(ball) so i guess i can't use sprite option

jus give me
• 2008-09-18, 08:02
stenlik
Re: Tile collision..how?
Hi,

if you are doing game, then you have to check first something about the collision theory. In the case of simple geometry shapes like circles and rectangles it might be pretty simple to implement it;)

Regards,
STeN
• 2008-09-18, 14:17
jappit
Re: Tile collision..how?

as told by STeN, you should read something about collision detection. This open source book has some useful infos about it:

[url]http://www.jasonlam604.com/books.php[/url]

Pit
• 2008-09-18, 15:31
Re: Tile collision..how?

as told by STeN, you should read something about collision detection. This open source book has some useful infos about it:

[url]http://www.jasonlam604.com/books.php[/url]

Pit[/QUOTE]

hi

thanks jappit

but my requirement is how to detect collision to a tiled map ?
sprite to sprite we can easily finish the work , here m not using any sprite class.

if have any suggestion pls send it fast
• 2008-09-18, 21:14
rooossone
Re: Tile collision..how?
can you create a rectanlge class that would store the points of each corner of a tile and it would hold a method like collidesWith(Sprite s) or whatever... you would then have a rectangle object in your tile class and an and then you would loop through the tileset and call the necessary collision methods ...

hope you understand what im trying to say...

ooh this is my 50th post... nice