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.
#21
08/21/2009 (12:46 pm)
yeah, me too
#22
08/21/2009 (2:03 pm)
I'm really glad you have ported this to TGE...

Thanks Ryan!

Edit: This is Awesome, and extremely easy to install!
#23
08/21/2009 (4:18 pm)
Quick update. I have the basics working just need to do some fine tuning and it should be good to go. It is a little weird seeing the blood drip down the screen.
#24
08/21/2009 (4:19 pm)
cool! cant wait!
#25
08/21/2009 (5:01 pm)
tnx a lot for the port!!
#26
08/21/2009 (6:34 pm)
Just tried the TGE version, it's working great, thanks again.
#27
08/21/2009 (8:06 pm)
I am in the process of making the TGE port of the animated splash item.

#28
08/21/2009 (9:04 pm)
wow very coll Ryan...
#29
08/21/2009 (9:10 pm)
Ok, the download has been updated with the new guiSplashAnimBitmapCtrl for TGE and TGEA. Just download the file again. I have also updated the doc with the new control and example. Big thanks to deepscratch for the images.
#30
08/22/2009 (3:03 am)
ooh, that IS cool!!!
#31
08/23/2009 (5:03 am)
Torque a la Gears of War!
with this other resource you have explosion of blood!:
www.garagegames.com/community/resources/view/2884

http://www.youtube.com/watch?v=nlGgp77zmpA

¿someone have some examples of emitters of blood? ;D
#32
08/23/2009 (5:46 am)
The new dripping effect is great, really nice work. I'm going to have to mess around with this some more, now that it has animation support I can think of some other things I'll be able to use it for.

oh, and Gears of War = awesome.
#33
08/24/2009 (1:03 pm)
question:
anyone know how to get the images, static or animated, to cover the full extents of the screen?
#34
08/24/2009 (1:05 pm)
Hey!

I'm getting a whole string of compilation errors with TGEA 1.7.1. All six files have been added to the "engine/source/gui/game" directory, and "engine/gui/game" via Visual Studio. The actual installation guide does not specify any file paths, so if the following error report is not a 1.7.1 compatibiity problem, I'm assuming I've added my files to the wrong place... :-P

I should also mention that initially, I was only getting 3 or 4 errors citing that several of the cpp files in the download make use of "gfx/bitmap/gbitmap.h" includer paths which do not exist in TGEA 1.7.1. (its "gfx/gbitmap.h"). I've deleted the "bitmap" reference for each instance but now I'm getting the following...


Here is the bulk of the error report: (24 comp errors in total)


1>guiSplashMgrCtrl.cpp
1>..........enginesourceguigameguiSplashMgrCtrl.cpp(301) : error C2039: 'find_next' : is not a member of 'Vector<T>'
1> with
1> [
1> T=S32
1> ]
1>guiSplashBitmapCtrl.cpp
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(38) : error C2146: syntax error : missing ';' before identifier 'mBitmapTexture'
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(39) : error C2146: syntax error : missing ';' before identifier 'bitmapTextureSB'
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..........enginesourceguigameguiSplashBitmapCtrl.cpp(195) : error C2660: 'GFXDrawUtil::drawBitmapStretch' : function does not take 4 arguments
1>guiSplashAnimBitmapCtrl.cpp
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(242) : error C2660: 'GFXDrawUtil::drawBitmapStretch' : function does not take 4 arguments
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(308) : error C2065: 'gResourceManager' : undeclared identifier
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(308) : error C2227: left of '->openStream' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(312) : error C2227: left of '->closeStream' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(323) : error C2228: left of '.find' must have class/struct/union
1> type is 'const char *'
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(323) : error C2653: 'String' : is not a class or namespace name
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(323) : error C2065: 'NoCase' : undeclared identifier
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(324) : error C2653: 'String' : is not a class or namespace name
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(324) : error C2065: 'NPos' : undeclared identifier
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(326) : error C2228: left of '.find' must have class/struct/union
1> type is 'const char *'
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(326) : error C2653: 'String' : is not a class or namespace name
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(327) : error C2653: 'String' : is not a class or namespace name
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(330) : error C2065: 'String' : undeclared identifier
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(330) : error C2146: syntax error : missing ';' before identifier 's'
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(330) : error C2065: 's' : undeclared identifier
1>..........enginesourceguigameguiSplashAnimBitmapCtrl.cpp(330) : error C2228: left of '.substr' must have class/struct/union
1> type is 'const char *'


Anyone else had problems with TGEA 1.7.1 ?
#35
08/24/2009 (1:29 pm)
@deepscractch, you test changing the size of the control?, or the extend?

@Richard, you cant delete references, search the name or folder of the new file, then clean your solution before build.
#36
08/24/2009 (1:29 pm)
@deepscratch, I resize the control based on the size of the image. I think I will change it so you can specify image bounds or to use the window bounds.

@Richard, there were a lot of engine changes between 1.7.1 and 1.8.1. I can take a look at a port to 1.7.1 later tonight when I get home tonight. When I ported the guiAdvBarHud from 1.7 to 1.8 I discovered just how much changed. But give me some time and I will have it working for you.
#37
08/24/2009 (1:48 pm)
@Javier - Thanks for the response! What I meant, was that I'd simply changed all of the "gfx/bitmap/gbitmap.h" lines to reflect the correct 1.7.1 path of "gfx/gbitmap.h" (which seemed to work!).

@Ryan - Thanks for your help! I had a feeling that this was a 1.7.1 compatibility problem! I haven't had a chance to port my projects across to 1.8.1 yet (been putting it off!), so if you can help with this I'd appreciate it! :-)


Thanks,

Rich H.
#38
08/24/2009 (2:02 pm)
@Javier,
yes, tried both.

@Ryan, that would be great, I'm trying to get a fullscreen effect of water drops on the screen when going out of a water object
#39
08/24/2009 (3:14 pm)
Ok, new file uploaded. There is now a new property FitScreen that is you set to true will stretch the image to the screen size. I also included console methods to access from script. This has been updated for all versions. There is also a version for TGEA 1.7.1, I have not fully tested it so if you have any problems please let me know. Enjoy!
#40
08/24/2009 (3:46 pm)
Excellent, thanks! :-)