 Good morning everybody. If I could ask everyone to please squash to the middle if you can. My name is Michael Gran. I am from Los Angeles, California, and I am here to give this rather odd talk. I don't know why they accepted it other than I know the guy who knows the guy who set this room up. And I'm here to talk about, of all things, interactive fiction and the languages behind it. So the quick agenda is going to talk a little bit about me, about the three subgenres of interactive fiction. I'm going to talk about why hypertext interactive fiction is the most important type of interactive fiction for beginner code programmers today. I'm going to introduce Twine and its scripting language Harlow. I'm going to talk about the time I tried to write an interactive fiction in Guile. And then I'm going to end with my editorializing that your introductory language is too complicated. Who am I? I neglectfully maintain a bunch of Guile packages and, of course, my most important package, which is libzmodem in case you ever need to write zmodem functionality for your BBS. And if you want to hire me, I can help you with U.S. government standards for software and hardware procurement. Who's excited about that? Procurement! Yeah! I have also done a metric shit ton of real time embedded C++ for low swap systems and GPS. Various semi-legal notices. The only thing important here is that this does not represent the views of the United States government or my employer. I'm obligated to say this. Thank you very much. So what is interactive fiction? Interactive fiction is a type of game that is text-only or text-dominant. It focuses on story and usually puzzles. It is not real time. And it describes a situation and then expects the user to make a choice or a situation. There's three subgenres. I've invented these myself. So say I. There's classic interactive fiction, which people of a certain age, my age, will remember as Zork. Use a text parser for input. It focuses largely on object puzzles. There's hypertext interactive fiction, which uses hyperlinks as input. And this tends to have stylistically more narrative flow. And there are visual novels, which all of you Hentai people will know as dating sims. They are more graphical. They typically present a picture of a character and have associated dialogue. Usually they focus on character relationships. And they also use hyperlinks or mouse interaction as input. So three quick examples so you know what I'm talking about. This is classic interactive fiction. They write a rubber mat saying welcome to Zork lives by the door. You type a short phrase, open door. It tells you that whatever you want to do can't be done because that is the experience of classic interactive fiction. And you bash your head against it for about 10 hours until finally you reach the end. Except for the one last point that you didn't get. Hypertext interactive fiction. This is something that I stole from an I.F. called cat petting simulator 2014. It gives a situation and then you choose one of the possible choices with your mouse. And then visual novels. This is the general graphical experience of visual novels. You have a background. The characters are sprites. And then the text is the dialogue that the characters are saying. And you click through that eventually saying please go out with me sensei. And then they do. That's visual novels. Okay. But what I think is most interesting about hypertext interactive fiction because it is so simple to write is that it brings in underrepresented voices. And it actually creates a lot of diversity in the game space that you don't normally see. And this is the point of this talk. So I'm going to talk very quickly about four underrepresented voices that were expressed in these four interactive fictions before I start talking about the technology behind it. As cold as the grave is a rather standard interactive fiction. It's got magic. It's got lesbians making out. This is a very common interactive fiction but not so common in games in general. And I think that is one of the beautiful things about hypertext interactive fiction because it is easy to create. It brings in these minority voices. Beneath Flows was actually a game created using funding for the Canadian First Nations Game Fund. So it is as far as I know the only game I've ever played that has something to do with First Nations Arctic Canadian culture, which again is not something that you see very often in Assassin's Creed. Depression Quest is a game that I have played and is quite personal to me. And it is a study of what it feels like to have depression. And the interesting thing about this is how it subverts the text, the form of interactive fiction in that it will show you a list of choices that you can click on, but you can only click on those choices if you are not depressed enough to make those choices. So that's a very interesting game. Also it has the unusual experience of having kicked off Gamergate, so you may have heard it through that context. And lastly, Thread is a game about what it feels like when you're a soldier with PTSD trying to walk down a road in your city. It describes really well the sense of hypervigilance that you see, that your inability to let things go. And I think this is really interesting, and so I think people should check that out. Loosen Thread Games is where that lives. So on websites like Itch.io, there are hundreds upon hundreds upon hundreds of twine games, and I just did a quick poll of the 2,000 twine games on Itch.io. 100 or 5% are tagged as LGBT, which is interesting because it means that the percentage of LGBT games on Itch.io is roughly equal to the percentage of the general population, which is not something that you have in games as a whole. There's been a lot of commentary about how Twine is an interesting first step into bringing in feminist voices, and you can read about that on websites like Feminist Frequency or the scholarly discussions of Carolyn Pettit, if you know her from GameSpot. So a digression. Has anybody ever heard of Nano-Rymo? All right, so Nano-Rymo is an event that happens in November where people promise to write 50,000 words. It's an amateur novel writing event. That is the only thing that you say. You sign up at the beginning of the month, you say, I'm going to write 50,000 words and you bash it out or you don't. I've done it for several years in a row. I have several half-finished garbage novels, which will never see the light of day. But the important thing about it is that it brings in amateur voices and amateur voices with a low barrier of entry. So when you have this wide community, the topics that you see are different than the topics that you find in fiction in general. And from my point of view, going to the Hollywood write-in in Hollywood, California, most Nano-Rymo novels are magic, romance, lesbians, and vampires. And these novels are terrible, but they are the novels that people want to write and there's no barrier to present them from writing these novels, and that's what makes it beautiful. So who makes tiny personal games? So you want to make a game. It's never going to make any money. Don't ever go into games for the money. You don't have to beg your friends to play it, but there's a certain enthalpy, a certain barrier of entry to a game, which is you have the time and energy to do hundreds of hours of free labor, you have the skill, you have the vision, and you have the dedication. And so if these meet a certain threshold, you can create a game. But these are four different barriers to entry and people who don't meet these barriers of entry, you've lost what they might be contributing to the culture. So here I have my Venn diagram. Thank you very much. You've got people with a story to tell, people with coding skills, and people with time and energy, and you need all three of those things together to create an indie game. And so when you have people with a story to tell but they don't have the coding skills, you've lost their voice. You've lost their contribution to society. And when you have people with the coding skills but they don't have the time or the energy, you've also lost their voice. You've also lost their contribution to society. So interactive fiction in the three genres has three domain-specific languages. Classic interactive fiction, you've got Inform, Adrift, and TADS. Inform, if you're interested in language design, is bonkers. I recommend you check out what Inform looks like. It's beautiful. It is an attempt to write something as close to English as possible, and it's very, very odd. Hypertext interactive fiction is almost entirely dominated by Twine, which has two scripting languages that are almost identical, Harlow and Ice Cube. I'm going to mostly be talking about Twine featuring Harlow. And visual novels are often written in Renpi. I believe that Twine and Harlow are the simplest free tool to write interactive fiction. Harlow's a scripting language that converts Harlow script down into HTML and JavaScript bundles. It's something like HTML plus PHP in that you have content interrupted by code and that each top-level page has an experience. But simple Harlow is simple for any skill level, while complicated Harlow is still complicated. Demons have a work. Let's try a demo. Okay. And how do I make this the one window? I think if I try F8. Can I drag this over? Yes, I can. All right. So this is Twine. I'm going to write a game right now. You double-click this until it finally decides to work. Hello. Thank you very much. I can't see this all. So here's my first room, my first passage. And so I've written it. These are of course hypertext links. I shut down this and it's going to say, oh, do you want to create these two new passages for these broken links? Yes. Spelling is hard. I don't really believe it in the first place. Open for me, baby. You can do it. So let's play this awesome game. I know that you are really excited to see how this works. So I want to go to Fosdame. I am going to forget my jacket. I have frozen to death. So that's it. At the slimpest level, this is what Twine is like. And at the simplest level, it's available for all levels of experience. But I'm going to talk a little bit about how it works in practice. So again, this is a simplest Harlow. It renders a hyperlink and it jumps to a module by that name. It has basic styles, emphasis, strong, italic. So far, so good. Still newbie-friendly. And then when you start trying to do things like change the color or introduce images, it all starts going off the rails. There are variables in scope. The variables are delimited by sigils. The code appears in parentheses interrupted by keywords that have colons. So this text here would let you choose a sentence based on the value of the variable size. The sigils have on the variables demonstrate scope. And it has various control structures. And this is where this introductory language starts going off the rails. It has various lambda-like structures. And I probably won't go into the details, but here this one on the bottom, it searches a global variable. It limits the contents of the global variable by a test and then uses that test to print a list. So this is what happens when you start using templating languages. This is the risk and reward of templating languages opposed to your own languages. The reward is that it lets you focus on the task and to avoid boilerplate and to simplify. But the risk is that because you think it's readable, you think you understand it. And these are very different things. As anybody who has ever seen a mysterious Ruby error message will confer. You've got the leaky abstraction problem. Your debugging experience may suffer. So templating languages often make simple things simpler but make complex things more complicated. So I once wrote an interactive fiction in Guile. I was impressed by the experience of Twine. And I thought, you know, I can make Guile just as simple and as readable as Twine. And that is, of course, not true because scheme is scheme. If you want to, as an aside, if you want to write your own reader for scheme that doesn't have parentheses, you can look at these two projects, Wisp, which they'll talk about later, and Guile Reader. But this is a code snippet from my script for interactive fiction. This is Room 17 or Experience 17. Anybody who has spent a lot of time in scheme will notice that this is a mixture of quasi-quotation and XML notation. But in terms of scheme, in terms of readability, I think this came out okay. But this is about as readable as scheme is going to get. As an aside, I wanted to talk about publishing because I think publishing is a very important part of what makes something new be friendly. And publishing my Guile game to Itch.io was not easy in any sense of the word. First of all, Itch.io is not generally a Linux shop, so I had to compile this all in Windows 32. And GTK3 is not typically a good Windows platform, so getting all of this together in a statically executed dynamic zip file was quite difficult. Okay. Minimalism. This is kind of what I'm trying to get to. Minimalism for geeks is not the same thing as minimalism for noobs. Minimalism for geeks, we all understand, easy to define, easy to explain, easy to parse, and easy to run. But minimalism for noobs is a different set of requirements. It's easy to learn, easy to understand, easy to fix, and easy to share. People in Lua already know this. They've already got this down. But everyone else, we need to take a lesson for this. Your introductory language is too complicated. The reason why I am standing here now is because of a computer that was in existence before most of you were born, the TRS-80, which you used to buy at a store called RadioShack, which is now bankrupt. And the first program that I learned was this one. Eight-year-olds me thought this was hilarious. And so what it does is it prints the word poopy over and over until you hit break. And it is because of this stupid computer and this stupid language that I am standing here today. And that is a rather profound concept when you think about the journey that I have gone from the 1970s to now. So you may recoil at basic, and any language designer will recoil at basic, but it was the start of my journey. So how should kids start on their journey today? Simplicity and sharing cannot be an afterthought. You have to be able to show people what you've done if you want people to be excited about it. Kids these days, like y'all, kids these days, they expect their games to be either browser, app, or Steam. So for free software, you're pretty much just talking about the browser. There are several websites that you publish your twine game and make sharing twine games simple. Ichio and Philomila are two good examples. I think that all of our languages need a quick strategy to share our code on the web. There's a couple of ways that you can get to that. If you can compile your language to WebAssembly, you can do something like that. You can use a GIS terminal emulator and create a service. You can use both strategies to creating a sharing website for your language. But my conclusion, tools like twine and Harlow have created a low barrier to entry, and that low barrier to entry has brought in voices that would never have occurred in games in the mainstream or in programming in the mainstream. And when that barrier to entry is low enough, the created works can represent a broad range of voices. And I hope that what you take away is that you too can work on making these barriers low and making minimalism for noobs as well. And that's my presentation. I won't go into the theology behind this, but trust me, it's a joke, it's hilarious. Thank you. Any questions? Yes? Yes. The question was about the difference between twine and JavaScript. Right. Well, programming in a general sense is really just about learning how to make logical decisions and learning how to make things flow. And you have to start developing those skills about there are trees, there are control structures. And I think twine is still an entry point into that, even if it's not going to make you a back-end guru. Next question? Yeah, the question was about packaging for EPUBs. Yeah, I think that would work, and I think that EPUBs have come a long way. I haven't spent an incredible amount of time with EPUBs, other than reading the file format and how one puts them together. But yeah, no, what makes EPUBs shareable is that there is a super logic behind it. Right, exactly. Yeah, I do like the idea behind it. I can't say that I know too much about it. All right, thank you for coming, and I'll be around. Oh, I should thank you for powering this up. I have a battery pack if we need it. You get three tries, right? Display port, or mini-display port. Off the back. That's awful tiny. You tested this this morning, and it worked fine. Do you have a different resolution? Can you do that? I don't think I can. I told you though I used something that was direct. VGA? Yeah, you're not allowed to use that. It won't go into recording. Is Linux, I presume, so we can use X render? This is NetBSD, I'm sure. That makes it a little bit harder. Let me just interrupt for a second and just attach this to you. Is there a NetBSD expert here for video resolution? Or increasing the phone size? Also, just the screen in the video description. And that should be readable from the video, but not the keyboard.