Excalabur Posted March 20, 2018 Share Posted March 20, 2018 Hello, I find the current power-handling code to be infuriatingly unrealistic. Hooking two working circuits up to each other shouldn't break things. Forgive the ASCII art that follows: If we start with: L-G G-L where G is a generator, - is wire, and L is the load, then doing the following L-G-G-L shouldn't break anything. So: why does it? In the current model, the total consumption of a circuit is considered the 'load' on that circuit. If a circuit is overloaded, then some random (?) wire in the circuit might take damage on each tick. I find this extraordinarily unintuitive, and it just about makes me quit every time it happens, because I want to build circuits that 'work'. Trying to figure out what's going on when it first starts happening to new players is also really challenging, because the circuit overload is generally intermittent and the damage is randomly located. However, with not too-too much coding, you can just write code that actually emulates the real world physics: power flows from generators to loads. If we assume constant voltage and paired conductor, then it's pretty close to the plumbing model, actually: some electrons flow from here to there, and some continue from there to the next thing. In the ASCII art above, the wire between the two generators should basically have zero load except when something's imbalanced. Then, the most-loaded part of the circuit should take damage, not some random leaf off in the corner. Moreover, IRL, damaged sections are more likely to get more damaged, which also would make me happy. If additional difficulty is needed, consider making brownouts more damaging: right now if there's not enough generator on a circuit some stuff just turns off, which is not what "should" happen: instead, everything works really badly, and digital stuff might get damaged. I don't know what the Power Transformer "does" in the game at present (I don't understand what it's trying to abstract), and short of coding up line losses and actual voltage levels I don't know what it does in the more realistic model I'm proposing. TLDR: Implement circuit theory into the game to make the power system work in a more intuitive, realistic way. Link to comment https://forums.kleientertainment.com/forums/topic/88874-power-circuit-realism-suggestion/ Share on other sites More sharing options...
Kabrute Posted March 20, 2018 Share Posted March 20, 2018 all points on a line are considered equal. Unless separated by a transformer (load side does not see gene side). Transformers pass 1kj x4/sec for a total feed of 4kw per second but nothing over 1kw to a device without a battery to take up the slack over 1kw. Link to comment https://forums.kleientertainment.com/forums/topic/88874-power-circuit-realism-suggestion/#findComment-1017216 Share on other sites More sharing options...
Zarquan Posted March 20, 2018 Share Posted March 20, 2018 The thing is current and voltage and resistance don't really exist in ONI. There is only power available and power used. For example, as Kabrute said, the transformers provide one 1 kJ 4 times per sec (maybe 5 times per second because they changed internal ticks). If a building needs power, it asks the wire. If the wire has the power available, it takes the power and runs. Wires break if more power is used than the wire can handle. That's why something that requires 1.2 kW won't work with a transformer, as the transformer only gives the wire 1 kJ and it is looking for 1.2 KJ. The transformer is a buffer between the high-capacity wire and the low capacity wire to protect the low capacity wire. It helps keep the calculations simple, but I do wish they made the transformer make more sense in this case. I certainly wouldn't be opposed to changing things so that the wires that break make sense from a real world standpoint, but I would be concerned about the performance hit. What ever calculation happens would probably happen 4 or 5 times per second. Big bases are already extremely laggy. The benefit of the current system is that creating the circuit is a 1 time thing after you finish building your grid with only 1 check per separated. If the number is to high it generates a random number to simulate the chance of a wire being damaged based on how much overcapacity the wire is and randomly selects a wire to be damaged. Very simple. If nothing is overloaded, it is 1 comparison per circuit. For yours, it would require measuring power input and output and being able to tell where the power is coming from and doing calculations for every wire in the game, which would certainly be more expensive, but the question is how much. I feel the main goal of breaking your wires isn't to simulate a realistic breakdown of your system, but rather to be an indication that your power grid needs improvement. The thing is that ONI has it's own laws of physics that are very strange. To me, a lot of the fun is exploring them and figuring out how to use them to our advantage. It's like being in another universe. Link to comment https://forums.kleientertainment.com/forums/topic/88874-power-circuit-realism-suggestion/#findComment-1017241 Share on other sites More sharing options...
Master Miner Posted March 20, 2018 Share Posted March 20, 2018 8 hours ago, Zarquan said: I certainly wouldn't be opposed to changing things so that the wires that break make sense from a real world standpoint, but I would be concerned about the performance hit Performance wouldn't be a problem with a good implementation. 8 hours ago, Zarquan said: it would require measuring power input and output and being able to tell where the power is coming from and doing calculations for every wire in the game This can be implemented very efficiently. It is not necessary to calculate the load for each piece of wire, but only for each segment of the circuit. The list of devices on each side of a segment can be stored when the segment is connected. The load can then be calculated by simply calculating two sums of the active devices, one for each side of the segment, and then determine the load. This would take few microseconds and can safely be done in parallel with other calculations. Performance of the chosen minimal hardware is not the problem. 9 hours ago, Zarquan said: The thing is that ONI has it's own laws of physics that are very strange. It shouldn't be too strange and too counter-intuitive or players will feel frustrated and fooled. Link to comment https://forums.kleientertainment.com/forums/topic/88874-power-circuit-realism-suggestion/#findComment-1017389 Share on other sites More sharing options...
Lutzkhie Posted March 20, 2018 Share Posted March 20, 2018 i got this problem the first time i played but now i never encounter this problem unless i overload it on purpose, for example you want to refine some metal, which take 1.2kw sometimes i would overload it on purpose then reconstruct afterwards but im with you on the... 12 hours ago, Excalabur said: the most-loaded part of the circuit should take damage thats how overloading is in real life and would make more sense 9 hours ago, Zarquan said: The thing is that ONI has it's own laws of physics that are very strange thats what make the game fun, after all they are inside an Asteroid and not on earth so introducing a different physics rather than what we already know is better Link to comment https://forums.kleientertainment.com/forums/topic/88874-power-circuit-realism-suggestion/#findComment-1017398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.