Page 2 of 3
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 4:59 am
by Yojimbo
Thanks for the advice concerning the texture sizes. I'll look into modifying the sample.
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 3:49 pm
by Tesselode
So, is anyone allowed to use this for their projects?
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 4:32 pm
by TechnoCat
This is really cool, but I would really like to see it working with some sort of side-scrolling physics.
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 5:34 pm
by Yojimbo
Tesselode wrote:So, is anyone allowed to use this for their projects?
Feel free to use it for whatever you want except making stupid games like FarmVille, which I hate with all of my being. Of course, if you use it to make a game that makes buzillions of dollars... maybe you can buy me a beer.
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 5:40 pm
by thelinx
bartbes wrote:Only the name garbles on forum uploads, and I keep telling thelinx to fix it (see?).
Re: Per-Pixel Collision...
Posted: Sun Jul 25, 2010 5:41 pm
by Yojimbo
TechnoCat wrote:This is really cool, but I would really like to see it working with some sort of side-scrolling physics.
I actually developed this sample because the course I'm teaching will have the students modify a side-scrolling space shooter styled game and I needed a way to check for collisions between the ship's image and the terrain's image which will be too irregular to use the simpler bounding box technique.
Unfortunately, I'm not ready to release any of that code because I'm still working out the level loading mechanism which will load and scroll the terrain images.
Re: Per-Pixel Collision...
Posted: Fri Aug 08, 2014 9:21 pm
by Combokarel
I've found a little issue with your code, if you don't use rounded numbers like: 1, 2, 3 .. then
y2 can be zero because it get's floored and thus line 144 will give an error saying there's a nil value, I think that if you change math.floor to math.floor(n+0.5) (round the number) then the error will get solved (or maybe math.ceil, I don't know
)
P.S. sorry for the bad English
Re: Per-Pixel Collision...
Posted: Fri Aug 08, 2014 9:22 pm
by Combokarel
And then i see the last post was from 2010 -_-
Re: Per-Pixel Collision...
Posted: Sat Aug 09, 2014 9:39 pm
by dusoft
http://www.codesampler.com/source/love_ ... ision.love
Your .love file does not work fro the latest Love2D 0.9.1. Please, remove constraints regarding the version, otherwise most of the uses won't be able to use it.
Re: Per-Pixel Collision...
Posted: Sat Aug 09, 2014 10:32 pm
by Ranguna259
You do know that this thread is 4 years old. OP is long gone..