Game Development Community

Glow

by baylor wetzel · in Torque Game Builder · 07/06/2006 (10:52 am) · 3 replies

In many games, when you click on an item or wave a mouse over it the item glows, showing you which item or agent you have selected

How would one do that in TGB? Is there a Glow function or somesuch the way there is in 3D engines? Or would you create a separate animation that had the glow drawn in? Or is there some other method

#1
07/06/2006 (11:20 am)
Create your "item" as a sprite. In Photoshop, create a mask of the sprite, do your funky effects, and then save it. When the mouse is over or selecting the "item", adjust the frame accordingly. For such states, a regular "not hovering", a "hovering", and a "selected" state would be nice. Each one could be color-coded in Photoshop and the appropriate frame selected in TGB.
#2
07/06/2006 (11:49 am)
TGB also has alpha blending, which would allow you to make it look like the object was slightly green, or red, or radioactive blue. Combine that with particle effects and you can get some very very nice looking highlight/selection effects. Very simple.
#3
07/07/2006 (12:34 pm)
You make the glow an animation for each object and loop that animation when its selected.

-or-

You could make one particle effect for any selected item and programatically spawn it behind your items when they should be highlighted.

These are just two ways, there are others. These are just the two best ways to do it IMHO - the particle effect being the easiest, and the animation being more time consuming but more effective if your items vary drastically in size and shape.