by TDRR » Fri Jul 12, 2019 11:35 am
Apeirogon wrote:Yeah, I once try add to gzdoom, on zscript side, some PhysX stuff, but I almost always rested on restrictions of source code.
It can be changed, but it break something else in the game/takes too much time to rewrite it. So except some most basic stuff, like pushing objects, pendulums and momentum, you pretty much or would need to change source code or write walls of code from crutches and hacks to do something.
But thats only for mechanics. Continuum physics stuff (heat, pressure, flow, gay-lussac/klapeiron/avogadro laws) dont have such restrictions, since it work on principles which dont simulate in gzdoom, and games in whole. Im pretty sure I see some patch for hideous destructor which use temperature of environment to do thing with player and players weapon.
But from other hand, who need continuum mechanics in games?
It's true that i'm using a few hacks, but i wouldn't consider them "walls of code", these hacks just rely on very, very simple stuff:
I have already said how i'm rotating actor collision in the OP so no need to mention it again.
To know when an actor should tumble, a few things are checked: First, if it has been in mid-air and now is resting on the floor, and if it's X/Y movement is big enough to cause it to tumble over or even keep rotating.
I would love to make objects roll down slopes but apparently it's impossible to get if the floor is sloped from ACS. Maybe will save it for the ZScript version.
Kinsie wrote:While "real" physics is a pretty difficult ask, there are probably some fun things that can be implemented, like MBF's thing where, and I quote the readme, "Non-sentient objects fall down under their own weight when their balance is upset and they are more than halfway off of a ledge"
That one would be really cool to add, and possibly not hard but mostly just laggy. In DECORATE you could do it by firing 4 missiles at the ground, and these return nothing when they are at the same height as their parent, or return an inventory item if they are lower than their parent. Probably better left for ZScript as it could be less laggy.
[quote="Apeirogon"]Yeah, I once try add to gzdoom, on zscript side, some PhysX stuff, but I almost always rested on restrictions of source code.
It can be changed, but it break something else in the game/takes too much time to rewrite it. So except some most basic stuff, like pushing objects, pendulums and momentum, you pretty much or would need to change source code or write walls of code from crutches and hacks to do something.
But thats only for mechanics. Continuum physics stuff (heat, pressure, flow, gay-lussac/klapeiron/avogadro laws) dont have such restrictions, since it work on principles which dont simulate in gzdoom, and games in whole. Im pretty sure I see some patch for hideous destructor which use temperature of environment to do thing with player and players weapon.
But from other hand, who need continuum mechanics in games?[/quote]
It's true that i'm using a few hacks, but i wouldn't consider them "walls of code", these hacks just rely on very, very simple stuff:
I have already said how i'm rotating actor collision in the OP so no need to mention it again.
To know when an actor should tumble, a few things are checked: First, if it has been in mid-air and now is resting on the floor, and if it's X/Y movement is big enough to cause it to tumble over or even keep rotating.
I would love to make objects roll down slopes but apparently it's impossible to get if the floor is sloped from ACS. Maybe will save it for the ZScript version.
[quote="Kinsie"]While "real" physics is a pretty difficult ask, there are probably some fun things that can be implemented, like MBF's thing where, and I quote the readme, "Non-sentient objects fall down under their own weight when their balance is upset and they are more than halfway off of a ledge"[/quote]
That one would be really cool to add, and possibly not hard but mostly just laggy. In DECORATE you could do it by firing 4 missiles at the ground, and these return nothing when they are at the same height as their parent, or return an inventory item if they are lower than their parent. Probably better left for ZScript as it could be less laggy.