Electrical-Age / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
https://electrical-age.net/
Other
212 stars 95 forks source link

Better explosions #312

Open Baughn opened 9 years ago

Baughn commented 9 years ago

In most cases, this should mean 'no explosions', but this bug is for discussing that before I start implementing.

For example, for cables. Nominally, these bundle the live and neutral/ground in one cable; this explains both the voltage limit (insulation breakdown) and current limit (insulation melting). I propose to enhance them as such:

As the breakdown process is inherently non-linear, it will tend to amplify small initial differences such that the cable normally only burns through in one spot.

Dolu1990 commented 9 years ago

Hi Baughn, I agree that actualy, things exploid easly all together.

In early developpement, things where made as you say, but it was possible because the simulation model was based on RC line (each node is like a little battery) This allow to very easly calculate state of the network, but has the bad side that it store energy every where and when you shut down the power, it could take many second to be down.

Then the simulation model has change to "MNA". It allow very responsive network, reduce simulation calculation. but if you change the network, (for example a resistance value) it need a big recalculation. It's the reason why actualy there is no resistance changes in cable. :(

So i agree that things exploide all together easly, and it's bad. But we can't fix it by changing cable carracteristic dynamicly. But we can change the watchdog and cable limits randomly as you say :)

yannic312 commented 9 years ago

Maybe also making cables heat up if fire is nearby? Example: Fire----Cable----Fire the cable should heat up slowly until the fire goes off or until the cable melts (last Thing only when the fire is directly next to the cable!)

Baughn commented 9 years ago

I played around with this concept a bit...

It looks like, so long as it's generally only one (or a few) cables that change their resistance, then the recalculation doesn't become much of a TPS sink; especially as it shouldn't happen very often. This is true even for relatively large networks.

If it happens for all of them simultaneously then the game stutters to a halt, as you say.

lambdaShade commented 8 years ago

In a general way, the behavior of each ELN object (sixnodes especially) in presence of fire has to be defined.