The Perfect Energy System

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Henry Link

Forum Addict
Dec 23, 2012
2,601
553
153
USA - East Coast
This, however, I do have to wonder about. Just because a formula is algebraic does not mean it is computationally trivial. If you have even a single division operation running in there (on a per-tick basis), it's horrendous.

I do like your mod, BTW. Just pointing out that lag in Minecraft is really death by 1000 cuts - as poorly coded as the base game is, it generally does not lag. After mods, well...

Wasn't this one of the primary reasons for creating compact solars? If I remember correctly it had something to do with each solar panel doing a check all the way to the build limit to make sure it wasn't blocked form sunlight. Then multiply by that by a few hundred solar panels you get LAG.
 

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
I agree completely that Minecraft's underlying code is extremely inefficient. I'll also agree that a single multiplication operation is a very trivial thing for a computer to do. The problem is that Minecraft is single threaded, and you don't have a single operation, you may have thousands of them. In such a case, that multiplication is not helping matters.
Thousands is unlikely except for enormous worlds or servers. But then again, a computer of significant power would be required to run such a world anyways.

This, however, I do have to wonder about. Just because a formula is algebraic does not mean it is computationally trivial. If you have even a single division operation running in there (on a per-tick basis), it's horrendous.
My temperature and material calculations generally run every second (20 ticks). This is as much a balance and simulation speed control feature as a lag control, but it does cut the required computation twentyfold. The projectile-type or similar "event" calculations are far more sporadic. A couple of my machines have one massive calculation, and it does generate a lag spike, but given that they generally cannot do this frequently - my EMP, for example, might be able to fire every few hours if you really devoted yourself to it.

I do like your mod, BTW. Just pointing out that lag in Minecraft is really death by 1000 cuts - as poorly coded as the base game is, it generally does not lag. After mods, well...
This is in my experience more a matter of hardware. I have an (admittedly piece-of-crap) laptop that can hardly manage 8 FPS on vanilla SSP/SMP/Creative. My normal computer, however (on which I do all coding and testing), is far stronger and notices almost no FPS issues from any one thing. Now, FTB does drag the FPS down to about 40-120, but with RC alone I have managed >1200 fps; my drops seem to be mainly render-related (as the screenshots show; adding more complex models means reducing fps).
Now, I suppose that is to be expected with a $550 CPU and a $160 GPU, but still.

(I apologize for the massive images; I have no idea how to resize an image within "img" tags)
l7SlQqX.png

tkTAN6J.png

NF780pw.png
 

draeath

New Member
Jul 29, 2019
456
0
0
Wasn't this one of the primary reasons for creating compact solars? If I remember correctly it had something to do with each solar panel doing a check all the way to the build limit to make sure it wasn't blocked form sunlight. Then multiply by that by a few hundred solar panels you get LAG.

You'd think you could just do that check on chunk updates or just on light level. Solar panels (IRL) don't care what the light source is, light is light - and you need to check the light level anyway to avoid functioning at night. Might as well just base it solely on light level and save yourself the calculations.
 

SpitefulFox

New Member
Jul 29, 2019
1,235
0
0
You'd think you could just do that check on chunk updates or just on light level. Solar panels (IRL) don't care what the light source is, light is light - and you need to check the light level anyway to avoid functioning at night. Might as well just base it solely on light level and save yourself the calculations.

But then you could just stick your solar panel under a Glowstone block and have INFINITE POWAH. :eek:
 

draeath

New Member
Jul 29, 2019
456
0
0
The problem lies with the glowstone producing sunlight-level light, not with the solar panel :p

EDIT: Direct sunlight has a light level higher than that attainable with glowstone/torches/etc, doesn't it? If so, just put your power generating threshold between the two.
 

Harvest88

New Member
Jul 29, 2019
1,365
-1
0
The problem lies with the glowstone producing sunlight-level light, not with the solar panel :p

EDIT: Direct sunlight has a light level higher than that attainable with glowstone/torches/etc, doesn't it? If so, just put your power generating threshold between the two.


No in MC both are the same since Glowstone and the MC sun emit 15 light level.
 

draeath

New Member
Jul 29, 2019
456
0
0
Well, one could either boost the sun to 16, or drop glowstone to 14 as a nice hacky way to get around that.
 

Tylor

Well-Known Member
Nov 24, 2012
500
120
68
I've been seeing, and maybe contributing, a lot of criticism towards the EU and MJ systems and some of the new changes coming out, and that got me wondering:

What would make a good energy system? I'm curious to see what people think would make for a good system as opposed to hearing what people hate about existing systems. :)

Most importantly, though, is what would make a fun energy system to play with. :p

