Busty Barrister - Day 53
By Angus Cheng
Happy new year to you all, hopefully Busty Barrister Barbara will sells billions of copies in 2024. I can’t believe it has been over a week since I’ve written a blog post.
✅ Hire someone to make music and SFX
I placed a job ad on Upwork. A lot of people applied. I hired three of them for paid trials. They should all be done by Friday this week. I’ll share their work here.
✅ Enter data for level one
// Line 1
add_label(data, "LINE_1");
add_show_text(data, JARED, GREEN, LEFT, "It was a beautiful clear day, I was admiring the view.", TYPE_FAST);
add_testimony_point(data, ITEM_TYPE_NONE, NULL, "EVIDENCE_FAIL", "LINE_1_PRESS");
add_wait_for_user(data);
This is what I spent most of my time doing. As I did it, I noticed a lot of inefficiencies. I had to stop myself from writing helper functions. I said to myself “just type it all in, and once you’re done it’ll be more obvious what helper functions are needed.”
Remove add_character
add_character(data, CHARACTER_JARED);
add_character(data, CHARACTER_SUNDEEP);
add_character(data, CHARACTER_BARBARA);
add_character(data, CHARACTER_JUDGE_KAREN);
add_character(data, CHARACTER_NELSON);
At the start of a script, you must define what characters will appear. Later you can change characters using the add_set_character(data, CHARACTER_BARBARA)
function. If you call add_set_character() with a character type that hasn’t been ‘registered’ at the start. The game crashes.
I reckon the add_character() call isn’t needed at all. add_character() loads all the animation frames for a given CharacterType. Instead the game could analyze the script, figure out what CharacterTypes and AnimationTypes appear and load the frames for those Animations. Doing this is a little bit more complicated, but elimimates a class of script errors and means less loading happens.
Create a SET_SCENE event
add_set_character(data, CHARACTER_BARBARA);
add_set_background(data, "resources/backgrounds/defence.png");
add_set_foreground(data, "resources/foregrounds/defence.png");
add_show_text(data, BARBARA, RAYWHITE, LEFT, "What was the dispute about?", TYPE_FAST);
add_wait_for_user(data);
Set the character, set the foreground, set the background, show some text and wait for a user’s input. This comes up a lot. A character will typically appear with the same background and foreground repeatedly in a scene. So… I’m thinking register the scene at the start, and then have a call to change scenes.
// At the start
register_scene(
data,
CHARACTER_BARBARA,
"resources/backgrounds/defence.png",
"resources/foregrounds/defence.png"
);
// Later on
add_set_scene(data, CHARACTER_BARBARA);
add_show_text(data, BARBARA, RAYWHITE, LEFT, "What was the dispute about?", TYPE_FAST);
add_wait_for_user(data);
That’ll cut out some text. Perhaps the last two events can be merged together too.
add_set_scene(data, CHARACTER_BARBARA);
add_text_and_wait(data, BARBARA, "What was the dispute about?");
Where add_text_and_wait() adds a TextEvent and a WaitForUserEvent. I think that’s a lot nicer.
Create a TESTIMONIAL_FADE_OUT event
When a witness is “pressed”, usually a conversation happens and then they go back to their testimony. A fade out happens when returning.
add_fade_out(data, 0.5);
add_delay(data, 1);
add_set_character(data, CHARACTER_JARED);
add_set_black_rect(data, false);
add_jump_to_label(data, "LINE_3");
This can be replaced with this helper function.
add_testimony_fade_out(data, CHARACTER_JARED, "LINE3");
That’ll knock out five lines of text.
Conditional Events
Korshal’s testimony changes when you “press” him. See 1A, 1B and 1C in the image above. To implement this I plan to add in a SET_INTEGER event and a JUMP_IF_INTEGER_EQUALS event.
In the first press block I’ll add in a set_integer(data, “PRESS_COUNT”, 1).
In the second press block I’ll add in a set_integer(data, “PRESS_COUNT”, 2).
Then there’ll be two if statements figuring out which testimony line to deliver.
add_jump_if_int_equals(data, "PRESS_COUNT", 0, "LINE_1A");
add_jump_if_int_equals(data, "PRESS_COUNT", 1, "LINE_1B");
add_jump_if_int_equals(data, "PRESS_COUNT", 2, "LINE_1C");
That looks reasonable.
Google Drive vs korshal_testimony_1.c
When I write the story, I do it on Google Drive. Then I input it into a C file. While I work on the game, I edit the text for various reasons. I often forget to edit the Google Drive document. This can be a problem because I’m going to hire voice actors very soon. I don’t want to send them lines from a stale Google Drive document.
My plan is to write some code that’ll output a plain text script. Then I can use the C files in my game as the ‘source of truth’.
add_text_and_wait(data, BARBARA, "What was the dispute about?");
add_text_and_wait(data, KORSHAL, "I don't know");
add_text_and_wait(data, BARBARA, "Why don't you know?");
add_text_and_wait(data, KORSHAL, "I don't know why I don't know.");
// Barbara: What was the dispute about?
// Korshal: I don't know
// Barbara: Why don't you know?
// Korshal: I don't know why I don't know.
I’ll give this a go with the voice actors I’m about to hire. Hopefully it works.
High Level Tasks
[x] Hire a background artist
[x] Hire a character artist
[x] Finish writing level one
[x] Specify background art
[x] Specify character art
[x] Code links between scenes
[x] Code press testimony function
[x] Code present evidence function
[x] Create a cost document
[x] Enter data for level one
[x] Hire someone to make music and sfx
[ ] Hire character animators
[ ] Hire voice actors
[ ] Hire someone to make evidence/profile icons
[ ] Spec out crime storyboard images
[ ] Hire someone to make crime storyboard images
[ ] Cut up voice acting
[ ] Put voice acting into game