Page 3 of 5
Re: Physics Issues
Posted: Fri Jan 20, 2012 10:47 pm
by bartbes
It is a physics error and as such has nothing to do with graphics adapters, what might be possible is that the size of objects depend on something, that varies, perhaps it's random, perhaps it's based on framerate.
In any case, the error is called by you creating a shape that is too small.
Also, for I/O outside of the .love and save dir (perhaps you just want to use the save dir, in which case love.filesystem is all you need), you'll need to check out the io functions in
the lua manual.
Re: Physics Issues
Posted: Sat Jan 21, 2012 5:04 pm
by Nixola
My CPU is an Intel® Atom™ CPU N280 @ 1.66GHz, Ubuntu doesn't know my graphic card (but two days ago it did
)
Wow, wine runs it; it behaves strangely (left arrow moves him right, right arrow moves him left and so, and mouseX and mouseY change when I move the player), but it runs.
Re: Physics Issues
Posted: Sun Jan 22, 2012 9:02 pm
by Refpeuk
OK, so graphics adapters aren't the issue; someone else's nVidia worked and I'm running an AMD(ATI). Could it be that I've been setting all the physics shape sizes in whole number pixel sizes and should have at least one significant decimal place? My sensor shapes are only 1 pixel wide, I'll try expanding that a bit and upload a new one.
@Nixola; You're actually moving the camera, which is controlled completely separately from the player right now. ATM the camera is moved with the arrow keys and the player with WASD. I'll add camera tracking later, right now they have nothing to do with each other.
Thanks for your responses, guys!
Re: Physics Issues
Posted: Sun Jan 22, 2012 9:17 pm
by tentus
Refpeuk wrote:Could it be that I've been setting all the physics shape sizes in whole number pixel sizes and should have at least one significant decimal place? My sensor shapes are only 1 pixel wide, I'll try expanding that a bit and upload a new one.
bartbes wrote:In any case, the error is called by you creating a shape that is too small.
I believe that the rule of thumb is to make shapes at least 3 pixels in size.
Re: Physics Issues
Posted: Sun Jan 22, 2012 10:16 pm
by Refpeuk
OK, here's one where all the shapes are at least 3 px in both x and y.
Edit: Sorry bartbes, I posted before seeing the end of your post. I was hoping to be able to use the love.filesystem since it seems a lot simpler, but if I have to I can work out the io system. Thanks!
Re: Physics Issues
Posted: Mon Jan 23, 2012 5:52 am
by MarekkPie
Working.
Re: Physics Issues
Posted: Mon Jan 23, 2012 1:56 pm
by Nixola
I tried moving with WASD, but the player didn't move... Anyway, after downloading the last version, running it (without wine) and moving a bit around with WASD the game froze and the terminal gave me this error:
Code: Select all
love: modules/physics/box2d/Source/Collision/Shapes/b2Shape.cpp:102: void b2Shape::CreateProxy(b2BroadPhase*, const b2XForm&): Assertion `inRange' failed.
Aborted
Re: Physics Issues
Posted: Mon Jan 23, 2012 4:38 pm
by bartbes
This either means you're trying to create something outside of the world, or moving it there.
Another option would be a shape too far from its body (does that even have a max distance?)
Re: Physics Issues
Posted: Mon Jan 23, 2012 6:00 pm
by Refpeuk
@MarekkPie: Glad to hear it's working! Unfortunately I'm not quite sure what to do now when I start to simulate bullets. My plan is to add a bullet time feature in which you can dodge enemy fire; this would only work if each bullet had it's own body/shape, and obviously 3x3 px is far too big for a bullet. Maybe 0.8.0 will fix this feature? How far out is it?
@ Nixola: The player's starting position right now is just slightly below and to the right of the origin. In other words you should walk right along that small platform and fall onto the floor below it before doing too much. If you move outside the physics world the game will crash.
@bartbes: I certainly hope there is no max distance for that! For simplicity's sake I just set a massless (immovable) body for the world at 0,0, meaning all the offsets for the shapes would be identical to their positions on the coordinate plane.
Re: Physics Issues
Posted: Mon Jan 23, 2012 6:32 pm
by Nixola
...What small platform? I can only see the player and a biiiiig, blue background