XeroVolume
Member
Version: 3.1.2
By: XeroVolume
Friday, June 11, 2010
Version Update (3.1 to 3.1.2)
- Added two lines of code to ensure the splash bitmaps are disposed of properly
*NOTE* - This update is important to ensure that image bitmaps are not lingering around during your game and wasting memory. Therefore, please ensure that you are using the most current updated version.
Thursday, June 03, 2010
Version Update (3.0 to 3.1)
- Fixed a small bug with final splash to title spacing.
- Edited one line of code which allowed me to remove the now unnecessary Battle Test method.
- ($Btest now calls Scene_Title.new which runs the default Battle Test method.)
- Added "Plug-n-Play" Edition
Version Update (3.1 to 3.1.2)
- Added two lines of code to ensure the splash bitmaps are disposed of properly
*NOTE* - This update is important to ensure that image bitmaps are not lingering around during your game and wasting memory. Therefore, please ensure that you are using the most current updated version.
Thursday, June 03, 2010
Version Update (3.0 to 3.1)
- Fixed a small bug with final splash to title spacing.
- Edited one line of code which allowed me to remove the now unnecessary Battle Test method.
- ($Btest now calls Scene_Title.new which runs the default Battle Test method.)
- Added "Plug-n-Play" Edition
Introduction
If you're looking for a simple to use and highly customizable introductory splash screen, you've found it!
A splash screen is an image that is displayed before the title screen, which is often used to introduce the company or team behind the making of the game. Here are a few examples:






