# Why is my text pixelated?

Within my game I have some cubes with text which render fine. In addition to the cubes I want to display some static text, e.g. the current score. The score text has the camera as parent and a copy rotation constraint on the camera.

While this concept works fine in principle, the score text is displayed very pixelated. I already increased the font size to 50 and made the text smaller by scaling it down, but it still doesn't show nicely.

The score text is about 11 Blender units away from the camera. If I move the score text further away, it displays better, but then the text interferes (collides) with the cubes.

What could I do to improve the quality of this text?

Download SSCCE .blend file. Open the SSCCE in Blender 2.70. Hover your mouse over the 3D viewport. Press P to start game engine.

• Could you upload a .blend file? – user2859 Apr 8 '14 at 8:38
• This tutorial or this one may help. – sambler Apr 8 '14 at 11:23
• @user2859: I have uploaded a .blend file now. Thank you. – Thomas Weller Apr 8 '14 at 13:00
• I posted my answer but i don´t recommend using text objects at all, since they are a hack right now. The other problems you get are no depth sorting, does not respect materials, Z buffer issues, no alignment. I recommend using this method. If anything you could use text objects to render text off-screen and combine it with the uv mapping technique. – user2859 Apr 8 '14 at 14:31

You can fix the resolution through the python API:

import bge

scene = bge.logic.getCurrentScene()
for obj in scene.objects:
if obj.name == "Text": # text object we want to fix
obj.resolution = 8.0 # resolution is normaly 1.0 / 72 dpi

• This does the trick. Is this setting not availabe in the UI, only in Python? – Thomas Weller Apr 8 '14 at 14:56
• See my comment on your question. Its a bit of a hack right now. The other method will work better I think. – user2859 Apr 8 '14 at 14:57
• Hi! Could you recommend me a good resolution for my text so it looks good for my car gauges? – Adrians Netlis Dec 26 '14 at 20:11
• @AdriansNetlis your car gauges don't need dynamic text, they can be a mesh or an image mapped to plane. – Scalia Apr 5 '15 at 16:52
• Please be aware that rendering text at 8x resolution as suggested will take up a LOT more graphic memory. (128x128 will becomes 1024x1024) It will even fail on lesser graphics cards. Use the smallest number you can stand. – Mike Pan Jul 27 '15 at 19:50