Game Development Community

Tile Collision?

by David Bax · in TGB Platformer Kit · 05/01/2009 (5:27 am) · 1 replies

I am probably going to be getting the PSK soon. I have been looking through the information on it, and had a question about the tutorial. I'm still familiarizing myself with TGB, so I might be looking at things the wrong way... the demo level tutorial says:
"The tilemap itself will not store the collision information, as TGB only allows for convex polygons. To avoid this, we will use three separate t2dSceneObjects to act as the actual platform object."

Now this seems a little confusing to me, because you can set tiles up with their own collision boundaries and while each tile individually has to be a convex shape, you can, of course, place tiles in such a way to make larger shapes that are concave. So it got me wondering if it is actually possible to use the tiles themselves for collision with PSK? Or is it done in the tutorial with scene objects because tiles can't individually be set to have platform behaviors or something? I don't know if this is the case, regarding tiles and platform behaviors, I'm just really wondering if all platforms have to be done with scene objects or if tiles can be used, as it might be easier in the long run in terms of level design to have tiles associated with collision and not have to build custom scene object collision platforms for all of the tiles you lay down.

Anyone have any thoughts on this?

#1
05/01/2009 (4:07 pm)
The PSK does not use tile layer collisions. In the tutorial you don't set up collisions with tiles at all, only the platform objects (sceneobjects with a behavior) that are created.