Help with colision on LOVE2D

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.
Post Reply
JC Carvalho
Posts: 1
Joined: Sun Jun 24, 2018 8:51 pm

Help with colision on LOVE2D

Post by JC Carvalho » Sun Jun 24, 2018 9:09 pm

i'm new on Love2d, and i'm doing my first game, is a simple game where a warrior walks rigth and left and attacks, the waarrior are two sprite, one for walk, another for attack, the enemie is a image, and goes from one side of the screem, to another, with no animation.

The problem is, how i make the colision of this two images? i had searched on the internet and try some things, but nothing work

If someane could help, i will be very very grateful.

i'm sending my code to, if helps

and very sorry for the bad english, is not my native language

(3.97 KiB) Downloaded 19 times

User avatar
Party member
Posts: 552
Joined: Tue Mar 12, 2013 7:11 pm

Re: Help with colision on LOVE2D

Post by Jeeper » Sun Jun 24, 2018 10:26 pm

There are a ton of different ways you could do collision and what the best way to do it for you depends a lot on many different variables.

You could either use a library like BUMP (

Or you could use the build in Löve physics system (, this is what I personally prefer, but I feel like I am in the minority though.

Another alternative would be to use something like AABB collision that you code yourself. An example of this would be:

Code: Select all

if ax < bx + bw and ax + aw > bx and ay < by + bh and by < ay + ah then
 --A and B are colliding

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests