age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
67 stars 32 forks source link

Add optional fuse to T1 poles #170

Open genestrashcan opened 5 years ago

genestrashcan commented 5 years ago

New Item: add a t1 pole with transformer with a built in 13kv fuse

this would be useful to prevent a short circuit on grid lines from blowing up your whole grid.

it should coded so if a short circuit happens that you will hear the fuse instantly pop from far away because in real life when a fuse on a power pole blows it's louder than a shotgun.

GrimmDemon commented 5 years ago

Wouldn't it make sense to use a resetable fuse switch instead, we have one on the transformer pole near our house which steps the voltage down to usable 240V at 50hz. I coincidentally live close to an electrical substation which transforms electrical grid to lower voltage to be transformed by a further two tramsformer boxes, including the one mounted on the street lamp pole. The noise generated by a cable explosion is roughly similar to TNT exploding, in the game of course, the sound of that can be heard from a small distance, but quite softly. Minecraft works by loading chunks, so it won't really be possible if you want the sound of the fuse popping from, say, 3 or 4 chunks away. The average explosion can be heard from 64 blocks away, that's about a chunk. People can try and make minecraft as realistic as possible, but it really makes it harder for a computer to render it, especially if you don't have many CPU cores. Even the sound of a nuke exploding in game using HBM's nuclear tech mod doesn't go further than two chunks, albeit excessively loud when you are even at the edge of the sound cutting out. I stopped using that mod although because it was extremely unstable, plus my base kept on being struck by falling meteorites, not a fan of my hard work being randomly destroyed. Edit: how does a fuse popping come even close to the sound of a Shotgun? Those guns are loud, and I can say that out of experience.

jrddunbr commented 5 years ago

From personal experience, it's about as loud as a gunshot.

The fuses on poles are just fuses, not circuit breakers. That said, they are installed by clipping in the bottom hinge and then pushing up to complete the connection. They are going to be consumables.

The Minecraft sound engine makes it a pain for things to be heard far away. It requires the chunk to be loaded firstly, so over 4 chunks away is infeasible.

GrimmDemon commented 5 years ago

I didn't really think of it like that, I can imagine the arc caused by an electrical breaker running 13.2kV through it, it would almost immediately destroy the circuit breaker. The sound caused by high voltage wires colliding and shorting are loud, but personally, a gun shot is reasonably louder, unless it's a pistol. The noise will most probably be caused by the arc and the colliding electrons, and the flash is rather blinding, think of an arc welder, but several times brighter.

jrddunbr commented 5 years ago

Just keep in mind that 13kV is not the only voltage people are going to be running on poles.

There are circuit breakers designed for voltages like that, but they are prohibitively expensive to place on every pole ever. Fuses are far easier to make, and honestly replacing them is not hard.

genestrashcan commented 5 years ago

make the sound only heard within 1 chunk...

This video shows how loud one of these things is when it blows

https://www.youtube.com/watch?v=dXaoCfGPHGo

jrddunbr commented 5 years ago

stop changing the title.

genestrashcan commented 5 years ago

@jrddunbr - i may have come up with a idea on how to make the fuse exploding sound work from far away...

you will need several shot gun sounds for this

one will be the one for being very close to the fuse (within a chunk radius) the other two would be sounds of a distant gun shot, one louder than the other

then you would then figure out how to write the code so that the instant a short circuit happened and the fuse was going to pop, after it would check if the player was within a 30 block radius of it for the first sound of the closer distant gun shot and play the sound at the current players position if the player was above ground level and not down in a cave etc and have the area the sound is played be large enough so the sound spawns and plays at the players location instantly so it's very quickly heard if the player is moving around

you would do the same thing for the second more distant gunshot sound and have it check if the player was between 30 - 100 blocks away from the fuse popping and play the second distant gun shot sound at the players position above ground.

jrddunbr commented 5 years ago

The sound engine is a bit complex. I'm not going to explain here, but I don't think we need more than one sound

GrimmDemon commented 5 years ago

I agree. What you're proposing here is extremely complex to code. Honestly, minecraft is a simple game, I would probably just leave it like that instead of it requiring more cpu power for chunks that aren't loaded at that moment, I struggle enough to have more than 8 chunks at a time loaded in a single server.

jrddunbr commented 4 years ago

This issue is being closed now since there will be no more feature updates in Electrical Age for Minecraft 1.7.10. If the issue is relevant to 1.12, it will be re-opened there at a later date.