|
Featured Author:

-blendenzo-
|
|
| |
Tutorials - Blender Game Engine
Game Engine Text Made Easy
Requirements: Mariano's Blender Library script
If you don't have Blender Library yet, right-click the link above and select "Save Link As" in
Firefox or "Save Target As" in Explorer. When prompted, choose your blender scripts directory
(example: C:\Program Files\Blender Foundation\Blender2.41\.blender\scripts\). Make sure it is
saved as a Python (.py) file. Placing the Blender Library script into the scripts directory is
all that is required to install the plugin.
 |
Figure 1. Starting Blender Library
In Blender, open a Scripts window. Now select "Blender Library" from the Scripts >> Objects menu (see Figure
1).
(If you don't see "Blender Library" in the list, you'll need to update your scripts.
You can do this by selecting "Update Scripts" from the Scripts menu in the Scripts window.)
Pull down the Blender Library menu button located on the title bar (highlighted in Figure 2a).
Select "Import an item..." as shown in Figure 2b.
 |
|
 |
Figure 2. Importing a Text Object
Choose a Blender Library item to import from the Folder window (must be .tar
format). You will get a confirmation message telling you that the Object was successfully loaded.
For this tutorial I will be using Alpha Mack by
Astigmatic One Eye Foundry. More fonts are available in Downloads.
 |
Figure 3. Loading Alpha Mack
Navigate to "Objects >> GE Text >> Alpha Mack" using the pull down menus or the arrows. Click
the "Load" button (highlighted in Figure 3), then select whether to load at the origin or at
the cursor from the popup menu (Figure 4).
 |
Figure 4. Select Load Position
Important Note About Scaling or
Rotating GE Text:
If you plan to use text in the Game Engine, you certaniny will want to change the default
position, scale, and/or rotation. Be sure to modify the text object in Object Mode
to achieve correct results. Scaling or rotating in Edit Mode will alter the spacing, size
and direction of individual letters. (Of course, you may want to do this at some time. For
example: rotate -90 degrees in Edit mode, 90 degrees in Object Mode for vertical text.)
Many fonts are completely free for any use, but others are free only for non-commercial
work. A small amount are only free for personal use. Most fonts come with a license file
explaining which category they fall into. Blender Library will prompt you (see Figure 5) when
you load the object to make you aware of any licenses. Licenses can be viewed in the Text
Editor window.
 |
Figure 5. Blender Library Prompts you to read the license
 |
Figure 6. Change the value of "Text" in the Game Logic context
By default, every text object you download from blendenzo.com will have its "Text" variable
set to "www.blendenzo.com" (kinda like the credits at the beginning of a movie). You might
come across a situation where you would want to change the variable setting to display some
text which is a bit more pertinent to your game. The "Text" variable is a game logic property
of the text object. To change the variable, select the text object in a 3d View window, then
bring up the Game Logic context in the Buttons window. You will see a property named "Text"
listed. Change its value (highlighted in Figure 6) to say what you need it to say. You can
use a simple logic brick setup to change the text as the game is being played.
I hope this tutorial has helped those of you who have not been able to figure out
Blender's game engine text in the past. If you have any questions, or if you're interested
in helping build the BGE Font Library, please contact me using the "contact" button in the
main menu.
Back to the tutorials index...
|