Cutscene
From SRB2 Wiki
A Cutscene is an assembled sequence consisting usually of pictures and text to convey an idea. They are usually used to advance plot, and are also used as, for example, the opening acknowledgements (such as having "Sega" and "Sonic Team" displayed before the menu screens of official Sonic games), and as credits.
A Cutscene is defined by a Cutscene section in an SOC. A Cutscene section contains various options that construct a cutscene, such as which pictures to use, their positioning, and the text that's displayed.
Contents |
Format
A Cutscene section in an SOC consists of the following:
- The number that the cutscene is identified as:
CUTSCENE 1 - The amount of "Scenes" there are in the cutscene:
NUMSCENES 1 - "Scene" blocks, with the amount of Scene blocks that are present equal to
NUMSCENES. For example, ifNUMSCENES 3, then there should be 3 Scene blocks. A Scene block, conversely, contains variables within itself.
The format for Cutscenes is as follows:
CUTSCENE 1
NUMSCENES 1
Scene 1
NumberOfPics =
Pic1Name =
Pic1Duration =
Pic1XCoord =
Pic1YCoord =
TextXPos =
TextYPos =
MusicSlot =
SceneText =
#
Syntax
CUTSCENE
The Cutscene number that belongs to the specific Cutscene.
- Example:
CUTSCENE 1
NUMSCENES
The number of Scenes that the Cutscene will have.
- Example:
NUMSCENES 1
Scene
The Scene number that belongs to the specific Scene. This line, conversely, starts a "Scene" block.
- Example:
SCENE 1
NumberOfPics
The number of pictures that exist in the Scene. Note that this doesn't actually mean the amount of pictures displayed at one time, as in composites. When multiple pictures are defined, what the game does is cycle through them one by one, like a slideshow. Once Pic1's duration is up, then Pic2 is displayed for its duration. When Pic2's duration is up, Pic3 is displayed, and so on.
- Example:
NumberOfPics = 1
Below this line exist individual "Picture" blocks, where for each picture exists a set of variables, described below. Each variable works for each picture that is defined; for example, the variable for Pic1's name would be "Pic1Name", Pic2's would be "Pic2Name", Pic3's would be "Pic3Name", and so on.
Pic1Name
The lumpname of the specific picture used in the Scene. The lump referenced must be in either one of two supported graphic formats: XWE calls them "GFX" and "Image". If the lump referenced is not in one of those two formats, the game will crash.
- Example:
Pic1Name = INTRO3
Pic1Hires
Defines whether the picture is of high resolution or not; "0" stands for not hi-res, and "1" stands for hi-res. Cutscene placement is based on a 320x200 screen. A high resolution picture is basically double the resolution it would otherwise be. For example, if a normal picture were to cover up the entire screen, its size would be 320x200. A hi-res version of the picture would be 640x400.
- Example:
Pic1Hires = 1
Pic1Duration
The amount of time the individual picture will stay on the screen before it's cycled to the next picture or ends the scene if there is none, measured in "tics". Remember that 35 tics = 1 second.The durations of each picture add up together to make up the length of time the scene is on the screen.
There is an exception to this rule, however. The game automatically ends a scene a few seconds after the text block is finished displaying text. If the total duration of pictures exceeds that of the time after the text block finishes, the scene will end regardless of the duration. However, if the duration is shorter than the time after the text block finishes, the scene will end with respect to the duration.
- Example:
Pic1Duration = 35
Pic1XCoord
The X, or horizontal, placement that the picture is on the screen, measured in fracunits (which are essentially pixels.)
Note that positioning is based on a 320x200 resolution base screen. If the picture's X coordinate is 10, it will be placed 10 pixels to the left of a 320x200 screen. The appropriate sizes and positions are adjusted for each larger resolution to be proportionate. 640x400, for example, is a double of 320x200, so all sizes and positions are doubled to accommodate the bigger resolution.
- Example:
Pic1XCoord = 0
Pic1YCoord
The Y, or vertical, placement that the picture is on the screen, measured in fracunits (which are essentially pixels.)
- Example:
Pic1YCoord = 0
TextXPos
The X, or horizontal, placement that the text block is on the screen, measured in fracunits (which are essentially pixels.)
- Example:
TextXPos = 8
TextYPos
The Y, or vertical, placement that the text block is on the screen, measured in fracunits (which are essentially pixels.)
- Example:
TextYPos = 48
MusicSlot
The certain music that plays when the scene is running. If this isn't defined, the music from the previous scene will continue to play. For example, if in Scene 1, MusicSlot = 1, GFZ1's music would play for Scene 2, where MusicSlot is not defined.
- Example:
MusicSlot = 1
SceneText
The words that are displayed when the scene is playing. Note that the amount of characters that can be on an individual line are limited by the 320x200 base screen. For large amounts of text, such as an entire paragraph, use line breaks at the appropriate places to simulate text wrapping. To end a block of text, start a new line, type six spaces, and then #. The six spaces don't actually make a difference, though it's common practice among SOCcers.
- Example:
SceneText = Two months had passed since Dr. Eggman
tried to take over the world using his
ring satellite.
#
Note that having a space (or anything at all) on the same line after the # sign will cause a sigsegv. A space after the # sign can be caused by copying a cutscene section from a web page such as this one. Make sure there is no single space after the # sign.
Examples
The examples of cutscene below cover typical setups. They are all accompanied with example SOC files.
To save an example SOC file, right-click on the link and, in the right-click menu, click "Save Link As..." in Firefox, or if you're using IE, "Save Target As". The SOC files can be loaded directly into SRB2 as if they were WAD files. These example SOC files will load the example cutscene as a replacement for the beginning intro cutscene in SRB2. One only needs to start SRB2 with the SOC file loaded, and they will be taken to the example cutscene.
Cutscene with Text, Single Picture
This is what most of your Scenes will look like: having a single picture with accompanying text. Most cutscenes consist of this type of Scene.
Textless Cutscene
The key to making textless cutscenes is with the positioning of the text block. TextYPos = 320; therefore, the vertical positioning of the textbox is outside of the 320x200 resolution base screen. For the SceneText, a line break, and then spaces followed by the ending # sign is used.
CUTSCENE 1
NUMSCENES 1
Scene 1
NumberOfPics = 1
Pic1Name = INTRO3
Pic1Duration = 210
Pic1XCoord = 0
Pic1YCoord = 0
TextXPos = 1
TextYPos = 320
MusicSlot = 1037
SceneText =
#
|
|
Cutscene with Text, Multiple Pictures
Using multiple pictures in a Scene is especially useful for making pseudo-animations with a little trickery. This example doesn't cover such a use, but it sufficiently demonstrates the slideshow-like properties of using multiple pictures.
Multi-Scene Cutscene
A typical cutscene will have multiple Scenes defined. This is what you might find in a cutscene section.
Full Cutscene
The link below is an SOC containing a full-length cutscene. This is a typical cutscene setup, with typical length and several procedures and tricks covered. This can be seen as a good reference for making cutscenes.
Implementation
For the cutscene to be played in the game, it must be implemented in some way. A cutscene can be implemented in one of four ways: as the intro cutscene, before starting a level, after completing a level, or as the credits cutscene.
As the Intro Cutscene
A cutscene can be implemented to replace the intro cutscene that plays when SRB2 starts. To do so, in the MAINCFG CATEGORY, set INTROTOPLAY = the desired cutscene # to play.
- Example:
MAINCFG CATEGORY INTROTOPLAY = 1
Before Starting a Level
A cutscene can be played before a certain level starts. This is an option in the level header. In the map's level header, set PRECUTSCENENUM = the desired cutscene # to play.
- Example:
LEVEL 1 PRECUTSCENENUM = 1
After Completing a Level
A cutscene can be played after a certain level has ended. This is an option in the level header. In the map's level header, set CUTSCENENUM = the desired cutscene # to play.
- Example:
LEVEL 1 CUTSCENENUM = 1
As the Credits Cutscene
A cutscene can be implemented to replace the credits cutscene that plays after the main SRB2 game is completed. To do so, in the MAINCFG CATEGORY, set CREDITSCUTSCENE = the desired cutscene # to play.
- Example:
MAINCFG CATEGORY CREDITSCUTSCENE = 1
External links
- Cutscenes - Inside the SASRB2 SOC: Exposed! - BlazeHedgehog's explanation of cutscenes and other SOC subjects





