-
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
-
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
-
Re: Tile collision..how?
Hi custom_made,
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
-
Re: Tile collision..how?
[QUOTE=jappit;471672]Hi custom_made,
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
-
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