Developer zarklord_klei Posted July 9, 2019 Developer Share Posted July 9, 2019 1 hour ago, Nightinggale said: Even if F(1000) only takes 10%, going from 2 F(1000) to 3 F(1000) will increase from 20% to 30%. However knowing the game the remaining 80% would still be in use and we end up with 110% total, which would also be loss of frame rate. In fact it can be reduced to the simple fact that the CPU can't maintain 60 FPS as it is meaning any increase of CPU requirement will reduce the frame rate. while what your saying is correct, frame rate isn't a valid measurement, if you have a beefy cpu(like I do) even much later into the game i still get 60 fps, the only measurement is the % increase that each tick takes takes from before the change to after the change. 1 hour ago, DreamApart said: You are right about this. However, that means electric wires are even simpler than pipes, and can be optimized so it won't impact the performance. The electricity system doesn't not have to use the exactly same algorithm as pipes. Yes, that will make it more complicated than the current logic, but the cost is acceptable. I don't even. I'm very confused how you want it to be like pipes, then say something like this, I'm gonna say this as simply as possible.If you could easily optimize this for wiring, you could do the same for pipes, there is no easy optimization. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222395 Share on other sites More sharing options...
KittenIsAGeek Posted July 9, 2019 Share Posted July 9, 2019 3 minutes ago, Nightinggale said: In fact it can be reduced to the simple fact that the CPU can't maintain 60 FPS as it is meaning any increase of CPU requirement will reduce the frame rate. I generally maintain 60fps well into the late game, but your point is definitely true. Just now, DreamApart said: You are right about this. But that means electric wires are even simpler than pipes, and can be optimized so it won't impact the performance. If you want to improve game performance, you could change the gas and liquid pipes to behave like electricity. Instead of making a calculation along each segment, you would only have to calculate for each producer or consumer. However, that would dramatically change how ONI is played, and I'm not sure anyone would be happy with the result. Changing electricity to behave like gas/liquid pipes will detrimentally affect game performance. Even if optimized. The change from calculating per consumer/producer to per wire segment is an order of magnitude more CPU computation time. ...and that's completely ignoring the fact that electricity doesn't act that way. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222397 Share on other sites More sharing options...
Drethon Posted July 9, 2019 Share Posted July 9, 2019 19 minutes ago, DreamApart said: You are right about this. However, that means electric wires are even simpler than pipes, and can be optimized so it won't impact the performance. The electricity system doesn't not have to use the exactly same algorithm as pipes. Yes, that will make it more complicated than the current logic, but the cost is acceptable. If you could find a way to do that, I think you would win a Nobel prize. So far, that is one problem in Computer Science that is believed to be non-optimizeable but no one has proven one way or the other. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222405 Share on other sites More sharing options...
DreamApart Posted July 9, 2019 Author Share Posted July 9, 2019 1 minute ago, Drethon said: If you could find a way to do that, I think you would win a Nobel prize. So far, that is one problem in Computer Science that is believed to be non-optimizeable but no one has proven one way or the other. I think it's ... probably a maximum flow problem, which is not NP-Complete. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222408 Share on other sites More sharing options...
Drethon Posted July 9, 2019 Share Posted July 9, 2019 6 minutes ago, DreamApart said: I think it's ... probably a maximum flow problem, which is not NP-Complete. Interesting take I hadn't taken the time to consider, though that isn't really the packets in a pipe approach. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222409 Share on other sites More sharing options...
DreamApart Posted July 9, 2019 Author Share Posted July 9, 2019 3 minutes ago, Drethon said: Interesting take I hadn't taken the time to consider, though that isn't really the packets in a pipe approach. Well ... you know I couldn't predict the future, not even a conversation. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222412 Share on other sites More sharing options...
Nightinggale Posted July 9, 2019 Share Posted July 9, 2019 18 minutes ago, Zarklord said: while what your saying is correct, frame rate isn't a valid measurement, if you have a beefy cpu(like I do) even much later into the game i still get 60 fps, the only measurement is the % increase that each tick takes takes from before the change to after the change. Yes FPS is generally a poor measurement. When it's about gameplay experience, the real number is frame time. 50 fps can be more smooth than 55 fps if the latter is 54 frames at 60 fps and then one frame at 12 fps because what the player will see is the single 12 fps frame. The FPS measurement is good because people understand it. You don't see people post "my highest loaded CPU is X% loaded while playing". You see people complaining about FPS. It's also fairly easy to detect when the game has more than 100% CPU load because that's when it's no longer 60 FPS. Also when the computer fails to provide 60 FPS, any slowdown will result in worse framerate, which is easily detectable for the player. It's nice for you if you can maintain 60 FPS, but people are posting about 20-30 FPS gaming experiences. Since that's the kind of hardware a significant number of player use, then that's the kind of hardware the game should try to run smoothly on. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222413 Share on other sites More sharing options...
TEBOT Posted July 9, 2019 Share Posted July 9, 2019 22 hours ago, Nightinggale said: This idea would result in horrible performance and nobody would want the resulting drop in FPS. Right now the power system is simple. There are power producers, consumers and batteries. They are all connected to the same group and consumers can take power from any generator or battery. They do not check wires, length or wire or anything like that. If they are in the same group, they are connected. End of story. Even just reading the wire layout from memory would be a noteworthy slowdown and that's before making any simulation of currents. As for where the wire overloads, imagine this real life situation: you have 230 V and a 10 A fuse. That allows 2300 W (those are real numbers in some locations and used here because 10A is easy for calculations). You then want to use 200 W and because that's less than 1 A, you can cut cost and use a 1 A wire, right? NO, by law if the fuse says 10 A, all wires have to survive 10 A. Safety flaws can occur if something is worse than the fuse and nothing can be better than the fuse (sure it can say max 16 A, but the fuse still restrict it to 10 A). Essentially you have created a 2.3 kW wire network and all wires have to be 2.3 kW regardless of how much power you use. The same is true for ONI. If you consume 2 kW, you need a wire, which can handle 2 kW. You can't have a 1 kW in the 2 kW wire network. It's unsafe. As for player understanding, I would say the same as for automation and possibly other aspects of the game: the ingame introduction is kind of lacking. Most of the game mechanics would be easier to get started using if they were introduced better. To me, ignoring Kirchhoffs first law is very confusing, especially because now the network is breaking in random places, not where the current should be largest. I also don't think its demanding to calculate. In fact there are safety laws, that apply to homes, rather because no predictions can be made on where You would plug devices in next 5 years, but global network is branching from high to low power, changing the wire size as well. If you pay attention to how a car battery is hooked up, You will definitely see wires of different cross-sections, as different devices differ in current demand. Regarding the idea of wires a pipes, have You Guys taught how much capacity could be glitched out of such network ? Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222414 Share on other sites More sharing options...
Drethon Posted July 9, 2019 Share Posted July 9, 2019 14 minutes ago, DreamApart said: Well ... you know I couldn't predict the future, not even a conversation. Yeah, I think the conversation may have gotten confused when you talked about pipes and people assumed you were thinking packets (if I'm reading the chain of posts correctly) rather than a continuous flow problem where we aren't talking discrete time slices, and packets of whatever in the pipe, but filled pipes with continuous flow . That might not be a bad approach. (Reading comprehension while working can be slow...) Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222415 Share on other sites More sharing options...
KittenIsAGeek Posted July 9, 2019 Share Posted July 9, 2019 16 minutes ago, DreamApart said: So.. basically.. more or less how electricity already works in the game? Edit: No, wait.. Electricity in the game is even more simple, as it ignores the steps in between and simply checks to see if there's a connection. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222416 Share on other sites More sharing options...
Developer zarklord_klei Posted July 9, 2019 Developer Share Posted July 9, 2019 1 hour ago, Nightinggale said: Yes FPS is generally a poor measurement. When it's about gameplay experience, the real number is frame time. 50 fps can be more smooth than 55 fps if the latter is 54 frames at 60 fps and then one frame at 12 fps because what the player will see is the single 12 fps frame. The FPS measurement is good because people understand it. You don't see people post "my highest loaded CPU is X% loaded while playing". You see people complaining about FPS. It's also fairly easy to detect when the game has more than 100% CPU load because that's when it's no longer 60 FPS. Also when the computer fails to provide 60 FPS, any slowdown will result in worse framerate, which is easily detectable for the player. It's nice for you if you can maintain 60 FPS, but people are posting about 20-30 FPS gaming experiences. Since that's the kind of hardware a significant number of player use, then that's the kind of hardware the game should try to run smoothly on. I wasn't bragging, or saying that the game doesn't need to still run better, but that fps isn't a completely accurate measurement, nothing else. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222418 Share on other sites More sharing options...
Drethon Posted July 9, 2019 Share Posted July 9, 2019 16 minutes ago, KittenIsAGeek said: So.. basically.. more or less how electricity already works in the game? Edit: No, wait.. Electricity in the game is even more simple, as it ignores the steps in between and simply checks to see if there's a connection. The potential benefit I can see is looking at where the electricity is being used and better locating where a wire should be overloaded, not going to say if it is worth the additional processing. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222425 Share on other sites More sharing options...
Yunru Posted July 9, 2019 Share Posted July 9, 2019 39 minutes ago, DreamApart said: I think it's ... probably a maximum flow problem, which is not NP-Complete. Except that The left generator would still connect to the circuit the right is on and... you've once again got the current implementation. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222432 Share on other sites More sharing options...
DreamApart Posted July 9, 2019 Author Share Posted July 9, 2019 Just now, Yunru said: Except that The left generator would still connect to the circuit the right is on and... you've once again got the current implementation. It's not the current implementation. The current implement is even more simple, it doesn't have the current and the voltage, only wattage. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222434 Share on other sites More sharing options...
KittenIsAGeek Posted July 9, 2019 Share Posted July 9, 2019 14 minutes ago, DreamApart said: It's not the current implementation. The current implement is even more simple, it doesn't have the current and the voltage, only wattage. Correct. Computationally this is a smart choice. They don't have to calculate voltage differentials between various points along the line. Nor do they have to calculate how much current is in any particular branch of wire. All they have to do is ask, "Is there enough power on the network to run this device?" So they have an Order 1 for each device, rather than an exponential order of calculation for a network. While I think it would be kinda fun to add a Spice simulator to ONI to handle electricity... I don't think it would be feasible. I can only imagine the computational nightmare of some of the electrical networks I've seen built in this game. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222442 Share on other sites More sharing options...
DreamApart Posted July 9, 2019 Author Share Posted July 9, 2019 23 minutes ago, Yunru said: you've once again got the current implementation. Wait a minute... Are you currently taking about the current ... or the current? Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222444 Share on other sites More sharing options...
Nightinggale Posted July 9, 2019 Share Posted July 9, 2019 2 hours ago, TEBOT said: If you pay attention to how a car battery is hooked up, You will definitely see wires of different cross-sections, as different devices differ in current demand. Have you ever looked into the car's fusebox? There are like 30 fuses or something like that. Each fuse acts as what the transformer does ingame: restrict the current in the subsection to prevent overload. 2 hours ago, TEBOT said: To me, ignoring Kirchhoffs first law is very confusing, especially because now the network is breaking in random places, not where the current should be largest. I also don't think its demanding to calculate. While I agree it would be best to calculate currents to make the damage take place in non-random locations, I disagree that it wouldn't be demanding to calculate. What if a player makes a 7x7 grid where each wire is connected to all 4 sides? Now place power producer and 3 aquatuners in that. How will you figure out the current in each cell? If you figure out the overload should take place in a specific cell and that cell is a heavy wire, then what? Find somewhere else for an overload? Calculating currents would not only be more demanding for the CPU, it would quickly become complex for the programmer to figure out how to design the code to take all player options into account without being obviously wrong in any case. Link to comment https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/page/3/#findComment-1222482 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.