Solar panel lag reduction idea

  • Either for an add-on or as an addition to the main mod;


    Make solar panels 'connect to each other (with the limitation that it can only go 40 blocks, then new connections are made) and emit their eu through only one output face, with all connected solar panels contributing to a single calculation, then either sending it along as a packet or as many 1-eu packets.


    Or, make a new block which is able to accomplish this, or add the functionality to energy storage and/or transformer blocks. Or perhaps add both this and the above, with the above having the detraction that it will only emit 1-eu packets?


    This would maintain both of the original intended costs of solars; The actual material costs, AND the cost of requiring huge solar farms to accomplish real production.

  • Not worth the time needed to code this.
    Don't be mistaken, sending 1 or 40 packets over a defined energynet, both is pretty much neglectible in regards to CPU usage.


    CPU usage comes from sunlight checks, TileEntity blocks in general and the altering of Enet (adding/removing cables or panels).

  • Not worth the time needed to code this.
    Don't be mistaken, sending 1 or 40 packets over a defined energynet, both is pretty much neglectible in regards to CPU usage.


    CPU usage comes from sunlight checks, TileEntity blocks in general and the altering of Enet (adding/removing cables or panels).

    Oooh, okay. I was afraid of that...


    EDIT: What would be a way to reduce that lag, without taking away huge solar farms, then? Or is there a way?

  • Hrmm, I could make a central Solarpanelcontroller and stupid nontileentity Solarblocks. Nah, not now.

    Yeah, but how would you have a non-TileEntity block that iterates to sky?

    Is the answer to this question no?


    Quote

    Hey don't take it so hard. Ignorance is part of this generation it seems. -the wise words of XFmax-o-l

  • Quick question seeing as im still too lazy to bother checking the code: How exactly the sunlight checking method works? Its only capable of checking the sunlight that hits its spot directly or can it also check adjacent blocks too?

    You can check if a Block at XYZ has Sunlight or not. Not only the TileEntity, with the Sun shining on it.

  • So can a single Block or tile-entity can check for sunlight for nearby blocks with a single check?


    If the above its true, something i though right now was:


    -A Solar Concentration "Tower", that when placed (Or when a nearby block its placed/removed) will check for nearby solars and save their coordinates to perform the sunlight check for all of those blocks at the same time (Dunno if this will reduce the lag or not). Of course this would mean solars can't work without a solar tower nearby.

  • could it help to set down the update intervall off the tile entity? instead off 1 eu/tick to 20 eu/s
    or i'm mislead?

    I don't think it checks every tick, if you put a block above a solar panel, it will still continue to transmit eus for about a second or two.

    Is the answer to this question no?


    Quote

    Hey don't take it so hard. Ignorance is part of this generation it seems. -the wise words of XFmax-o-l

  • breakdown mechanics shoud be implemented for every passive generator, only this can help to reduce lag.


    1% per 3600*20 ticks is fine for solars mills and windgens at safe height.


    on breakdown machines shoud explode, as TNT or a bit stronger.

  • on breakdown machines shoud explode, as TNT or a bit stronger.

    lol


    Also, many people (myself included) don't like breakdown mechanics on any machines, so probably not in the main mod.


    You can do whatever you want with addons, though.


  • Is it possible to "cubscribe" to messages each time block is placed or removed at certain box (or certain chunk)?

    You mean a "Hey the Lightlevel has changed, lets do an update of the Energycosts"-Update? I think thats possible, but i cant look at the Code to proof it.

  • You mean a "Hey the Lightlevel has changed, lets do an update of the Energycosts"-Update? I think thats possible, but i cant look at the Code to proof it.

    If it is possible, and you do it, use it on your addon to make solarspammers (and everyone that hates solarspam lag) happy! [replace ic2 solar panel with it]
    [I would like something similar to windmills, but that would be impossible as all windmills needs to calculate obstructions once every 128 ticks...]