Collision not working

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Collision not working

Post by coffee »

qrux wrote:bump? :o:
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.
User avatar
qrux
Prole
Posts: 28
Joined: Thu Nov 03, 2011 1:11 am

Re: Collision not working

Post by qrux »

coffee wrote:
qrux wrote:bump? :o:
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 :)
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Collision not working

Post 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
User avatar
qrux
Prole
Posts: 28
Joined: Thu Nov 03, 2011 1:11 am

Re: Collision not working

Post 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 :)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 47 guests