Spigot SignLink 1.14.4-v1

Display generated text and variables on signs dynamically

  1. If you are on the latest version, it is an issue I cannot really fix. The problem is that Minecraft client enforces a maximum number of characters on the sign that doesnt exactly cover the entire space of the sign. As well, there is no invisible character I can use to 'pad' extra space between words to make the scrolling smooth. Unfortunately I dont have much of a solution, Minecraft is just a little annoying with text on signs.
     
  2. I wonder if SignLink is incompatible with Unicode characters... (They don't appear consecutive across signs when non-ASCII characters are used...)
    [​IMG]

    Or is it because there are less than 15 visible characters on the sign...
    EDIT: It doesn't appear to have issues with more than 15 visible characters on the sign...
     
  3. @bbayu
    This is a problem I tried to fix but can't. The issue is that the standard Minecraft font included with Bukkit doesnt contain any unicode characters. Ive tried to parse the dimensions of font characters using resource packs/minecraft client assets, but that didn't result into any consistent results. I don't know how Minecraft decides the distance between characters, so I couldn't figure out any good way to take those into account. I assume some of it has to do with the alpha channel in the font textures.
     
  4. And then this is what happened after the server restarts XD
    [​IMG]
     
  5. Oh lol, thats more serious of an issue. I dont think it supports unicode text in the yaml maybe? Whats in the values.yml file for that variable?
     
  6. I'll check it later. Meanwhile, I did some research online, and found out that the text length on the sign depends on the resource pack that the player is using. Meaning that a player using a resource pack with skinnier font can see more characters than other players... I find this quite annoying lol.
     
  7. This quote is where I saw the information from
     
  8. There is also a mysterious "glyph_sizes.bin" which I actually decoded and used, but none of the supposed glyph sizes I read from there were any use. They didn't correlate at all with what the client did. So yes, very likely its all magic resource pack stuff. Which makes it a little difficult to support properly.

    I researched this before because I wanted to try and pad the text on a sign with small single-pixel whitespace characters. That way it could scroll better. Unfortunately, no such unicode character exists.
     
  9. The related section of values.yml:
    Code (YAML):
    testvar:
      value
    : &f??????????
      ticker
    : LEFT
      tickerInterval
    : 20
    testvar2
    :
      value
    : '1234567890'
      ticker
    : LEFT
      tickerInterval
    : 20
    testvar3
    :
      value
    : ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ
      ticker
    : LEFT
      tickerInterval
    : 20
    EDIT: Its supposed to be Korean characters, just retextured as emojis.
     
    #30 bbayu, Jan 31, 2018
    Last edited: Jan 31, 2018
  10. I don think the UTF-8 the yaml file is encoded as can encode the korean characters. It's a new one for me, but something I can maybe fix in BKCommonLib
     
  11. For a few days I found an error related to the font, in this case the mistake is that the bold text in movement is not correctly displayed as in the video I leave below.



    In the video you can see the difference between having the text in bold with (& l) and without in normal text, where it is seen that the text is cut short or long phrase.
     
  12. @jugondavidlisto
    Is this with the most recent signlink version? On older versions it did show this behavior because of the 15-char limit, but that should be fixed on the newer versions where it uses text length instead.
     
  13. If this happens to me with the latest version, it's SignLink-1.12.2-v4.
     
  14. Any ideas to optimize this better on a server? I am using this for arrival times on traincarts, however it brings my server from 19 tps to 15.

    6.77% 10.11% 102.94 s 5.06 ms 1.0 20.4k Task: SignLink$SignUpdateTextTask(interval 1)

    Thanks in advance for any ideas
     
  15. @Dragon_12dk A problem I noticed before is that signlink tracks all signs on the server, whether they are signlink signs or not. This is because, technically, the text on a sign can change at any time. I don't think there is much you can do, but perhaps I can introduce an option in signlink that turns off automatic detection of change in sign contents.

    Previously it did a full refresh of all signs on the server every 50 odd ticks. This caused a really bad 'spike'. I 'fixed' this by randomizing the ticks in which signs are updated, basically causing it to refresh 1/50th of the signs every tick. If you have a lot of signs, this will still hurt your TPS. The only thing you can do to fix it is use less signs on the server. But, because traincarts uses signs a lot...it makes things worse.

    Currently it is done like this:
    https://github.com/bergerhealer/Sig.../bergerkiller/bukkit/sl/VirtualSign.java#L421
    Code (Text):
    private static final int SIGN_CHECK_INTERVAL = 100;
    private static final int SIGN_CHECK_INTERVAL_NOVAR = 400;
    All signs that dont store variables receive a refresh every 400 ticks. So basically, take the total number of signs on your server and divide by 400 and thats the amount of signs refreshed every tick. I would think this poses no problem for most servers, unless you have 100000 signs or something?

    Other possibility is that there simply are too many variable changes causing it to spend a lot of time preparing and generating sign text + packets.
     
    #38 TeamBergerhealer, Jun 15, 2018
    Last edited: Jun 15, 2018
  16. Mmm, that is probably the issue then, as I easily have over 1,000 signs on the server.
     
  17. @Dragon_12dk Can you see if this build fixes or at least reduces the TPS loss you're suffering because of this? I've disabled this automatic discovery by default, with option in config.yml to turn it back on.

    https://ci.mg-dev.eu/job/SignLink/27/
     
    #40 TeamBergerhealer, Jun 16, 2018
    Last edited: Jun 16, 2018