Animated GUI bitmap controls
by Matt_Lloyd · in Game Design and Creative Issues · 02/26/2005 (4:34 pm) · 2 replies
Hi,
I am not sure how to achieve this with Torque's Gui stuff (Torque_1_3_0) and would appreciate any assistance.
In my game I need a counter that ticks down over time. I have used the clock timer resource that is in the resources section and it works fine. But I don't want to use basic text for the numbers. I have made my own imagestrip of numbers (0-9) and would like to know is there a way I can display a particular image within that image strip at any time.
I am guessing that a simple solution would be to make 10 separate image files (png with alpha) and change the bitmap that the bitmap control points to whenever I want to change the number displayed (like in starter.racing). However - does this mean that the game will have to access the hard disk each time I change the number or does Torque retain the various images in memory?
Another solution may be to have 10 (0-9) guibitmapctrl instances and I hide the appropriate ones and show the correct ones, but having 10 bitmap controls for each character/number would be quite wasteful of resources.
Basically - what methods are available for displaying a sequence of images in a bitmap gui control? Or is there a specific control for doing something like this.
I am not sure how to achieve this with Torque's Gui stuff (Torque_1_3_0) and would appreciate any assistance.
In my game I need a counter that ticks down over time. I have used the clock timer resource that is in the resources section and it works fine. But I don't want to use basic text for the numbers. I have made my own imagestrip of numbers (0-9) and would like to know is there a way I can display a particular image within that image strip at any time.
I am guessing that a simple solution would be to make 10 separate image files (png with alpha) and change the bitmap that the bitmap control points to whenever I want to change the number displayed (like in starter.racing). However - does this mean that the game will have to access the hard disk each time I change the number or does Torque retain the various images in memory?
Another solution may be to have 10 (0-9) guibitmapctrl instances and I hide the appropriate ones and show the correct ones, but having 10 bitmap controls for each character/number would be quite wasteful of resources.
Basically - what methods are available for displaying a sequence of images in a bitmap gui control? Or is there a specific control for doing something like this.
#2
02/26/2005 (8:54 pm)
Not quite what I am after. While I am talking about text here the method you suggest will only work with fonts. If I want to have an animated hud feature using images then I am not sure how to do that.
Torque 3D Owner Jacob