Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

I think it's something to do with the order you're drawing it, the lines are just being drawn over that pixel, you need to draw it before draw the pixel.

so... Should I put the order of this "if" statement above the line drawing function?

I misread your post actually, I thought you just wanted to show the white pixel on top of the red line, but what you want is to destroy the enemy when it touches the red line, right? If it is the case I do not recommend the use of drawing functions like pix to check this type of collisions but rather implement a function that checks for line and rectangle intersections.

That's why I chose the pix function, I don't know how to create a collision involving line with math ;_;

(+1)

Because of this post I tried to make a simple cart example of how to check this type of intersections, if you're interested you can check it here:
https://tic80.com/play?cart=2073

I read your source code and I see it's pretty cool, pretty professional, it looks like it's going to take me a while to figure it out.