Game Development Reference
In-Depth Information
15.6 TOOLS TO MAKE HUDS
Let's get set up to make our irst HUD. The buttons and framework for this will be created with the native
prims in your virtual world through the Firestorm Viewer, so there is no need for any fancy 3D modeling
packages yet. The textures for these buttons will be made in Photoshop or your preferred paint program, so
go ahead and launch that.
15.7 PROJECT: CREATING A “FAVORITE LINKS” HUD
Start your HUD building with a simple one that allows you to access your favorite websites while you are
logged in to your virtual world. You never know when you might want to post a snapshot or a cool quote,
so this HUD can come in handy if you love social media or need to read your e-mail. It is assumed for the
purposes of this exercise that you have a modicum of skills with graphics manipulation as well as 3D model-
ing and scripting. If you do not know how to manipulate images or edit them, it is recommended that you
check out some Photoshop tutorials (http://www.photoshopessentials.com/) or some for GIMP (GNU Image
Manipulation Program) (http://www.gimp.org/tutorials/). If you do not know how to create and edit prims or
how to edit and load simple scripts, please go through Chapters 6 and 14 before you do this project.
15.7.1 C reaTe and u pload y our B uTTon T exTures
For the purposes of this project, you should make three icons or select three logos from the three favorite
places you like to visit on the web. Make each one of them into a 128 × 128 pixel PNG ile. There is no need
for anything larger because the buttons on this HUD will be petite.
Upload your textures as shown in Figure 15.10 through the Avatar/Upload/Image menu and ind a
quiet place or sandbox to build your HUD. From your inventory, retrieve the Test_HUD cube you made in
Section 15.1.1 from your HUD_builder folder. If you do not have this, please go back to Section 15.1.1 and
follow the steps to make one. As you probably recall, face 4 is the side that will attach to your screen when
you “wear” this HUD. This is going to become the screen-facing side of your HUD button and where you
will put the button textures you just made.
Next, change the color of the box to “blank” and select a color for the cube that complements the color of
your icon texture, and apply that to all sides but face 4. Then select face 4 and apply your icon texture to it,
as shown in Figure 15.10.
15.7.2 m aKing The s TaCK of B uTTons and B aCK p laTe
Copy the cube two times in a stacked arrangement as shown in Figure 15.11, change their base color to
complement your other two graphics and apply your button textures to them. Add one more prim to create a
“back plate,” or large semi-transparent frame for these three stacked buttons. Now, select the 3 buttons and
then the back plate, and Link them in the Build/Edit menu. The key prim, or last one on the link chain should
be the back plate, and it will indicate that by its yellow highlight when selected in the Edit mode.
15.7.3 i nserTing The s CripTs inTo y our B uTTons
Download the LSL script called “URL Giver for HUD” as shown in Table 15.1, to your computer's desktop.
This chapter's content is available at http://www.anncudworthprojects.com/, under the Virtual World Design
Book Downloads section. Click on the script to open it in WordPad or some other text editor, and copy/paste
Search WWH ::




Custom Search