123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|229|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Collisions, Events and Actions

Wed, 11 Dec 2013, 12:55
spinal
Stupid non working collisions!!!!!!!!!!!!!!!!!!!111111111

-=-=-
Check out my excellent homepage!
Wed, 11 Dec 2013, 12:55
shroom_monk
What's up? I did a lot of collision stuff a while back for my slowly-but-in-progress PMC project. They can certainly be fiddly!

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Wed, 11 Dec 2013, 13:22
spinal
It's just nutso. Probably a mixture of gravity and inaccurate player coords or something, but it's not always finding my floor tiles, which is nuts because my max fall sped is less than half the tile size, so even at max speed, it should be impossible to miss a single tile.

-=-=-
Check out my excellent homepage!
Wed, 11 Dec 2013, 13:28
shroom_monk
Hmmm. Is the code easily postable here, or is it split between various parts of your program?

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Wed, 11 Dec 2013, 13:44
spinal
I think I have it fixed, seems it didn't like my coord being floats when checking my level array.

eg, level[int(x/tilesize)+levwidth*int(y/tilesize)] instead of level[(x/tilesize)+levwidth*(y/tilesize)]

-=-=-
Check out my excellent homepage!
Wed, 11 Dec 2013, 13:52
shroom_monk
Ah yes, I can imagine it wouldn't like having non-integer array subscripts. Just to check, are your x, y and tilesize values all floats, or just some of them? Mixing ints into divisions can sometimes lead to weird rounding bugs as well.

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Wed, 11 Dec 2013, 13:59
spinal
all floats if i remember correctly