You get the idea.
A splash screen adds professionalism to your game!
Features
I don't call it "Ultimate" for nothing. This thing is packed with fully customizable options - but don't worry, it is still extremely simple to use and easy to understand! Everything you could want from a splash screen can be found right here!
- Simple integration into any project!
- By default, displays two splash screens before showing the title screen.
- Easily add or remove as many splash screens as you like!
- Automatically centers undersized images. No need to ensure standard title screen size!
- Each splash screen is completely customizable.
- You decide how long each splash screen takes to fade in, display, and fade out.
- Supports Audio BGM, also fully customizable!
- Easily add or remove BGM for each splash screen separately.
- Easily set BGM fade out time for each splash screen separately.
- Supports RPG Maker XP BGM library, or easily add your own audio!
- Allow or disallow splash screen to be skipped with action button.
- Easily disable the splash screen if you need to.
- Script is fully commented and easy to understand!
New! Plug-n-Play Edition released!
Download the Demo below to see all of the features in action!
Demo
Ultimate Splash Scene 3.1.2
Ultimate Splash Scene 3.1.2 Plug-n-Play Edition
Script
Create a new class above Main called Scene_Splash (I like to put it just below Scene_Title) and paste the following code into it:
(For the Plug-n-Play Edition, please download the Demo)
Code:
#==============================================================================
# ** Scene_Splash (Ultimate Splash Scene 3.1.2)
# By: XeroVolume
# Date: Thursday, June 10, 2010
#------------------------------------------------------------------------------
# Special Thanks: Brewmeister for help with the original counter!
#------------------------------------------------------------------------------
# This class performs Splash screen processing
#==============================================================================
class Scene_Splash
#----------------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------------
def initialize
#--------------------------------------------------------------------------
# The following variables can be customized to fit your preferences
#--------------------------------------------------------------------------
# Allow splash screen during playtest? (true = allow / false = do not allow)
@playtest = true
# Allow skip to title with SPACE or C? (true = allow / false = do not allow)
@skip = true
# Set the total amount of splash screens to be displayed (Default = 2)
@amount = 2
# Set amount of frames between each splash screen (Default = 51)
@space = 51
# Set amount of frames between final splash and title (Default = 0)
@title_space = 0
#--------------------------------------------------------------------------
# Audio Options
#--------------------------------------------------------------------------
# Allow SE when skipping to title? (true = allow / false = do not allow)
@skip_se_allow = true
# Allow BGM for splash screen 1? (true = allow / false = do not allow)
@bgm1_allow = true
# Allow BGM for splash screen 2? (true = allow / false = do not allow)
@bgm2_allow = true
# Set BGM for splash screen 1 (Default = 061-Slow04)
@bgm1 = '061-Slow04'
# Set BGM for splash screen 2 (Default = 062-Slow05)
@bgm2 = '062-Slow05'
# Set SE for skip to title function (Default = 003-System03)
@skip_se = '003-System03'
# Set fade out time (in seconds) for splash screen 1 audio (Default = 2.5)
@bgm1_out = 2.5
# Set fade out time (in seconds) for splash screen 2 audio (Default = 2.5)
@bgm2_out = 2.5
#--------------------------------------------------------------------------
# Splash Screen 1 Options
#--------------------------------------------------------------------------
# Set file to be used for splash screen 1
@splash1 = '001-Splash01'
# Set amount of frames it takes for splash 1 to fade in (Default = 51)
@in_time1 = 51
# Set amount of frames that splash screen 1 stays opaque (Default = 102)
@pause_time1 = 102
# Set amount of frames it takes for splash 1 to fade out (Default = 51)
@out_time1 = 51
#--------------------------------------------------------------------------
# Splash Screen 2 Options
#--------------------------------------------------------------------------
# Set file to be used for splash screen 2
@splash2 = '002-Splash02'
# Set amount of frames it takes for splash 2 to fade in (Default = 51)
@in_time2 = 51
# Set amount of frames that splash screen 2 stays opaque (Default = 102)
@pause_time2 = 102
# Set amount of frames it takes for splash 2 to fade out (Default = 51)
@out_time2 = 51
#------------------------------------------------------------------------
# The following variables should not be adjusted
#------------------------------------------------------------------------
# Create loop counter (Must start at zero)
@counter = 0
# Set initial splash screen opacity (Must start at 0.0)
@fade = 0.0
# Calculate splash 1 fade in speed
@in_speed1 = (255.0 / @in_time1)
# Calculate splash 1 fade out speed
@out_speed1 = (255.0 / @out_time1)
# Calculate splash 2 fade in speed
@in_speed2 = (255.0 / @in_time2)
# Calculate splash 2 fade out speed
@out_speed2 = (255.0 / @out_time2)
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Check for Battle Test
if $BTEST
# Switch to Title Screen
$scene = Scene_Title.new
end
# Check for Play Test
if $DEBUG && @playtest == false
# Switch to Title Screen
$scene = Scene_Title.new
end
# Load the System database & create a new game
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# Create splash screen 1 graphic
@sprite1 = Sprite.new
@sprite1.bitmap = RPG::Cache.title(@splash1)
# Adjust sprite properties
@sprite1.ox = @sprite1.bitmap.width / 2
@sprite1.oy = @sprite1.bitmap.height / 2
# Center sprite on screen
@sprite1.x = 320
@sprite1.y = 240
# Set initial opacity
@sprite1.opacity = 0
# Create splash screen 2 graphic
@sprite2 = Sprite.new
@sprite2.bitmap = RPG::Cache.title(@splash2)
# Adjust sprite properties
@sprite2.ox = @sprite2.bitmap.width / 2
@sprite2.oy = @sprite2.bitmap.height / 2
# Center sprite on screen
@sprite2.x = 320
@sprite2.y = 240
# Set initial opacity
@sprite2.opacity = 0
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
# Update loop counter
@counter += 1
end
# Prepare for transition
Graphics.freeze
# Dispose of Splash Screen graphics
@sprite1.dispose
@sprite1.bitmap.dispose
@sprite2.dispose
@sprite2.bitmap.dispose
end
#--------------------------------------------------------------------------
# * Frame update
#--------------------------------------------------------------------------
def update
# If C button was pressed
if Input.trigger?(Input::C) && @skip == true
if @skip_se_allow == true
# Play decision SE
$game_system.se_play(RPG::AudioFile.new(@skip_se))
end
# Switch to title screen
$scene = Scene_Title.new
end
# Fade Cycle
fade_cycle
# Update Graphics
@sprite1.update
@sprite2.update
end
#--------------------------------------------------------------------------
# * Fade Cycle
#--------------------------------------------------------------------------
def fade_cycle
# Determinent (Based on amount of splash screens remaining)
case @amount
# When 2 splash screens remain
when 2
# Check for audio
if @counter == 1 && @bgm1_allow == true
$game_system.bgm_play(RPG::AudioFile.new(@bgm1))
end
# Set splash screen 1's opacity level equal to @fade variable's value
@sprite1.opacity = @fade
# Fade in
if @counter <= @in_time1
@fade += @in_speed1
end
# Pause splash screen 1
if @counter >= @in_time1 + @pause_time1
# Fade out graphics
@fade -= @out_speed1
end
# Fade out BGM
if @counter == @in_time1 + @pause_time1
Audio.bgm_fade(@bgm1_out * 1000)
end
# Space between splash screens
if @counter >= @in_time1 + @out_time1 + @pause_time1 + @space
# Update splash screen amount
@amount -= 1
# Reset loop counter
@counter = 0
# Reset opacity variable
@fade = 0
end
# When 1 splash screen remains
when 1
# Check for audio
if @counter == 1 && @bgm2_allow == true
$game_system.bgm_play(RPG::AudioFile.new(@bgm2))
end
# Set splash screen 2's opacity level equal to @fade variable's value
@sprite2.opacity = @fade
# Fade in
if @counter <= @in_time2
@fade += @in_speed2
end
# Pause splash screen 2
if @counter >= @in_time2 + @pause_time2
# Fade out graphics
@fade -= @out_speed2
end
# Fade out BGM
if @counter == @in_time2 + @pause_time2
Audio.bgm_fade(@bgm2_out * 1000)
end
# Space between splash screens
if @counter >= @in_time2 + @out_time2 + @pause_time2 + @space
# Update splash screen amount
@amount -= 1
end
# When 0 splash screens remain
when 0
# Switch to Title Screen
$scene = Scene_Title.new
end
end
end
Instructions
One of the many great things about the Ultimate Splash Scene is that it is simple to install, and can be set up in less than a few minutes. Whether you are just starting a new project, or you have a full blown game nearly ready to be released, integration couldn't be easier. Before we get started, if you haven't already done so, please download the demo to obtain a copy of the script.
The first thing you need to do is create your splash screen images. They must be named like so:
001-Splash01
002-Splash02
The images must be placed in the "Titles" folder.
Now, open your project. Once you have done so, press F11 to open the Script Editor (or click Tools > Script Editor). Now look on the left side of the Script Editor where you will see a list of classes. Scroll down to the very bottom and click on “Main”. On the right side of the Script Editor you will now see the Main method. The default lines 10 and 11 should look like this:
# Make scene object (title screen)
$scene = Scene_Title.new
(If your main method has been altered, lines 10 and 11 could look different.) Either way, find the above mentioned lines and change them to this:
# Make scene object (splash screen)
$scene = Scene_Splash.new
This tells your main method to call the splash scene first, instead of the title scene.
(Note: Editing "main" is unnecessary when using the Plug-n-Play Edition, which may not be compatible with other Plug-n-Play scripts. If you are experiencing problems with this edition, try using the latest non-Plug-n-Play version available.)
(Note: If you have a custom script (that you need in addition to the splash screens) that skips the title screen in some way, then the Ultimate Splash Scene may need to be tweaked slightly. You can PM me directly, or post a "Help with Ultimate Splash Scene" Thread in the RPG Maker XP > Script Support section. I will be more than happy to assist you.
Next you will need to open the demo, and then open the Script Editor like before. Scroll down the list of classes until you see the class labeled “Scene_Splash”, just below “Scene_Title”. Right-Click on “Scene_Splash” and select “Copy” from the drop-down menu. Now, go back to your project's Script Editor and Right-Click on the class just below “Scene_Title”. (It will most likely be “Scene_Map”.) Select “Paste” from the drop-down menu. This will insert a new class just below “Scene_Title” called “Scene_Splash”.
Congratulations! You have installed the Ultimate Splash Scene into your project! Close the Script Editor and run a playtest to see what it looks like, and to decide what you would like to customize.
For further assistance, and a detailed explanation of each customizable variable, full documentation is provided with the Demo.
001-Splash01
002-Splash02
The images must be placed in the "Titles" folder.
Now, open your project. Once you have done so, press F11 to open the Script Editor (or click Tools > Script Editor). Now look on the left side of the Script Editor where you will see a list of classes. Scroll down to the very bottom and click on “Main”. On the right side of the Script Editor you will now see the Main method. The default lines 10 and 11 should look like this:
# Make scene object (title screen)
$scene = Scene_Title.new
(If your main method has been altered, lines 10 and 11 could look different.) Either way, find the above mentioned lines and change them to this:
# Make scene object (splash screen)
$scene = Scene_Splash.new
This tells your main method to call the splash scene first, instead of the title scene.
(Note: Editing "main" is unnecessary when using the Plug-n-Play Edition, which may not be compatible with other Plug-n-Play scripts. If you are experiencing problems with this edition, try using the latest non-Plug-n-Play version available.)
(Note: If you have a custom script (that you need in addition to the splash screens) that skips the title screen in some way, then the Ultimate Splash Scene may need to be tweaked slightly. You can PM me directly, or post a "Help with Ultimate Splash Scene" Thread in the RPG Maker XP > Script Support section. I will be more than happy to assist you.
Next you will need to open the demo, and then open the Script Editor like before. Scroll down the list of classes until you see the class labeled “Scene_Splash”, just below “Scene_Title”. Right-Click on “Scene_Splash” and select “Copy” from the drop-down menu. Now, go back to your project's Script Editor and Right-Click on the class just below “Scene_Title”. (It will most likely be “Scene_Map”.) Select “Paste” from the drop-down menu. This will insert a new class just below “Scene_Title” called “Scene_Splash”.
Congratulations! You have installed the Ultimate Splash Scene into your project! Close the Script Editor and run a playtest to see what it looks like, and to decide what you would like to customize.
For further assistance, and a detailed explanation of each customizable variable, full documentation is provided with the Demo.
1. Put script above main
2. Edit main to call Scene_Splash.new instead of Scene_Title.new (unnecessary when using the Plug-n-Play Edition)
3. Put splash screen images in the "Titles" folder in the following format:
001-Splash01
002-Splash02
4. Enjoy the Ultimate Splash Scene!
2. Edit main to call Scene_Splash.new instead of Scene_Title.new (unnecessary when using the Plug-n-Play Edition)
3. Put splash screen images in the "Titles" folder in the following format:
001-Splash01
002-Splash02
4. Enjoy the Ultimate Splash Scene!
Compatibility
As far as I know, this script shouldn't interfere with any other script (other than splash screens of course :biggrin
The Plug-n-Play Edition may not be compatible with other Plug-n-Play scripts. If you are experiencing problems with this edition, try using the latest non-Plug-n-Play version available.
Credits and Thanks
Thanks to Brewmeister for the counter idea, and helping me get it to work!
Author's Notes
This script is heavily commented, as I believe scripts should be. You should be able to figure out what's going on quite easily. Feel free to revise and improve upon this script as much as you like. Let me know what you come up with!
Terms and Conditions
I would love to know if you decide to use this script in your game! Just give me a mention in your credits!