Game Development Community

dev|Pro Game Development Curriculum

T2D : Adding a splash screen

by Simon Love · 07/07/2014 (1:18 pm) · 13 comments

If you play any game made with GameMaker, you might have noticed that before the main game window launches, you get a smaller window with the game title or company logo while stuff loads. Alternatively, just look at T3D when it launches!

I've wanted this feature for a while and after leeching off of TGB for the dynamic grid, I've decided to vampirize T3D and its SplashScreen function!

This is, as usual, Windows-only.

----------------------------

How to

----------------------------
First, convert your splash screen logo to .BMP format, Windows doesn't like PNGs.

Secondly, in the win32SplashScreen.cc file, change "Glow_Notext.bmp" to the name of your file.
This assumes that the file is located in the same directory as your .exe

Finally, simply call the script function displaySplashScreen();

Note : This does not support transparent Bitmaps.

If you want the SplashScreen to show for a few seconds instead of flashing briefly, in Appcore::create, simply schedule the initializeCanvas call in... The FUTURE!!!

schedule(3000, 0, initializeCanvas, "Super Original Window Title");

----------------------------

Why isn't this a Pull request?

----------------------------

Because the system is not cross-platform (only works on Windows) and requires you to hard-code the BMP to be used in the C++ code. If anyone can figure out a way to easily convert stringtable entries into LPCWSTR, be my guest!

It could also be reworked to appear for a longer time, while assets are loading or something.

Nonetheless, those who want to add that extra bit of flair to their productions need only replicate the following commits.

here and
here

About the author

I am here to help. I've worked at every imaginable position in game development, having entered the field originally as an audio guy.


#1
07/07/2014 (4:40 pm)
I think this could be done fairly easily using regular GUI objects - or with a scene. "Go ahead, make a scene...."
#2
07/07/2014 (5:00 pm)
No the window is actually completely separate from the main opengl one.
I did a fade-in thin before, a title screen that fades in or out, all in script, super-easy.

This just can't be done with stock T2D. Unless you first create your game window a bit smaller, display your title/logo, then resize it to final game size.
#3
07/07/2014 (5:53 pm)
Oh, you're talking about that "floater." I was never a real fan of that one - I prefer the regular fader myself....
#4
07/07/2014 (6:36 pm)
floaters are what I call those shimmering things I see in front of my eyes when I spent 12 hours straight coding!

Faders are cool to set the mood but I dunno why, I always loved "floaters".
#5
07/08/2014 (6:01 am)
Nice. Speaking of T3D's splash, it does need to be more easily controlled from scripts. At the moment, for example, my monster mash game takes like 5 seconds to load all the assets and so-on, but the splash screen is only visible for half a second before the canvas is created.
#6
07/08/2014 (7:04 am)
Steve did something with it that causes it to match size with the game itself and remain in front of the canvas until the canvas is loaded and ready....
#7
07/08/2014 (7:06 am)
@Daniel : All you need to do in TorqueScript is schedule onStart(); to happen after a reasonable delay and the main window won't be created until then.

Or you could directly delay initializeCanvas();

@Richard : Then Steve is a better man than I :)
#8
07/08/2014 (7:16 am)
@Richard : If by Steve, you mean Steve Acaster, I've just looked at Airship Dragoon and nope, it uses the standard 'show splash screen briefly then switch to full screen' method. The main.cs is viewable and it does nothing different than stock T3D.
#9
07/08/2014 (12:54 pm)
Not with Airship Dragoon - something else earlier, though I'm surprised he didn't use it in AD....
#10
07/08/2014 (1:01 pm)
Hmmm how do we summon Steve again? Oh I remember!

"O, mighty Fusilier of T3D, come forth from the darkness of your bedroom and illuminate our unworthy minds with your wisdom!"


...didn't seem to work. Maybe we have to sacrifice a n00b or a Unity fanatic.
#11
07/08/2014 (1:37 pm)
Nice resource, though IMO splash screens are a terrible idea. If you have time to display a splash, maybe your game needs optimizing. ;)
#12
07/08/2014 (1:44 pm)
@James : That's a valid point of view but even if the splash screen is just there for 'decorative purposes', I like the cohesive look it gives a game.

Guess my tastes are weird :)
#13
07/08/2014 (9:36 pm)
Hell, older Torque licenses required them (some publishers do, too) - no one said you can't do other things in the background while the splash screens run. ;)