This object is in archive! 
[1.192.021] In-game scripts using sprites don't work in MP
Solved
In Single Player or local MP as a host in-game scripted screens display properly:
In a Dedicated Server or local MP as a client, in-game scripted screens using sprites look like this:
Steps to reproduce:
1. Start a single player game (with in-game scripts enabled)
2. Spawn in the ship attached to this post. The LCDs on the bridge will display properly like the first image.
3. Start a Dedicated Server game (with in-game scripts enabled)
4. Spawn in the ship attached to this post. The LCDs will display the bright default blue background instead.
Files:
WMI Severn Atta...
Adding an empty MySprite() at the beginning of your draw frame periodically will force the game to send all the sprites. It caches them in an array so if you send the same sprites, it will ignore duplicates. Adding one at the front shifts the indicies and makes it draw again.
The issue seems to be with sprite streaming to clients. This often arises when entering sync range. For whatever reason, the client does not get all the sprites, and since the server only sends unique sprites, if one fails to reach the client, it never will unless you force it to be sent again.
Adding an empty MySprite() at the beginning of your draw frame periodically will force the game to send all the sprites. It caches them in an array so if you send the same sprites, it will ignore duplicates. Adding one at the front shifts the indicies and makes it draw again.
The issue seems to be with sprite streaming to clients. This often arises when entering sync range. For whatever reason, the client does not get all the sprites, and since the server only sends unique sprites, if one fails to reach the client, it never will unless you force it to be sent again.
Have been playing on a PVP server, half of the time the lcds had this problem
Have been playing on a PVP server, half of the time the lcds had this problem
so i play on Local MP, im alone atm..does this mean as soon someone joins it, the LCDs will become blue?
so i play on Local MP, im alone atm..does this mean as soon someone joins it, the LCDs will become blue?
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
very funny @KEEN! THEY DONT WORK!!!
very funny @KEEN! THEY DONT WORK!!!
I was able to reproduce the issue and reported it. I hope we will manage to fix this son, We will update the thread once we have more information.
Thank you, Whiplash.
I was able to reproduce the issue and reported it. I hope we will manage to fix this son, We will update the thread once we have more information.
Thank you, Whiplash.
WHIP! ARE YOU A DEV????
WHIP! ARE YOU A DEV????
FYI this is still broken as of 1.192.101 despite the change log listing it as fixed.
Examples:
FYI this is still broken as of 1.192.101 despite the change log listing it as fixed.
Examples:
Hi,
i may confirm this in the latest release now. I just finished a LCD script to display oxygen pressure and want to share some interesting points.
It seems to definitely occur as soon as IMyTextSurface.ScriptBackgroundColor or IMyTextSurface.ScriptForegroundColor gets changed by the script.
Workaround: Never touch those 2 values, instead draw a 100% covering SimpleSquare with the desired color in background first.
It also seems to occur in other situations, i just got the behaviour after a server restart.
Workaround: Implement a INIT sequence, setting all your sprites for at least 1 tick to a different color (or maybe change another sprite property). Changed sprites seem to get updated properly. Don't forget to set all sprites back to normal color after initialization.
With these 2 workarounds i feel able to bypass most of all problems... not nice but functional.
Hi,
i may confirm this in the latest release now. I just finished a LCD script to display oxygen pressure and want to share some interesting points.
It seems to definitely occur as soon as IMyTextSurface.ScriptBackgroundColor or IMyTextSurface.ScriptForegroundColor gets changed by the script.
Workaround: Never touch those 2 values, instead draw a 100% covering SimpleSquare with the desired color in background first.
It also seems to occur in other situations, i just got the behaviour after a server restart.
Workaround: Implement a INIT sequence, setting all your sprites for at least 1 tick to a different color (or maybe change another sprite property). Changed sprites seem to get updated properly. Don't forget to set all sprites back to normal color after initialization.
With these 2 workarounds i feel able to bypass most of all problems... not nice but functional.
Oddly, it seems its the scripts I made (and write textures/text with sprites), that get affected. When I use that built-in "Artificial Horizon" script on an LCD display, it is always AOK on our server. Might be because that script itself is doing the 'workaround'??
I will try doing the Whiplash workaround and see if it makes my own LCD's behave better on our server. If i understand it correctly..... which I'm not 100% on, because I thought the act of getting the draw frame and drawing sprites on each Update (10 ticks in this case) was sending/making new sprites because it would remove prior sprites.
Anyhow... will try that... since it seems Keen isn't keen on fixing the problem being how many months ago it was mentioned?
Oddly, it seems its the scripts I made (and write textures/text with sprites), that get affected. When I use that built-in "Artificial Horizon" script on an LCD display, it is always AOK on our server. Might be because that script itself is doing the 'workaround'??
I will try doing the Whiplash workaround and see if it makes my own LCD's behave better on our server. If i understand it correctly..... which I'm not 100% on, because I thought the act of getting the draw frame and drawing sprites on each Update (10 ticks in this case) was sending/making new sprites because it would remove prior sprites.
Anyhow... will try that... since it seems Keen isn't keen on fixing the problem being how many months ago it was mentioned?
I'm still having this issue. I'm running a dedicated server on a LAN and connecting locally.
I'm still having this issue. I'm running a dedicated server on a LAN and connecting locally.
Hello, Engineers!
I´m happy to inform you that this issue will be fixed in upcoming game update v200.
Kind Regards
Keen Software House: QA Department
Hello, Engineers!
I´m happy to inform you that this issue will be fixed in upcoming game update v200.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!