Game Development Community

dev|Pro Game Development Curriculum

Splash Screen Manager control - guiSplashMgrCtrl

by Ryan Mick · 08/19/2009 (3:48 pm) · 90 comments

What is it?
The guiSplashMgrCtrl is a GUI control for creating multiple splashes in TGE/TGEA/T3D. The guiSplashMgrCtrl control uses child controls that inherit from a base guiSplashItemCtrl which encompasses most of the base functionality for showing a splash item. Included in this is the guiSplashBitmapCtrl which fades a bitmap in and out over defined times.

What it does
By extending the guiSplashItemCtrl and creating the guiSplashBitmapCtrl you will be able to use this to present your users with sequential or randomized splash items when your game loads or by utilizing it in playgui you can create effects like count downs or blood splatters. Splash items can be randomly shown with a simple console call.

Extendable
Creating your own splash items is easy. All you have to do is make sure you inherit from guiSplashItemCtrl. You will then want to override the following methods for your needs:
onRenderDesignTime
onRenderNormal
calcNewBounds

Look at the guiSplashBitmapCtrl (included in the zip) for an example of how to create your own controls.

Download

In the video below you can see the Splash Manager in action in 2 scenarios. The first is a an intro splash showing 3 splash items ( I used the same image for all 3). The next section is to create blood splatter effects over the playGui when ever the player takes damage. When the player takes damage a random splash item is shown (out of 5 profiled) and then it slowly fades away. The fade in and out times are configurable to your needs.



Now to work on migrating all my GUI controls to T3D.
#61
03/19/2010 (8:36 am)
Doh, why didn't anyone tell me about the messed up include! And the bigger question is why did it still compile for me? In T3D I have started to use source folder in my projects for stuff like this. Makes it easier to move stuff along during engine upgrades as I don't need to edit the engine code it's self (most of the time anyway). Just install new engine copy from old project source folder to new one and regenerate your project with the tool box (Clean-up button). You will then see the files under the source folder in your IDE. Including the folder structure. Very handy.
#62
03/19/2010 (8:42 am)
It should be similar to what ever is used in guiBitmapCtrl, for the version of T3D you are using. I unfortunetly don't have a copy of 1.0.1 handy but I don't have any problems with it in 1.1 Alpha.
#63
03/19/2010 (8:43 am)
I just found the issue with the include right before I posted it. I also think that it compiled fine for you since it just ignores the second / in the include. In fact, it compiled fine for me without me fixing that part. I just wanted to make sure everything looked right.
I have yet to switch over to the source folder. Been trying to comprehend the changes behind that, as in, do I copy the actual changed code into this location and then remove/re-add it to my project, or just add it there and it will override the defaults in the engine?
#64
03/19/2010 (8:47 am)
Yeah, I mirrored one I saw in guiProgressBitmapCtrl and that seemed to do the trick. This is definitely a nice resource, although I need some more animated blood and some more water :)
#65
03/19/2010 (8:48 am)
I have not tried to see if I can override an existing file yet. It would be great if it worked that way but I have my doubts. I might have to try it to see if it compiles.
#66
03/19/2010 (9:52 am)
Ok, just did some quick testing. I copied over the guiBitmapButtonCtrl files to the source folder. Made a minor change to the file, and compiled it with out a problem. Ran the exe and my changes were not there. Excluded the original from the project and compiled. My changes were now there. So you can change functionality without permanently changing your code base for other projects.

When T3D goes full 1.1 I'm going to add the Theora support to this, so you can add cut scenes.
#67
03/25/2010 (3:14 am)
terrible work!
#68
03/25/2010 (5:02 am)
Terrible work for something that functions as it should and looks good? I have used this in several projects so far and it has worked and added a neat function to each project. It works well and I would consider this to be very good work.
#69
03/25/2010 (7:19 am)
NOt sure how to reply to that. Especially since it is coming from someone that doesn't even own a Torque license. Maybe I should just stop making gui controls.....Nah!

robotech_er can just get stuffed.
#70
04/17/2010 (7:34 am)
great ctrl ryan!!
#71
08/30/2010 (8:37 pm)
Doesn't compile in 1.1B2.. lots of changes.
#72
08/30/2010 (10:33 pm)
I haven't tested it with 1.1B2 yet but I figured there would be some issues. When I get a chance I will look into it. If its just some minor tweaking I will post an update, but if it takes a bit more work I may just wait until 1.1 final. Its a pain porting all of my controls for each beta and I want to start on some new ones.
#73
09/07/2010 (2:59 am)
Ok, just uploaded a new zip file with the changes needed for 1.1B2.
#74
10/06/2010 (6:14 am)
Thx to port T3D 1.1B2 Ryan :)

it is nice work also in 1.1B3
#75
10/06/2010 (1:59 pm)
i found little tiny bug :)

void guiSplashMgrCtrl::onSplashItemDone()
{
...
...
         if(itemCount > 1){

}

void guiSplashMgrCtrl::onSplashItemDone()
{
...
...
         if(itemCount >= 1){   // To change

}

if this code do not change.

One splashImageObject is looping
#76
10/06/2010 (2:28 pm)
Thanks Enel, I can't believe I didn't catch that in my testing. I will update the download soon. I am in the process of updating the T3D to using the new callback processes and adding a new splash item. In the next release will include a guiSplashTheoraCtrl. I just need to finish updating everything and then update the docs.
#77
11/25/2010 (12:43 am)
I just uploaded an update that now includes a theora splash item for T3D 1.1B2(should work in B3).
#78
12/10/2010 (1:50 pm)
Just thought I'd leave a comment telling you how awesome this resource is if you don't mind :D.
#79
12/10/2010 (2:23 pm)
Thanks Marcus. Hopefully after the holidays I can start on my next control the guiGridViewCtrl. Hopefully by the time I finish that the fate of TP will be decided.
#80
01/22/2011 (7:06 am)
Thanks for the update!