Why doesn't Hedgewars use any physics engine?

See comment below.

Xorlathor wrote:

I don't know if this has been on ongoing discussion, but is hedgewars ever going to have a physics engine added? (...).

nemo wrote:

A real physics engine has significant disadvantages too, I suspect sheepluva would love to expound on that if he's around.

Gladly I was not.

Kidding aside: using a physics engine would not only be an overkill-solution, it would also generate way more problems than it would solve.

fredb, a Wormux dev, tried a physics-engine approach with Wormux.
Talk to him or play the "bullet"-branch of wormux if you want to find out more about the problems I'm referring to :P
(e.g. I enjoy killing half the enemy team by just jumping against them till they fall off a cliff :P)

The hedgewars bounce physics improvements that were done for .13 are only applied to objects that actually need them - and the same will happen with future physics improvements -- rather than using a complete physics engine affecting all objects in game in ways they weren't supposed to react like, requiring a ton of work-arounds in order to fix that -- e.g. ever thought how many hogs would be killed by mines BEFORE the game begins, just because of physics making them slide down slopes and bounce around? Wink Smiley

Xorlathor wrote:

when boxes or supplies drop down and they bounce perfectly upright when on a slope

Yes, that might seem strange to some, but it's still better than having boxes bounce across the map (+gathering in holes), against hedgehogs or into the water.
Maybe they should have a parachute that opens right before they hit the ground + their angle adjusted to fit the ground below them though (but that would could still lead to "unrealistic" results)

Xorlathor wrote:

I know this would take a massive ammount of coding, but I think it'd be 100% worth it.

It could be worth improving collision detection so that moving barrels/objects can't make hogs stuck and so that shots and fire can't miss moving hogs, I agree on that and I thought about that before.
But a full physics engine?
I think coding that approach and making it playable and not look bugged all over the place would require more time than the hedgewars engine needed itself.
And the chances are good it would end like "hmm, now the physics are 10% better, but the code is now 3 times as big, full of workarounds and is executed a lot slower making the game unplayable on weaker machines, we should revert to doing it without physics engine"

If you still think it would be totally worth it and if you have a lot of spare time and some coding skills or interest to aquire them - feel free to try to include a physics engine.

Hint: This could be step #1 - creating collision polygons from landscape pixels:
[EDIT: remove dead link to polygongenwormux.png]

 

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]