Tech Reborn

Tech Reborn

30M Downloads

Commit to powers of two for all energy values and GUI

Wdavery opened this issue ยท 8 comments

commented

Not really a feature but a QOL update to unify the math that's going on for energy calculations.
I think all numbers should be moved to powers of 2 (most already are).

Ex. change default value for thermal generator max energy from 1,000,000 to 1,048,576

Generators are generating power in powers of 2, so I think it's natural for storage to be the same.

Also related would be altering the GUI to represent this change and have 1 kE = 1024 E โ‰  1000 E
The common one I see in game is 8.2K E which should just be represent as 8 kE.

This would clean up a quite a few numbers in the tooltips/GUIs to be whole and not decimals.

Not sure if others would be on board with this, but I do feel it would be a natural move to simplify some of the interface for players. But I do see the potential argument that people are not used to dealing with these types of numbers and may struggle with conversion from E to kE to mE etc. But it is Minecraft and everything vanilla is powers of 2 already so lets lean in!

commented

I feel like having powers of 2 shown to the end user in decimal form would confuse most people. It confuses me, and I do understand Base2 form.

Edit: Have Base2 in code, but transform it to Base10 in the GUI, and have a config option to change what the GUI shows, if possible.

commented

I second this enhancement. Additional benefit is simpler and faster code. x >> 10 is much faster than x / 1000

I think the confusion is worth it, especially if we later explain it ingame, when I eventually will take care of the book

commented

I still want a config option to change how it's displayed, if possible.

commented

I feel like having powers of 2 shown to the end user in decimal form would confuse most people. It confuses me, and I do understand Base2 form.

I think there's a misunderstanding here. Let me re-explain:

The whole idea here is that power2 would never require a decimal. The current 8.2k would become simply 8k. All numbers would be divisible by 2 (or 1024) and would eliminate decimals entirely, allowing for easier math for users.

EDIT: There may be a miscommunication here. I never intended to suggest all decimals found in-game would be removed. Precise numbers would remain. Simply that moving to power2 would naturally reduce the amount of decimals in-game. Transfer rates, storage capacities, etc would not require any decimals.

commented

No decimals means no precision. That's not a good thing.

commented

No decimals means no precision. That's not a good thing.

That's not what Wdavery is suggesting, if I understand correctly.

Wdavery, let me make sure I understand correctly. You want to swich from base 10 to base 2 in the game, such that Minecraft would count like this:

998
999
1000
1001
1002
...
1021
1022
1023
1k

Therefore, if your machine says it has 1k of Energy (or whatever), then you know it actually has at least 1024 units instead of 1000. I can see why this would be helpful. For example, the Fusion Control Computer currently has an input rate of 8192 Energy per Tick. Therefore, after this conversion, you could simply show this as 8k E/t instead of 8.1k E/t, thus cleaning up a lot of areas where the transfer rate or maximum capacity is grounded in base 2.

While initially confusing in the sense that I can't do the mental math to figure out how much actual energy is in the machine (for instance, if a machine says it has exactly 105k, I can't quickly figure out what 105*1024 in my head), it does put everything on an even playing ground. It almost doesn't matter how much individual energy is in a machine, because it's always more than the player would expect and it cleans up the interface.

This kind of makes sense in terms of working with many stacks of the same item in base game. If I have 14 stacks of coal, I can't quickly figure out how many individual pieces of coal I have, but that's okay, because I know I can fill 14 furnaces.

I hope this sums up what you were getting at very well.

commented

Yeah exactly, thanks for the explanation.

I really like your point of always being more than what the player (being unfamiliar with power2) expects.

Just to add clarification to that:
105k in power10 = 105,000
105k in power2 = 107,520

Meaning a player will never be "missing" energy that they were expecting to have if they are unfamiliar with the notation. If they know they needed 105,000 E, they will always have more than that when reading 105kE in power2.
IMO, this eliminates most or all confusion issues potentially caused by the switch.

commented

Additionally, if a device says it needs say, 4k Energy to produce a chocolate cake ๐ŸŽ‚, then I would interpret that to mean it needs 4096 Energy. So if the player looks at their battery and it says they have 3.9k energy, they know they don't have enough. If the machine says it has 4k, then they definitely have enough, because that 4k includes the 96 that would otherwise be missing in base 10. It would all be ๐ŸŽ to ๐ŸŽ.