It looks like you're using an ad blocker! I really need the income to keep this site running.
If you enjoy BlenderNation and you think it’s a valuable resource to the Blender community, please take a moment to read how you can support BlenderNation.

Game engine: FPS Mouselook script and realtime text


Check out this new CG Masters tutorial on using a mouselook script in the BGE for FPS controls. Plus learn how to add real text in the game engine (not bitmap fonts), use Python to word wrap long strings into multiple lines, change the font resolution, and learn how to change the text in game.

Did you know that Blender’s game engine has support for real font? If we catch you still using bitmap fonts you’ll be put in stocks in the town square and have tomatoes thrown at you. This tutorial was originally just going to be a simple one on creating realtime text, but in putting together a quick demo level for it I also created a mouselook script I would like to offer everyone. For those of you unfamiliar with the term mouselook, it refers to using mouse movement to rotate the camera and look around the scene. This is typical of first person shooter type games. I should note right off the bat that you don’t need to know anything about python to do this tutorial or to use any of the scripts involved.

After we work with the mouselook script we’ll get into adding realtime text. Here we’ll deal with adding text, changing the font resolution, changing the text value in a game, and formatting the text. Formatting will include basic string operations but most notably we’ll learn how to word wrap text. Word wrapping refers to splitting long lines of text into separate lines based on line length, something that was difficult with bitmap fonts but is really simple now that real font is supported. Below is a screenshot of the scene we’ll be working with towards the end of the tutorial.


  1. FTP with mouselook. Yes! Now all we need is a VR mode and file management will be more fun than ever! ;)

  2. Craig Richardson on

    +1 on a content management system for blender, because not only blender but blenders hame engine will also benefit from this and will possibly coax other developers into using blender including blenders game engine more often.

Leave A Reply

To add a profile picture to your message, register your email address with To protect your email address, create an account on BlenderNation and log in when posting a message.