Page 2 of 2
Re: Collision not working
Posted: Sun Nov 27, 2011 4:45 pm
by coffee
qrux wrote:bump?
Ouch, that one hurted me, I kind leaved you hanged sorry but I was expecting first that someone with more experience with that kind of map tiling like the helpful Robin or Kikito (that "invented" the tutorial/system you following) give their incomparable help. My fault but seems Sebast is helping much better than I probably could give.
Re: Collision not working
Posted: Sun Nov 27, 2011 5:47 pm
by qrux
coffee wrote:qrux wrote:bump?
Ouch, that one hurted me, I kind leaved you hanged sorry but I was expecting first that someone with more experience with that kind of map tiling like the helpful Robin or Kikito (that "invented" the tutorial/system you following) give their incomparable help. My fault but seems Sebast is helping much better than I probably could give.
Haha, it's okay
Re: Collision not working
Posted: Sun Nov 27, 2011 6:48 pm
by coffee
it's nice you be doing progress. just a small alert/advice. it's preferable that you soon "separate" the collision code from the key detection. Is advisable that the key detection turns only it into a variable movement = "right" or something and do the collision test outside the key routine. That's because the player movement can need do another checks first before move (like for example check if at right there is an obstacle that can be pushed away so you will not move first).
Code: Select all
love.keyboard.isDown("d","right") and TileTable[rightTileY][rightTileX] == 1 and TileTable[rightTileY+1][rightTileX] == 1
Re: Collision not working
Posted: Fri Dec 02, 2011 5:27 pm
by qrux
sebast wrote:
Sorry for this bump, but i really need a clue on this
coffee wrote:it's nice you be doing progress. just a small alert/advice. it's preferable that you soon "separate" the collision code from the key detection. Is advisable that the key detection turns only it into a variable movement = "right" or something and do the collision test outside the key routine. That's because the player movement can need do another checks first before move (like for example check if at right there is an obstacle that can be pushed away so you will not move first).
Code: Select all
love.keyboard.isDown("d","right") and TileTable[rightTileY][rightTileX] == 1 and TileTable[rightTileY+1][rightTileX] == 1
Ah, i see! I will try to implement it