I've successfully implemented Hardon Collider mostly, except that I cannot think of a way to check multiple objects at once, without having to type every object out (which would be rather redundant and is clearly not an option). I've tried searching the forums, and even saw a few recent posts that had this same problem, but alas none of those threads could help me much!
Colliding isn't an issue, for if you modify the code for moving downwards in entity/Hero.lua to include:
Code: Select all
if love.keyboard.isDown("down") then
if not self.mask:collidesWith(tilefield[1].mask) --including this bit here
movementcode
end --and this
I was thinking that iterating through the tilefield and checking for the mask and stuff would work out, but I couldn't implement that properly.
I need your help, love community!
I've figured out most of the code for this on my own, as well as with researching, so I'm not sure how efficient my code is. Or rather, I'm not sure how much more efficient my code could be (probably a lot more), so please do tell me if I'm doing anything particularly badly.
Thank you in advance for your time!
Controls are arrow keys for movement, and use the ~ button for console interactions.