mrh0 / createaddition

Create Crafts & Additions, Addon to the Create mod by the Create Team.
Other
84 stars 110 forks source link

Stress vs. Speed should have an inverse relationship #250

Open tungstonminer opened 2 years ago

tungstonminer commented 2 years ago

Describe the bug I was experimenting with the electric motor, and found that the faster you turn up the speed, the more SU it can overcome. This is the inverse of how other create machines work. For example, in experimentation, I found these results:

speed (rpm) stress capacity (su) energy usage (fe/t)
1 32 8
2 64 8
4 128 8
8 256 8
16 512 15
32 1024 30
64 2048 60
128 4096 120
256 8192 240

So, as you ramp up the speed, the motor gets stronger. Instead, I would expect there to be a tradeoff between speed and power (as with real-world motors of the same sort). Of course, there's no fixed ratio (i.e., some electric motors are stronger than others). I would also expect the power consumption to be roughly consistent (since the same amount of work is being done), perhaps with some penalty (for friction) at higher speeds. This table is closer to what I would expect:

speed (rpm) stress capacity (su) energy usage (fe/t)
1 1024 17
2 512 17.4
4 256 18
8 128 18.8
16 64 20
32 32 21.7
64 16 24
128 8 27.3
256 4 32

Where: energy = 16 + speed^0.5

I'm not sure about choosing 16fe/t as the right "base cost"... that would need to be balanced against the output of the alternator and against other mods which create power. However, I'm sure you see what I'm getting at.

To Reproduce

Place an electric motor in the world, provide it with power, and adjust the speed setting.

Additional context

voidsong-dragonfly commented 2 years ago

Neither your nor the old one is quite accurate - it's more accurate to have power peak somewhere in the middle of the range and to have a torque/speed limit. (just for reference, SU is power) image I would argue it should follow this image pretty well - it gives good reason to keep gearing in there, something it can sometimes replace.

Blightbuster commented 2 years ago

Although it might be more realistic the way you described above, it wont be intuitive at all to players imho.

tungstonminer commented 2 years ago

I love the realism of @Silfryi's idea, but I have to agree that it will "feel" less intuitive to players. My main concern with opening this issue is to avoid the unrealistic (and unintuitive) current state of affairs where power grows with speed.

voidsong-dragonfly commented 2 years ago

Hmmmm... fair point. I would say that mentioning in the ponder that the motor runs best when speed is roughly half its maximum so it can be matched with force might be good enough? But I get the point. Maybe have a config mode to enable an algorithm for speed like the one above? No worries if that's not useful though

KennyKerner commented 1 year ago

Well having a tradeoff between speed and torque would probably not only be intuitive for people who are a bit more familiar with the create mod but some hobbyists that deal with motors irl as well. Having the toggle be in the config might just be the best idea since there's more freedom on the player's part. Probably just saying something along the lines of speed and torque being a tradeoff would probably be enough for the ponder menu.

DorianWang commented 1 year ago

The maximum speed of an ideal DC electric motor is based on the voltage used to drive it, so a motor at 10V has half the maximum speed of the motor at 20V. The max torque value (at half of the max speed) is also related to the voltage. The current implementation does mostly follow that theory, but the power usage should be P=V*I, with current being proportional to torque which is proportional to voltage, so the power usage should actually scale quadratically with speed (not linearly as in the first table) but su scales with speed too so that balances out the numbers.

I feel that having the stress capacity be a fixed value would make the system easier to understand (as an electric motor, not as part of the create mod), with power usage then scaling either with speed or if possible the actual su# on the motor.

The current implementation makes increasing speed not cause stress capacity issues which is fine, but does simplify the whole system (since FE tends to be easy to transport, store and scale) which might not be desired.

The proposed solution by tungstonminer is also mostly fine from a game design/balance point of view.

traugdor commented 1 year ago

All Create SU sources increase the SU output as a direct ratio of the RPM. Here are a few examples with some drawbacks they might have.

Hand Crank: 8x rpm (requires you to stand there and crank it and it takes a lot of hunger points) Waterwheel: 16x rpm (cheap but takes up a lot of room. Requires a water source) Windmill: 512x rpm (but it turns slow and can be really difficult to reach max speed) Furnace Engine (obsolete): 1024x rpm (consumes a lot of resources to keep it running.) Steam engine: 128x-256x rpm (requires multiple blaze burners and a steady source of lava and water) Electric motor: 32x rpm (requires any of the previous generation methods coupled with an alternator turning at a high rate of speed)

So you see, it ranks between a waterwheel and a steam engine in terms of power output and it can go all the way up to 256 RPM for a whopping . If you're not able to handle the power output of the motor at that speed, others have mentioned that you can gear it down or use a speed controller to slow it to a more usable RPM for your machines.