Not logged inOpenClonk Forum
Up Topic Fixing and improving the power system

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Zapper
Mh, yeah. I guess that's one of the points where I'd rewrite parts of the (current) power system, too.

I don't have all the adjustments you already made in my head, but I'd probably split up the consumers/producers into different priority queues, add sleeping queues for both and differentiate between actual producer (MakePowerProducer) and potential producer (OfferPowerProduction) where the latter would just add the producer to the sleeping queues. Whenever the balance is below 0, producers from the sleeping queue could be woken up (steam engine and compensator for example).
And since the queues would be priority queues, the power system could simply wake up as many producers as necessary until the required power is reached. And everything would be simple, clean and everwhere would be unicorns and rainbows.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill