Article - Cut Scenes: A Tutorial
Author | Topic: Article - Cut Scenes: A Tutorial |
---|---|
Off With Their Heads
Member # 4045
|
written Saturday, June 5 2004 22:36
Profile
Homepage
Article - Cutscenes: A Tutorial by Kelandon An enhanced (and much more attractive) version of this article is available at my web page: http://my.sanbrunocable.com/tomwatts/public_html/home.html BoA offers a wonderful set of calls that have no parallel in the previous Blades system: the cut scene calls. The days of Frame Animation are over! (If you don't know what I'm talking about, be glad.) In this article, I will give examples of some ways these calls (and other calls that can be useful in cut scenes) can be combined to create cool effects. I also list some of the current scenarios that have cut scenes and where you can find their code at the end of this article. The enhanced version contains many more useful lists beside this. MOVEMENT Making characters move is one of the most basic uses of the cut scene calls. The relocate_character call does this. The most basic movement set looks like this: That is a character moving north. The pause(5) call is there so that the character moves at a reasonable speed. One thing that complicates movement is that a character turning looks very strange if that character doesn't face the right direction. Thus, a character going around a corner looks like this: That is a character moving north and then moving west. Moving the party is different, though; while you can relocate each one of the characters individually and then call force_instant_terrain_redraw, there is a better way: the call march_party. This is the party moving north: One advantage of march_party is that you don't need to use the call set_character_facing. It adjusts this automatically. However, most of the time, you will want the center of view to follow the party. To do that, you need to add the call force_view_center. Let's put this all together for a fun use: the party following a character. TEXT BUBBLES A typical text bubble sequence looks like this: I love text bubbles, because it's easy to skim over dialog boxes and miss things, but the player will almost certainly read every word of a text bubble. A few notes: 1. The first line of the second set of calls, text_bubble_on_char(6,""); , removes the first text bubble from the character. Without this, the second text bubble will not appear. 2. The pause amount is variable. If your bubble is short ("Yes!" or "No!" or something of that nature), you might reduce it to 15. If your bubble is long or weighty, you can increase this to as much as 25 or possibly even 30. For most uses, though, 20 is good. I have done one slightly complicated thing with text bubbles. That is to use them on a moving character. Thus, to combine with a topic from above, here is some actual code from my scenario: The key here is that each step pauses for 5, so the bubbles show up for 15 each. At this point in the story, the characters are rushing along, so the quick speech (pauses for 15 only) increases the sense of urgency. For a more leisurely stroll, pauses of 8 between each step would convey a slower, more relaxed pace, both in the walking and in the conversation. Drakefyre pointed out another good trick for text bubbles, which is that you can put them on invisible characters. That can simulate the effect in the beginning of A3 of having text appear at the top of the screen as part of the narrative. You could in theory use invisible characters to extend your test bubbles further to the left and right, and even add new lines, although I haven't done this personally, and I imagine that it would take a lot of experimentation to get everything placed properly. ON SETTING THINGS UP VS. MAKING THEM ACTUALLY HAPPEN Most of the calls you will use for cut scenes actually do nothing. The call force_view_center does nothing by itself, for example. The three (and a half) key calls are force_instant_terrain_redraw, run_dialog, and run_animation (with run_animation_sound, which is basically the same thing). All calls, with a few exceptions noted below, require at least one of these calls before they have any effect. The call force_instant_terrain_redraw makes all changes in appearance and location happen, like those caused by set_character_facing and text_bubble_on_char. The calls run_animation and run_animation_sound redraw the terrain and also make all special effects (booms, effects, zaps, and sparkles) run on the screen. The call run_dialog makes the dialog set up by dialog calls actually show up on the screen. The Blades Appendices have a pretty good tutorial on how dialogs work, so I won't repeat that here. Instead, let's move on to an interesting application of all of the above, combined with animations and some new ideas. COMBAT: SETUP One of the most fun things to do with cut scenes is to show a battle scene. This is by far the most difficult thing to do. The first basic step is to put all the NPCs into combat poses. In large battles, I do that with a While call, which looks like this: This sets every creature from 32 to 64 inclusive to look as though it is in combat. Obviously if your creatures range from 16 to 36, you'll put different numbers in those positions. The play_sound call is optional; it plays the sound that BoA plays when the party goes into combat mode. If the battle is already going on and you want to set the creatures into combat mode before you set the view on the battle, then remove the sound. Otherwise, it's probably best to keep it in. COMBAT: MELEE ATTACKS AND SPELLS Now these creatures have to attack each other. I do a simple melee attack like this: The sound you need for the attack may vary. Creatures can also cast spells in battle. This can work in a variety of ways, but I like to use straight or jagged zaps for a strong visual effect. I do that like this: This form of spellcasting is work-intensive, because it requires that you know the creature number AND exact coordinates of each spell victim. In a battle with lots of movement, this can be difficult. I draw out what the battle looks like every few turns on a sheet of graph paper in order to keep track. Unfortunately, as of v1.1, there is no way to have characters simulate firing missiles in cut scenes. BoA lacks a missile animation call. COMBAT: DEATH Finally, after all this damage, someone has to die. This is the easiest part. It looks like this: Occasionally you will just want a character to vanish. That looks like this: The different between kill_char and erase_char is that kill_char plays the death animation and erase_char does not. (Note that neither of these calls requires force_instant_terrain_redraw or run_animation; they happen as soon as they are called.) Another use for erase_char: a creature teleporting away. That looks like this: COMBAT: PLACING MONSTERS One of the trickiest parts of combat involves putting creatures in places where they weren't originally. This can be done for two main reasons: to simulate summoning or to use characters that aren't actually in the town when the party comes through. Either way, what makes this difficult is knowing the creatures' numbers. First, summoning a creature looks like this: Before the creature will appear, you need to redraw the terrain. Generally you will want to do this anyway, because for virtually every creature you place, you will want to set it facing a particular direction. This call requires you to know the creatures' numbers. For placed creatures (anything placed by place_monster), I usually know their numbers just by counting. The first one I place is number 86; the second one is 87, and so on. However, if there are other summoned monsters in the same town that may or may not have been summoned yet, this can get tricky. At the beginning of your cut scene, you may want to run this bit of code: The final value of i will tell you the highest consecutive number of summoned creatures, so the creature number of your next summoned creature will be i + 1. What makes battles complicated is that you can have placed creatures that you want to move around, to say things in text bubbles, and to attack. Therefore you have to have a good grasp of all of the topics above. All I can really say to help is that good notes are critical for large, complex battle scenes. Keeping all this information in your head is almost impossible. A FINAL WORD ON CUT SCENES A word of warning: too many cut scenes or ill-placed ones will disrupt the flow of a scenario. There are powerful, but they should be used sparingly. They are also long, containing more lines of code than just about anything else. Even short cut scenes, such as the one that Jeff has in VoDT (t1Sweetgrove.txt, state 27, if you want to take a look) have a lot of code. You can just copy and paste most of the calls and change one or two of the parameters, though, so they are not nearly as hard as their size might indicate. They also look really cool, and they can add drama to your scenario. Whenever I have a long history to tell, rather than giving enormous chunks of text that can be tedious to read, I use cut scenes to SHOW the player what happened. They are attention-grabbers. So keep coding, and eventually you'll have a great cut scene! REFERENCES: CUT SCENES IN SCENARIOS: Valley of Dying Things, t1Sweetgrove.txt, state 27 Valley of Dying Things, t10Major Wast.txt, state 26 (short) A Small Rebellion, t6Zaskiva, state 27 A Small Rebellion, t17Stalker s .txt, state 47 A Small Rebellion, t20Jaen s Hea.txt, state 45 (short) Roses of Reckoning, t0Ashton.txt, state 18 Roses of Reckoning, t2Cemetary.txt, state 10 Roses of Reckoning, t4Manor.txt, state 23 Babysitting, t1valnight.txt, state INIT_STATE (short) Babysitting, t3lair.txt, state 17 [ Monday, June 28, 2004 14:14: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Triad Mage
Member # 7
|
written Sunday, June 6 2004 01:15
Profile
Homepage
There are far more cutscenes than that in BoA scenarios - definitely another one in RoR. About making text without a character: Use an invisible stationary character. For more text on the same line, put the second character directly SE a few spaces in the editor. For more text on the next line, experiment and place the character appropriately in the SE region. -------------------- "At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander ==== Drakefyre's Demesne - Happy Happy Joy Joy Encyclopedia Ermariana - Trapped in the Closet ==== You can take my Mac when you pry my cold, dead fingers off the mouse! Posts: 9436 | Registered: Wednesday, September 19 2001 07:00 |
Infiltrator
Member # 154
|
written Sunday, June 6 2004 02:20
Profile
You missed the crystal in Babysitting. However... a truly excellent article. Congrats! -------------------- Apparently still annoying. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Apprentice
Member # 4432
|
written Sunday, June 6 2004 07:27
Profile
I agree--an excellent article. I'd like to (humbly) add one thing, though: be extremely judicious. Cutscenes can be great at the beginning of a sequence (e.g., to give a history) or at a natural break in the scenario (like a chapter break, or right after the climactic battle), but too many, too-long or ill-timed cutscenes can disrupt the flow of the story. -------------------- He's the man Whose name you'd love to touch, But you musn't touuuuuuch... Posts: 19 | Registered: Thursday, May 27 2004 07:00 |
Off With Their Heads
Member # 4045
|
written Sunday, June 6 2004 07:43
Profile
Homepage
I should've put something in at the end that said, "This is a really incomplete list and if other people can remember others and name them, I'd be grateful." I'll add in the one from Babysitting. I don't remember others, so if people can remember what circumstances under which they occur, mentioning that would be helpful. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
BoE Posse
Member # 112
|
written Sunday, June 6 2004 15:14
Profile
It doesn't look that much simpler than Frame Animation. But at least you don't need to exploit bugs to use it. :P -------------------- Rate my scenarios! Areni Revenge To Live in Fear Deadly Goblins Ugantan Nightmare Isle of Boredom Posts: 1423 | Registered: Sunday, October 7 2001 07:00 |
Warrior
Member # 250
|
written Sunday, June 6 2004 16:16
Profile
From the looks of it you basicly are doing it frame by frame but at least this is a supported feature. Posts: 61 | Registered: Saturday, November 3 2001 08:00 |