Collision in Tile Studio

This is a discussion on Collision in Tile Studio within the Game Programming forums, part of the General Programming Boards category; Hi, i have tryed Tile Studio. I made a map there for my rpg game, kinda large map in tile ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    14

    Collision in Tile Studio

    Hi, i have tryed Tile Studio.
    I made a map there for my rpg game, kinda large map in tile studio.
    And i succeded to import it to OpenGL.

    And now to the Question:
    * How do i check the Collision ( if the playerX,Y hits a wall, or a stone. etc.)
    i can do like this,
    if(playerX < 2 ) // to check collision

    But that would take extreamly long time if i have a big map, with stones and other things on.

    So i hope that there is a faster and better way to check collision with/in Tile Studio.


    please help me out.

    //ty in advace

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    Does tile studio store any other meta information which might tell you that "this is a wall" other than say looking at the RBG values of the pixels?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    14
    I actually dont know.. dont know where to look.

    it say here something about "whenever an object passes a bound, a collision occurs". (on the Tile Studio homepage)
    but dont know if that means "collision detection".

    http://tilestudio.sourceforge.net/tu...ndsAndMapCodes
    Last edited by kaptenkraek; 04-04-2008 at 11:47 AM.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    That link talks about bounds, read about them.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Aug 2007
    Posts
    14
    hum.. if i get this right, about those bounds. when i load my map, then it also loads those bounds, if i have made some of them. Then you can check if an Object (player) hits them, and then do something.
    (so you could check collision with them ?)
    Or, am i wrong ?

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    Part of the data you import, you pass to OpenGL (this you've done).
    Another part of the data you import for collision detection, which you've yet to do.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21