Echo flickering when drawing to the programmable block's surface

Blargmode shared this bug 5 years ago
Outdated

Effect can be seen here:

https://gfycat.com/HiddenTautIsabellinewheatear


This code can reproduce it (it's what's running in the gif):

IMyTextSurface surface;

float[] heartBeat = {1, 1.3f, 1.5f, 1.3f, 1, 1.3f, 1.5f, 1.3f, 1, 1, 1};
int heartBeatIndex = 0;

public Program()
{
	surface = Me.GetSurface(0);
	surface.ContentType = ContentType.SCRIPT;
	surface.Script = "";

	Runtime.UpdateFrequency = UpdateFrequency.Update1 | UpdateFrequency.Update10;
}

public void Main(string argument, UpdateType updateType)
{
	if ((updateType & UpdateType.Update10) != 0)
	{
		heartBeatIndex++;
		Echo("Text");
		
		using (var frame = surface.DrawFrame())
		{
			MySprite sprite = new MySprite(SpriteType.TEXTURE, "SquareSimple", color: Color.White);
			sprite.Size = Vector2.One * 50 * heartBeat[heartBeatIndex % heartBeat.Length];
			frame.Add(sprite);
		}
	}
}


If Update1 is removed, the flickering stops. But as you can see, no drawing or Echoing is happening during Update1, so that shouldn't matter.


Also, it only flickers when the content of the surface changes.

Replies (1)

photo
1

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

Leave a Comment
 
Attach a file