Tag Info

New answers tagged

2

While I can't speak for Erin Catto himself, the simple answer is that in many games-related physics systems a standard Euler method is preferred to a Runge-Kutta method because it is less expensive computationally, while also being sufficiently stable for games in general. If RK4 was used the integrator would become a larger bottleneck, impacting the ...


5

It's very probable that Erin Cato subtly justified the use of the Symplectic Euler over RK4 or another higher order integrator. The author has lots of slides and/or material (e.g. http://gamedevs.org/uploads/numerical-integration.pdf) related to the inner workings of the Box2D engine. The main reasons for why RK4 is not really needed when writing this kind ...


1

First of all, if you want to avoid aliasing problems, you need to respect the Shannon rule. So you need to take 120FPS or more. Secondly, you don't really need to care, you can simulate at 40 if you want, just be sure to linearly interpolate all of your matrices, the frame presentation time is the t, and your physics simulation always have to run some ...


2

Try this: var speed = Math.sqrt(Math.pow(heroVelX, 2) + Math.pow(heroVelY, 2)); The case is that the ^ operator is the bitwise XOR operator. You should use Math.pow(base, exponent). Here is a an example: link.


0

I've already got a pretty reasonable answer to this over here, with some video examples. The short version is: You cannot reasonably use rigid body physics to simulate biped locomotion in the kind of responsive way you'd want for a platformer. You have to do something else.


1

LET THIS BE A CAUTIONARY TALE ABOUT BOX2D! Haha! Here's the solution I came up with The problem I amrunning into is due to the fact that Box2D uses meters instead of pixels for the scale, in my game a screen that is 1920x1080 would be 1920 meters wide and if I am using sprites a small sprite will be only as many meters wide as it is in pixels. The reason ...


0

According to libgdx's Box2D introduction, "The Box2D implementation in libgdx is a thin Java wrapper about the C++ engine", which would be in World.java in the libgdx sources, but it's not. So: No, there isn't. …yet! You could ask nicely in the libgdx issue tracker. (Or maybe implement it yourself and send a pull request if you know C++ Box2D? I'm ...


0

I solved it adding the ParticleEffect to he body and before rendering the effect in render function: public Body createThrowedBall(float x, float y) { Gdx.app.log("createThrowedBall", "("+x+","+y+")"); BodyDef ballDef = new BodyDef(); ballDef.type = BodyType.DynamicBody; ballDef.position.set(x,y); CircleShape shape = new ...


0

Why dont you apply force during the render thread. You can set a boolean value start and stop the tilt, since its under the render thread it will probably stay tilted since that same force is being applied constantly



Top 50 recent answers are included