Sunday, September 10, 2017

Cut It Out!

Part eleven in a weekly(🎬) devlog.

Standard development disclaimers apply. This is pre-pre-pre-Alpha content, everything is subject to change, features may not be present in the final version, there's a very strong chance none of this will ever be released, etc. etc.

There shouldn't be any plot spoilers in these posts, but there will be occasional discussions related to characters, locations, mechanics, and other aspects of my potential upcoming Shadowrun campaign (tentatively titled "CalFree in Chains"). You may wish to skip them if you'd like to be completely surprised.


Last week I hit a bit of a wall. I'd been banging on that Sacramento scene for what felt like ages, trying to get all the pacifist routes implemented and working properly, on top of the combat stuff I mentioned in last week's post. I finally knocked it down, though, and got to move on to a crucial scene that I've been looking forward to for quite a while. This is the first of... probably three or four significant moments in the campaign, with potentially high emotional impacts, which have been my main driving force to keep me going on this dumb project.

Over the long Labor Day weekend I spent most of the time building out the cut-scenes that occur around the climax of this mission. I got scared off of writing cut scenes after my earlier experiences with the Antumbra games: almost every time that a new update of the Shadowrun Returns engine came out, it would break one or more of my cut-scenes. If I was lucky it would just turn ugly, but more often it would actually freeze the game, breaking progress for all of my subscribers until I could carve out time to reproduce, debug, patch and update the campaign. Stressful! As a result, I dialed back on cut-scenes for Caldecott. But one big bright spot of the lack of updates for Hong Kong is that I no longer need to worry about future updates breaking things, so I'm feeling more confident now about writing them again.

They do still take quite a while, though. It takes a lot of iteration to get them down right. Even something that might seem simple, like having one character attack another in a cut-scene, ends up being pretty complex. For it to feel right, you need to initiate the attack animation, then wait a fraction of a second, then start the attack sound, wait a slightly longer fraction of a second, then show the impact on the victim. You can't really know in advance how long each of those pauses need to be, so it takes a lot of tweaking and testing to make it seem realistic.

Backing up a bit: when I say "cut scene", I mean a scripted sequence that takes place within the game engine but is not under the control of the player character. They were a staple of JRPGs in the 1990s, and I think they work quite well in isometric RPGs like Shadowrun. They are a great alternate vector for storytelling, beyond just the conversation interface: you can show movements and actions and ambient (floating) dialogue. Because they take so long to make, I don't do all that many, but I think their rareness makes them seem all the more special when they do happen.

Because this sequence is so spoilery, I can't show the actual scene, but I did want to share a sample trigger for the first part of this cut-scene. Spoilery bits redacted.


Breaking this down:
  • Like a lot of my triggers, this is initially disabled, and will be enabled during the conversation that precedes it. This makes it a bit easier to track what's happening in the debug console, and also allows me to directly invoke the script during testing.
  • The "kill" command here is used to make a character disappear ("Death Method: Vanish"). I could also warp the actor if I preferred, but it's simpler to just make them vanish. By playing the animation on them at the same time, it looks like they're teleporting out.
  • I subtly adjust the lighting. The new value is actually really close to the current one, so it'll probably have an almost subconscious effect on the player. You could also, say, turn it bright red if an alarm is going off or from dark to light if someone turns on the light.
  • Make actors passive so multiple characters can move at the same time. Set their run speed to walk so they, uh, walk, which looks better in this scene.
  • Here I disable the Shadowrunner team. This is a trade-off. Players can feel frustrated when they can't move or interact, so when possible it's better to keep them enabled. But there's a lot more that can go wrong in that case: the player might wander off and miss the cut-scene, or stand in the way of other actors and block them from hitting their marks. In order to minimize bugs in this scene, I'm locking down the player's movement for the duration.
  • Displaying text over actors looks good during cut-scenes. But all these lines should be really short. If anything is longer, go ahead and use the standard dialogue interface.
  • Next is the really important part, the pair of "Send out game event after delay" and "Wait for game event". This just pauses execution of the script for the timed amount. Pauses can be very short, as for animations; this particular one is longer to give the player time to read the dialogue, and to capture the characters' confusion.
  • Characters turn to face the person who's talking. This looks more natural, otherwise they might be staring at a wall or something odd.
  • Order actors to move. Because they're in passive mode, multiple people can be moving simultaneously. They'll still route around furniture and other obstacles.
  • End current team round is still important to make sure people actually move; even if they're in passive mode, they still can't move until their team (in this case Civilians) comes around. I think you can also use "Isolated team move" for this.
  • Et cetera, et cetera. This continues with more dialogue and movement and animations, but you get the idea.
So, that's it! It feels really good to have this scene in the game. It's always a thrilling, almost euphoric feeling to get this thing that's just been an idea trapped in my brain for months, and to see it actually realized and out in the world, where I can see it outside of myself and treat it as its own thing.

No comments:

Post a Comment