Has there been any thought about allowing either a global or a per tile coefficient of restitution for control over elasticity on wall bouncing?
Different issues, but on the subject of inelastic bounces I’ve previously noted/raised Mega-elastic collisions.
Our physics engine is more of an “arcade physics” engine; we just reverse the velocity if you collide with a wall (i.e. vx becomes -vx). The code is here for reference.
I don’t think we have any plans currently for a “real physics” engine, but we made the engine swappable if anyone is interested in making their own. It would probably be doable to find a simple JS or C++ physics engine and port it over.
BTW if you’re looking through the physics engine, you might notice the math looks a little strange. It’s because we use fixed point arithmetic to speed things up on hardware. Anywhere you see Fx or Fx8 in the code, that means it’s a fixed point number.
On subject of collisions there’s also a peculiarity in Mega-elastic collisions with things bouncing higher over time. Do you know why that is? And low velocities (<1) behave very strangely, I tacked that on the end of that thread.