×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    23

    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 detect the collision ?..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

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    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

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    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:

    http://www.jasonlam604.com/books.php

    Pit

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    23

    Re: Tile collision..how?

    Quote Originally Posted by jappit View Post
    Hi custom_made,

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

    http://www.jasonlam604.com/books.php

    Pit
    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
    Last edited by custom_made; 2008-09-18 at 15:39.

  5. #5
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Bournemouth, UK
    Posts
    65

    Talking 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
    Made With Caffiene And Sleepless Nights

Similar Threads

  1. Does NFC tag protocol support anti collision
    By Nabil_java in forum Near Field Communication
    Replies: 4
    Last Post: 2008-05-19, 11:35
  2. Sprite Collision Mechanics
    By rajatram in forum Mobile Java Games
    Replies: 1
    Last Post: 2006-12-12, 15:16
  3. Tile Studio
    By alex_crowther in forum Mobile Java General
    Replies: 3
    Last Post: 2004-12-20, 04:08
  4. tile engines in j2me
    By alex_crowther in forum Mobile Java General
    Replies: 0
    Last Post: 2004-11-05, 13:33
  5. Collision detection
    By smb101 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2003-10-08, 17:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×