Recognized by Council New "meter block" to replace lag-sensitive "timed logic"

    Joined
    Jun 21, 2015
    Messages
    45
    Reaction score
    11
    I tried to build a dual power-supply "turret" yesterday, and quickly realized that it simply doesn't work (as expected/desired) when the lag kicks in, which is like all-the-time if you are on a popular server.

    My suggestion, as an alternative, is to stop using "timing" to "assume" system states, and instead just plain measure the system state with a "meter block". That way, it would not mater how long it takes before your weapon cools down, or you power tank refill, ... You just wait until you know you reached the desired state, and then you activate your logic (or the other way around, using a NOT block).

    The "meter block" would be configurable by a number, 0% to 99%, and would activate if the measured state is over that percentage. The "measured state" would be determined by making the meter block a slave of a block representing the desired system state.

    In some cases, the measured value is "boolean", like "enemy presence" (0% or 100%), but that's OK. Maybe in some case it would be good to have a "absolute value", but in most cases, a relative value is better, because you can add more shield capacitors, and your logic will still work, or even still work if capacitors are reduced due to enemy damage!

    Here a list possible system states, and which block would represent them:
    • Shield => Shield Capacitor (Activate Shield Supply Beam(Full)/Sound Alarm(Not Full Anymore))
    • Power => Power Tank (Activate Power Supply Beam/Weapon)
    • Storage Capacity => Storage (Stop salvaging!)
    • Weapon/Tool Cool-Down => Weapon/Tool Computer (Fire when ready)
    • Enemy Presence => Scanner Computer (Sound alarm/Launch Drones/Deploy Turrets)
    • Speed => Thruster, uses Thruster alignment (React to full-stop?)
    • Cloaking => Cloaking fails randomly under Lag (Reactivate Cloaking automatically)
    • Armor HP => Any Armor Block (Activate evasive maneuver/retreat automatically for drones?)
    • System HP => Core (Activate evasive maneuver/retreat automatically for drones?)
    In short this one single block would be a game-changer on servers, where lag is basically constant, and messes up you "timed logic". I'm on the "server #2" on starmade-servers.com, and we get lag of 10-40 seconds at least once every day, for sometimes up to quarter of an hour (and that's only when I'm online; it probably happens when I'm offline too). Lag is literally killing us, and this would help a lot, by making logic lag-insensitive.
     
    • Like
    Reactions: Lukwan
    Joined
    Jan 25, 2015
    Messages
    964
    Reaction score
    225
    • Wired for Logic
    • Councillor 2 Gold
    • Legacy Citizen 5
    I don't know if this would be lag insensitive. I have actually wanted a way to get a logic signal from values like "there is power" and "there isn't power" in the past. But I don't think this will be lag proof as the checking itself may lag. Mind you tho, I am suggesting that it might not work, I have no clue if it will/won't
     
    Joined
    Jun 21, 2015
    Messages
    45
    Reaction score
    11
    I don't think this will be lag proof as the checking itself may lag.
    Well, I was hoping the devs would get that info to be correct. If lag does falsify the measurement, I guess the usefulness of the idea is limited. OTOH, a messed-up clock seems to carry on being messed-up after the lag is gone. But a measurement should become correct again after the lag is gone. So on average, this should be a more reliable solution.
     
    Joined
    Jan 25, 2015
    Messages
    964
    Reaction score
    225
    • Wired for Logic
    • Councillor 2 Gold
    • Legacy Citizen 5
    Even if you the problem you want to solve can't be solved with this suggestion, it is still a very cool feature that can be useful, say you want a signal once there is power present in the ship. (could allow some logic interaction with ships made on shipyards)
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    Even if you the problem you want to solve can't be solved with this suggestion, it is still a very cool feature that can be useful, say you want a signal once there is power present in the ship. (could allow some logic interaction with ships made on shipyards)
    This is something I would imagine being built into the display blocks.
     
    • Like
    Reactions: HolyCookie
    Joined
    Jan 25, 2015
    Messages
    964
    Reaction score
    225
    • Wired for Logic
    • Councillor 2 Gold
    • Legacy Citizen 5
    This is something I would imagine being built into the display blocks.
    That you could set it to give a signal when for example power = 10% or power >90%?
    I guess that could work, takes away the need of adding a new block.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    That you could set it to give a signal when for example power = 10% or power >90%?
    I guess that could work, takes away the need of adding a new block.
    Yup a quick bit of code, as well as a cool display would be great.
     
    Joined
    Jan 25, 2015
    Messages
    964
    Reaction score
    225
    • Wired for Logic
    • Councillor 2 Gold
    • Legacy Citizen 5
    Yup a quick bit of code, as well as a cool display would be great.
    You mean a quick bit of code for the devs right? Not to use it as player right?
    I have 2 reasons why I as player don't want programming in starmade.
    1: I suck at it
    2: makes logic gates and logic engineers completely useless and they will fade out of existence.
    mind you, the first one is my opinion, the second a fact.
    But I guess you will probably need something similar to the "display power" and such to get the wanted outputs.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    You mean a quick bit of code for the devs right? Not to use it as player right?
    I have 2 reasons why I as player don't want programming in starmade.
    1: I suck at it
    2: makes logic gates and logic engineers completely useless and they will fade out of existence.
    mind you, the first one is my opinion, the second a fact.
    But I guess you will probably need something similar to the "display power" and such to get the wanted outputs.
    I don't want to detail the post but there are some problems in that statement:
    1) I'll teach you, I don't want to be able to write complete server side VMs in it but I want something a bit more indepth then factorios system
    2) False, Even in real life binary logic works much better for many systems, but there are some systems which can be more complex where code works better.

    The way I imagine it working is allowing the display module a single output, and you can do with your output as you wish. So based on inputs you receive and stats on the ship you manipulate the output.
     

    Lukwan

    Human
    Joined
    Oct 30, 2015
    Messages
    691
    Reaction score
    254
    Great suggestion. I would love to have a logic block that triggered when my shields go down.