I think Buildcraft system is now the best, and will be even better in 4.0
 

draeath

New Member
Jul 29, 2019
456
0
0
My only complaint about BC's system is there is no apparent way to 'throttle' things - the engines are either on or off, and when the transfer mechanism (conductive pipes) can explode, that's not very nice, not without machines being able to signal that they need power.

Even if they were able to signal that, the way most of the engines have a "warm up" period means hysteresis problems.

That's why I love EU so much - the EU isn't consumed unless it is necessary.
 
  • Like
Reactions: SatanicSanta

casilleroatr

New Member
Jul 29, 2019
1,360
0
0
My only complaint about BC's system is there is no apparent way to 'throttle' things - the engines are either on or off, and when the transfer mechanism (conductive pipes) can explode, that's not very nice, not without machines being able to signal that they need power.

Even if they were able to signal that, the way most of the engines have a "warm up" period means hysteresis problems.

That's why I love EU so much - the EU isn't consumed unless it is necessary.

Thermal Expansion engines will throttle themselves if there are no consumers on the network. It might only work on conduits though, not with Buildcraft conductive pipes. Also, conductive pipes no longer explode they simply can't allow more power through over a certain threshold (for example gold conductive pipes allow 256 mj/t). A lot of these changes have been brought in recently and the changes are continuing into 1.6.

On a final note, gates although expensive can be used to control when engines should be on or off. That being said, a lot of people have been left confused by some changes to buildcraft machines lately. Now that machines (at least in Buildcraft, forestry and railcraft all have idle consumption, gates' sensitivity to the network seems like a bit superfluous). Direwolf 20 recently spotlighted the new 1.6 version and he goes into gate control in a bit more detail there.
 

draeath

New Member
Jul 29, 2019
456
0
0
Just to make sure I understand - it's perfectly safe to pump as much MJ into a conductive pipe as you want, now? The only trick to recall is that there is an upper limit to the amount of MJ/t that can flow through.

Are loops still a problem?
 

Tylor

Well-Known Member
Nov 24, 2012
500
120
68
I think only thing that BC (by itself) really lacks is energy storage. Not for long-term energy stockpiling (there are fuel tanks for that), but for buffering enrgy between engines and machines.
 
  • Like
Reactions: SatanicSanta

Hydra

New Member
Jul 29, 2019
1,869
0
0
Just to make sure I understand - it's perfectly safe to pump as much MJ into a conductive pipe as you want, now? The only trick to recall is that there is an upper limit to the amount of MJ/t that can flow through.

The pipe won't blow up but now some engines (like the RC hobbyist engine) will blow up instead. No idea why they made the last few changes, anyone is going to use conduits anyway.
 

draeath

New Member
Jul 29, 2019
456
0
0
Thermal Expansion has you covered.

The pipe won't blow up but now some engines (like the RC hobbyist engine) will blow up instead. No idea why they made the last few changes, anyone is going to use conduits anyway.


Can you explain the difference to me? I've never seen conduits in action.
 

draeath

New Member
Jul 29, 2019
456
0
0
I think I found the information. In a way, these seem to be as liquiducts are to waterproof pipes?
 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
Thermal Expansion has you covered.




Can you explain the difference to me? I've never seen conduits in action.
Conduits won't explode, and have (IIRC) 0 energy loss. They don't have specific types of themselves used to output energy from an engine, you just need to use a wrench to change them from input/output mode.
 
  • Like
Reactions: draeath

Antice

New Member
Jul 29, 2019
729
0
0
The pipe won't blow up but now some engines (like the RC hobbyist engine) will blow up instead. No idea why they made the last few changes, anyone is going to use conduits anyway.


the engines will blow up unless switched off when there is no demand for the energy because the engines internal energy storage is being overloaded. the same was true before when connecting engines directly to machines as well. if the machine did not use the produced energy, then the energy would pile up and destroy the engine after a while.
With the new conduit mechanic the conduits will no longer take energy without there being a demand someplace in the network. the new gates are meant to check if there is a need for the energy in the system, and if not, turn the engines off to conserve fuel/save the engine from overloading.
 

Hydra

New Member
Jul 29, 2019
1,869
0
0
the engines will blow up unless switched off when there is no demand for the energy because the engines internal energy storage is being overloaded. the same was true before when connecting engines directly to machines as well. if the machine did not use the produced energy, then the energy would pile up and destroy the engine after a while.
With the new conduit mechanic the conduits will no longer take energy without there being a demand someplace in the network. the new gates are meant to check if there is a need for the energy in the system, and if not, turn the engines off to conserve fuel/save the engine from overloading.

I know why it's happening. I just think it's a stupid change. The pipes should just dissipate energy when they're full, like conduits do.