About This E-Book
EPUB is an open, industry-standard format for e-books. However, support for EPUB and its many features varies across reading devices and applications. Use your device or app settings to customize the presentation to your liking. Settings that you can customize often include font, font size, single or double column, landscape or portrait mode, and figures that you can click or tap to enlarge. For additional information about the settings and features on your reading device or app, visit the device manufacturers Web site.
Many titles include programming code or configuration examples. To optimize the presentation of these elements, view the e-book in single-column, landscape mode and adjust the font size to the smallest setting. In addition to presenting code and configurations in the reflowable text format, we have included images of the code that mimic the presentation found in the print book; therefore, where the reflowable format may compromise the presentation of the code listing, you will see a Click here to view code image link. Click the link to view the print-fidelity code image. To return to the previous page viewed, click the Back button on your device or app.
Writing Interactive Fiction with Twine
Melissa Ford
800 East 96th Street,
Indianapolis, Indiana 46240 USA
Writing Interactive Fiction with Twine
Copyright 2016 by Melissa Ford
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms, and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-0-7897-5664-0
ISBN-10: 0-7897-5664-1
Library of Congress Control Number: 2015956273
First Printing: May 2016
Editor-in-Chief
Greg Wiegand
Acquisitions Editor
Rick Kughen
Development Editor
Todd Brakke
Managing Editor
Sandra Schroeder
Project Editors
Tonya Simpson
Seth Kerney
Copy Editor
Kitty Wilson
Indexer
Works Publishing
Proofreader
The Wordsmithery LLC
Technical Editor
Chris Klimas
Editorial Assistant
Cindy Teeters
Cover Designers
Mark Shirar
Chuti Prasertsith
Compositor
Bronkella Publishing
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Que Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book.
Special Sales
For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at or (800) 382-3419.
For government sales inquiries, please contact .
For questions about sales outside the U.S., please contact .
Foreword
Some people set out to change the world when they build something new. I didnt. I built the first versions of what would become Twine with an audience of one in mind: myself. I had experimented with writing traditional interactive fiction (IF), the kind exemplified by games like Zork, that ask the reader to explore a world by typing commands. I wanted to try experimenting with IF in a different way, to create something that ran lighter on puzzle solving and heavier on storytelling.
The best reference point I had was an immensely popular series of books I had devoured when I was in elementary school, Choose Your Own Adventure (CYOA). Though many of the stories they told were haphazard and madcap, there was something inescapably intriguing to me about stories that have no fixed plot, whose content is changed by the process of reading them.
Of course, this ideawhich wed now think of as a branch of the hypertext mediumhas a history that stretches back much further than the CYOA series. It runs back nearly a century, in fact. But just as I had no great ambitions when I first started with Twine, I also had no great knowledge of the medium. My thoughts were humble. I saw a hill and wondered what was past it. Twine was the walking-stick I built to help myself get there.
Twine has grown and grown since then, to my delight. What Im most proud of is how many people have used Twine to write their first interactive story. Some of these people only know the medium of interactive fiction in the same terms I did, with examples like CYOA and Zork. Many more, I suspect, come to the medium completely fresh. Whoever you are, its truly a privilege to be able to offer a first glimpse of this territory. I hope youll fall in love just as I did.
But there are hazards to exploration. False trails and dead ends abound. A wise explorer draws on every resource availableand this book, though there are no maps printed in its pages nor any descriptions of flora or fauna, is an excellent guidebook to have at your side on your first foray.
Chris Klimas, creator of Twine
About the Author
Melissa Ford is the author of numerous works of fiction and nonfiction. She has been a huge interactive fiction fan since 1982, when her dad gave her a copy of Zork to help her become a better speller. She is the blogging and social media editor at BlogHer, a contributor at GeekDad, and the Twine mentor at her local computer club. She is also the author of the award-winning blog Stirrup Queens. She earned her MFA from University of MassachusettsAmherst.
Dedication
For my Dad, who brought home Zork and said, Play this.
Acknowledgments
First and foremost, a huge thank you to the Que team for all of your hard work: Rick, Todd, Tonya, Laura, Sandra, Seth, Cindy, Mark, Michelle, Greg, and Kitty. A shout-out to Charlotte Kughen, who helped with the middle of the book, and an enormous separate thank you to Rick Kughen for believing in this project when I wrote him, So I have this idea for a book... and he brought me into the Que family. I have never had so much fun working on a book.
Thank you to James Floyd Kelly, who held my hand when I needed to jump and made sure I landed somewhere good. And an enormous thank you to Chris Klimas for jumping with me. I would not have done this without you.