Pixelated Text On Scaling

Hi! I’m using Resize mode within scale manager of Phaser and rescaling my scene elements from there. The main issue is with the text game objects, they get pixelated a lot.

I’m attaching a full view screenshot which looks good but when I resize the main window to half, this is what it looks like.The text gets very blurry.

I’ve tried bitmap text but it doesn’t work as well. Map section is where the problem is. So any help would be much appreciated … Thanks!

I noticed that Text objects must be on exact x,y positions (integers) to be rendered without blurryness. Potentially this is the problem here as well: The resizing puts them on a floating point position which leads to blurryness. My solution to this was to keep text objects (like tooltips) in a separate scene that never gets resized/zoomed. This way I can guarantee that text objects are always on a integer x,y position.

1 Like

How can I manage them in a separate scene? They’re created dynamically within map scene and their positions are fixed (with some offset) above the underlying images ( red and blue locked icons). Also I need to change their position according to new game size as well and I’m placing text objects inside a container at (0,0) … so what should i do?

You may want to redraw the text (i.e., change font size) rather than scale it.

Yeah I can change the font size but I don’t know which font size would be best for which game size.