Typing Text in Realtime [enter name etc.]

Hello guys and girls, here’s a very simple, Logic Bricks only resource for the newbies to the BGE on how to enter text in realtime, this can be used to write your name at the start of games etc. It is very simple but I didn’t know how to use it until Goran showed me, so here is his tutorial which explains it.

Starts at 00:50 - 02:05

And a .blend I made that uses bitmap font if you’d like to try it.
WritingInRealtime.blend

If you need any help you can ask Goran on nilunder.com or request a tutorial from him here. Or you can just leave a comment here.

Hope I helped someone. :slight_smile:

I was seeking for something like this for a while…

Just discovered Gorans channel and website today. Great Recourses indeed!
Thanks

Haha, so usefull!

I made you an example Using the latest techniques for the bge:

Thanks for the comments, I’m glad I could help, but thank Goran, too. :wink:

Supermoaaa thanks, there is already an example in the original post using bitmap text, but it can also work with other text.

work very well, but is possible using it for two , or more object (with a different text) ?

thanks

Well what do you mean? Just copy the logic to a different bitmap text object and it will work, yes. If you want to only be able to type in one place at once (one bitmap at a time if there is more than one) just use states / properties.

MarcoTT:
for you ^^

ps: if you want i can made a python exemple with blf and opengl

yes both work , thanks

But do you actually have any idea how to limit the lenght of the text? and limit of rows?

Use properties so when you exceed the number of letters, set it to a different state, so you can longer type. Here’s an example using backspacing, too. (It’s a bit buggy because of backspaces).

LetterCap.blend [PasteAll]

Thank you!

You’re very welcome, I’m glad it helped.

This gave me a lot of headaches trying to solve, but thanks to Monster, it works. :slight_smile:

In this example you type in your name in the menu, and it will display it in the next scene through Monsters S2A script. This is helpful because if you want the player to enter their name in the menu, later on in the game they can see it - e.g. their name and score after the next scene.

NameOverScenes.blend [PasteAll]

Special thanks to Monster for the help. :slight_smile:

Wow, really great Ross, thanks for share it!