Hello everyone.
I decided to make the text in the game using the old technique - and it does not work.
Here is an example, can anyone tell me please what is wrong in it - text_TEST01.blend (510 KB)
Thank you for attention.
Hello everyone.
I decided to make the text in the game using the old technique - and it does not work.
Here is an example, can anyone tell me please what is wrong in it - text_TEST01.blend (510 KB)
Thank you for attention.
+1
Had/have the same problem, could not get it to work anymore.
+1 as in another user with the same problem.
I know that UPbge has removed this feature, but never read/heard that BGE has removed it.
If it is a bug then yup, we should fill in a report, but lets hear from others first.
def set_text_resolution(cont):
own = cont.owner
scene = own.scene
if not own.get('text_objects', False):
own['text_objects'] = [obj for obj in scene.objects if 'Text' in obj]
for obj in own['text_objects']:
obj.resolution = 5
import bge
cont = bge.logic.getCurrentController()
own = cont.owner
own.text = 'blender'
own.color = (0.0, 0.0, 0.5, 1.0)
own.size = 0.5
own.resolution = 10
Here is such a simple code for a text object …
Here is such a simple code for a text object …
Yes that is simple, and just for 1 object.
My example sets every object with ‘Text’ property to the right resolution. At start it grabs all the text objects and places it in a property, then we loop trough the property to set the text resolution, you only have to run this once at start and/or whenever you need to update the resolution.
this function is for text, not for a plane
- what script, what to do?
yes indeed, it is for normal text objects, i thought you asked for this? (i mentioned normal text objects in post #4)
i know that’s why i want it as well. i have been looking and guess what? It still works in blender, so maybe it’s the image type?
try .jpg image else try .png.
Anyway i found this tutorial:
It has a working example at the bottom, tested and works (put engine on game engine instead of render)
Not sure I understand correctly . . but, try targa for the old stlye of TEXT, IE Arial.tga. If you want color or a gradient, I always used photoshop to create a color image 32 x 32 tga, and used “multiply”, (instead of mix) along with the arial.tga, or whatever. sorry If I misunderstood.
P.S. the old style text was unstable for me in the newer builds, and caused a lot of crashes.
EDITED: I said overlay, I meant Multiply, sorry.
Yeah I like the “new technology”. I’m playing around with scripts to change the color, and stuff. Something “new” for me to play with.
i had problem with this as well so i cooked up my own solution, it has a few drawbacks like not working well if the textspawner is rotated.
here is a blend if you want to check it out.
http://15b.dk/blendfiles/texture-font1.blend
Pretty cool. So you can use a PNG for the font sheet, I did not know that, I thought it had to be TGA. Can you use a texture so it isn’t a solid color. With the old method, i could use texture so the text wasn’t a solid color. (unstable, and won’t work in UPBGE 2.78 or BF 2.78 or newer)
Like this, open in 2.76b or UPBGE 2.77 to get the dynamic text to work. change the message to a keyboard. http://pasteall.org/blend/index.php?id=49057