Good habits for cut-scenes?

Started by brushfe, Mon 26/05/2025 01:41:27

Previous topic - Next topic

brushfe

Hello!

I'm planning out the introduction credits and cut-scene for my game. Before I go too far down Beginner Lane, I wondered if anyone had any guidance or tips on how to (or not to) code scenes like these?

(There will be other cut-scenes beyond these, so I'm hoping to avoid learning something useful later on and redoing everything!)

Thank you for any insight in advance!

Rik_Vargard

#1
Here's an option to create cutscenes moments in AGS using


StartCutscene(CutsceneSkipType)

/// CODE

StopCutscene ();
EndCutscene();


Manual > https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html?highlight=startcutscene&case_sensitive=0#startcutscene

CaptainD

Just a quick note - it's EndCutscene(); not StopCutscene();

Danvzare

Quote from: brushfe on Mon 26/05/2025 01:41:27Hello!

I'm planning out the introduction credits and cut-scene for my game. Before I go too far down Beginner Lane, I wondered if anyone had any guidance or tips on how to (or not to) code scenes like these?

(There will be other cut-scenes beyond these, so I'm hoping to avoid learning something useful later on and redoing everything!)

Thank you for any insight in advance!
In terms of coding, just make sure to use the StartCutscene and EndCutscene functions so players can skip them.
Other than that, there's nothing else you need to worry in the coding-realm. As long as it works, it should be fine. Just make sure everything is where you want it to be at the end of the cutscene.

In terms of "good habits", I'd recommend keeping them short. If they have to be really long, try to intersperse it with a set of dialog options every now and again to keep the player invested (I think Ron Gilbert had a rule of thumb where it was something like cutscenes couldn't go on for longer than a minute without giving some sort of gameplay, although don't quote me on that). Of course if it's an emotional scene, just let it breathe.
And always remember the golden rule. Never make into a cutscene what could instead be made into gameplay. It's more fun to do than to watch.

Snarky

In the most general sense, a cutscene is a blocking sequence during which the player doesn't have control (except that speech can often be skipped as normal). In AGS, you create cutscenes simply by using blocking walk, speech and animation commands, or Wait() while other stuff happens. The distinction between e.g. a dialog cutscene and just a normal dialog (without dialog options) is fairly subjective.

The StartCutscene() and EndCutscene() commands mark the boundaries of a skippable cutscene. Allowing players to skip a cutscene is often good design, but in some cases you may want to have a (short) unskippable cutscene.

AGS gives you a lot for free when it comes to cutscenes, but here are some things worth considering/testing.

- During cutscenes, you typically want GUIs to be disabled and (normally) hidden. Make sure that code to pop up GUIs doesn't run while blocking (e.g. in repeatedly_execute_always). Similarly, ensure that GUIs and objects that are not supposed to display (e.g. a closeup on an inventory item) are hidden when the cutscene starts.

- In a blocking sequence, avoid short non-blocking bits in the middle, where the player gets control for a brief moment. This can cause mouse cursors and GUIs to flicker, and potentially enable unwanted interactions.

- If you have a long cutscene, it can be good practice to break it up into parts that must be skipped individually, so that a single click doesn't jump past too much. Use your best storytelling judgment, but for example switching to a different room can be a good reason for a cutscene "chapter break." Slow/lengthy sequences included for atmosphere or cinematic appeal but where no information is conveyed (such as a still image slowly fading to black) should also be separately skippable. Try to be consistent so that the result of skipping is predictable.

- When you skip a cutscene, AGS still has to run all the scripts for all the game loops until it reaches the end of the scene, just without displaying each frame or waiting between each update. Functions that do at lot of heavy processing (for example one that generates sprites dynamically) and run repeatedly during the cutscene can cause the game to freeze for a while when you try to skip it, as the engine has to run that function maybe hundreds of times before it can proceed. To avoid this, use if(Game.SkippingCutscene()) to skip heavy work that isn't needed if the frame isn't going to be displayed. For example, the Speech Bubble module does not bother to actually render speech bubbles while skipping past a cutscene.

- This is more general game design advice, but don't provide critical information only in a one-time cutscene that cannot be replayed, especially if it is skippable. If someone accidentally skips it, or is momentarily distracted, or struggles with short-term memory, or comes back to your game after a longish break, you want them to be able to proceed without having to go back and replay from an earlier point. You can either make the scene replayable, or provide the information in some other way that can be accessed later (e.g. an in-game notebook, quest log, or as dialog).

brushfe

Thank you all for such great advice!

There's a ton of great points in here that would've been easily missed on the first few attempts (cursors flashing during non-blocking bits!) like And I really appreciate the gameplay points as well, regarding the length, not skipping important info, and the very considerate point about player's short-term memory abilities!

Regarding the code, it sounds like Start/EndCutscene are the foundation. Is it safe to say that each cutscene could exist as its own function, and the code within bookended by Start/EndCutscene?

Rik_Vargard

I think you can also use mouse.Visible = false/true and/or gGUIname.Visible = false/true if you want to.

Khris

Quote from: brushfe on Tue 27/05/2025 02:11:42Regarding the code, it sounds like Start/EndCutscene are the foundation. Is it safe to say that each cutscene could exist as its own function, and the code within bookended by Start/EndCutscene?
No, because you can change rooms during a cutscene, or have non-blocking events.
What happens at an engine level is that if the player skips a cutscene, AGS basically switches into lightspeed mode where the game runs really really fast, until it hits an EndCutscene() command. So it can be literally anywhere in your code, as long as you make sure it gets hit.

Crimson Wizard

I would argue that, whenever possible, a cutscene should be wrapped in its own function.
(That does not mean that all the cutscene code should be inside same function, it may be split into multiple functions, but they all called from a "central" function).

Indeed, anything occuring during a blocking action will be coded in repeatedly_execute_always, but the action itself can be controlled from the "cutscene" function.


About room changes: If your cutscene is played across multiple rooms, then use "if (Game.SkippingCutscene())" condition to skip to the final room instantly. That will save engine from doing alot of redundant work loading and unloading rooms, and also will make the skipping much faster.

That is unless you follow a previous suggestion by Snarky and want to divide cutscene into multiple parts, each in its own room.

SMF spam blocked by CleanTalk