On twine data structures and an incident in 7th grade


This was part of the 2023 Single Choice Jam.

The full backdrop for all 3 games is provided here. Something I wrote 11 years ago wound up (I think) pushing me to do better once I rediscovered it.

JKUL was both the first and last game I thought up. How so? Well, I had the idea for a dialogue game immediately after reading the rules. Only one hub page, but timed text, or a conveyor belt, was legal.

Plus this was originally two games: Kid, Listen Up, and Just Try Harder, Kid. They were merged for reasons in my link above, and also because they were really similar. KLU had the timed text as an adult blabbed on. JTHK had you trying hard (well, just clicking more each time) after making a choice at the hub, and maybe the correct combo of departures from the hub would help you win. I wasn't sure. Each had an annoying adult authority figure, because that's a straw man I love beating.

I said I'd never write a game with timed text, because I hated timed text. I still do. Fortunately it's proliferated less than years ago, but I really don't enjoy reading three words and waiting five seconds and knowing the emotional reaction the author wants me to have and how it's different from the one I want to have. The words should stand on their own, and it's worse when I predict what will happen next. Get on with it, already! Yes, you've demonstrated frustration and helplessness quite well. Don't over-sell it.

Of course, I figured timed text had its place, end I never really thought I would find one for it. I found places where it was effective, and I found works that I thought would be just great without the pauses, but they were there and they slowed things down. What annoyed me so much about time text? I guess it was the feeling that the person who was telling the story could hold you captive, and maybe you were waiting for it to be over, or maybe they were nowhere near as profound as they thought they were, or they just wanted you to listen and waste more of your time than you already did. So I got the idea of having somebody like that who did have power to push you around a bit without being outright abusive.

At first, I saw the character as a sort of foghorn leghorn type, just talking more and more each time, and in fact the original version only worked so that you could wait too long, not too soon . This was going to be where you could read the whole text at first, but the text would get longer, until you couldn't possibly read through it in the time given. And then, the speaker would cascade for probably just zoning out and not reading everything.

This seemed to work pretty well, but it still needed more mustard. I had the idea for not letting somebody respond too early or too soon after I wrote the other two games, because I wanted to make it a sort of challenge, and yet I didn't want people to rush through too much.

Then I realized something -- someone as officious as that wouldn't want you to interrupt THEM. So what if I set a lower and upper time limit to respond? I also needed a way to show the player they might be clicking early. Hello, basic text twiddling! (I simply added a BOLD tag.)

I don't work as much with data structures as I should, but this seemed ideal for it. You may see the code below. It's in sugarcube. It's nothing crushingly good, but I made it so I could add text in easily, and I'm pleased with how I designed it.

<<set $blather_struct = [

  { blather: "\"Just listen up, kid! I have important life lessons. But don't <<bold_on \"interrupt\">> me, eh?\"",

    response: "Sure, I'm a good listener!",

    toolate: "\"Can't go through life ignoring people there, kid.\"",

    toosoon: "\"Kid, I told you to listen, not interrupt, there.\"",

    timing: 2

  }, /* and so forth */

Here you can just keep defining dialogue structures as much as you'd like! I also created 3 widgets. One was a speed test run, where the link got bolded after one second. The bold_on simply timed text to appear in BOLD, after which you could click. And flake_widget would simply set $too_late on the sly when sending you to the main page. I used to have Chat1, Chat2, Chat3 before using structures. There's also a too_soon variable you can see in the non-widget code. Since I learned non-dynamic HTML a long time ago, I'm still thrilled and shocked about any form of dynamic HTML coding & it feels a bit like magic.

<<widget speed_test_run>>

<<for _q = 0; _q < $blather_struct.length; _q++>>

  <<set $blather_struct[_q].timing = 1>>

<</for>>

SPEED TESTING ACTIVATED!

<</widget>>

<<widget bold_on>><<set $temp=$blather_struct[$current_blather].timing + "s">>@@#replace-on;$args[0]@@<<set $time_needed=$blather_struct[$current_blather].timing>><<timed $temp>><<replace '#replace-on'>><b><font size=+1>$args[0]</font></b><</replace>><</timed>><</widget>>

<<widget flake_widget>>

  <<silently>>

    <<set $seconds to 0>>

    <<repeat 1s>>

      <<set $seconds to $seconds + 1>>

      <<if $seconds gt $blather_struct[$current_blather].timing>>

        <<set $too_late=true>>

        <<goto "Chat1">>

        <<stop>>

      <</if>>

    <</repeat>>

  <</silently>>

<</widget>>

<<print $blather_struct[$current_blather].blather>>

<<link `$blather_struct[$current_blather].response` $next_link>><<if $seconds lt $blather_struct[$current_blather].timing>><<set $too_soon = true>><<elseif $seconds gt $blather_struct[$current_blather].timing>><<set $too_long = true>><</if>><</link>><</if>>

The technical bit, I did off and on, half sure I could wrap up quickly, half afraid I couldn't. It all came together with 2 days left. Then I decided how long I would make the game. Not very long. I didn't want too much to read, but I did want a penalty for jumping the gun, and I also wanted to make it quickly clear what to do to get through.

At the end, of course, you do everything right, but you're waved off as being a bit too perfect. Pushy people are like that.

The story that ultimately inspired the narrative, as such, was when I had gotten home from Boy Scout camp. We had just moved to the big city, and everybody in my new boy scout troop got shirts with their names on the back of them. The grocery store was close, so I stopped by and had a look at the Mad Magazine. (It was the bomb back in the day.) That's when I heard a low voice behind me saying, Andrew, Jewel Finer Foods is not a library! (And I remember thinking, wait, libraries carry MAD Magazine?!)

The person behind me was probably about 21 or so, and they were probably a bit sick of their job, and they just needed to poke someone, and I let myself out there. They saw my slight panic and said, don't worry about it. I hope it's a good memory for them, too, whatever their name was (I could have looked at their nametag. I didn't.) I know over the years I've had a lot worse of the "Oh I'm/he's just joking sort of thing." And boy scouts was sort of wack. It wasn't explicitly the activity mentioned in JLUK, which I tried to make vague on purpose, but it had its share of bad memories. I may relate them elsewhere, but let's just say some adults gave me a warped idea of what leadership was. Much like the adult in this game.

Files

executable Play in browser
Aug 19, 2023
Downloadable index.html with source 147 kB
Aug 19, 2023

Get Just Listen Up, Kid!

Leave a comment

Log in with itch.io to leave a comment.