The Interactive Storybook

Announcements that go here will appear on the front page.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

The Interactive Storybook

Post by Mogri »

The Interactive Storybook

Allow me to introduce the project I've been working on for the past month. The Interactive Storybook is an editor/reader for gamebooks, CYOAs, and other forms of interactive literature. It's ridiculously simple to make a CYOA with it, and with a little scripting know-how, you can accomplish pretty much anything. Want to make a text-and-images version of Final Fantasy? You're crazy, but you can do that.

The project is officially in Open Beta as of this post, which means that it seems to work but I'm sure there are bugs. I'm fairly confident in the basic CYOA functionality, but I haven't done too much scripting. You can see how the reader works in the one sample book I've published, which does have a little scripting: after you die six times, the text in the intro changes slightly.

Code: Select all

intro = "What do you do?";
times = times + 1;
if (times > 5) {
  intro = "This all feels really familiar somehow.";
}
Please give it a try and report any bugs you find! Documentation is available on the wiki, but feel free to ask if you have any questions that aren't answered there.


The boring backstory

I was toying with the idea of doing a text adventure game for the Littlest Game contest. I had a bit of an idea in mind, but nothing too concrete; what I did have, though, was a little too complicated to pull off with tags and menus, and I was reluctant to write a script that would inevitably boil down to an enormous switch statement.

But I liked the concept, so I began to toy with the idea of writing the game in PHP. It wouldn't solve everything, but I figured it would simplify a lot of things, not least the textbox limitations I'd have to work under. Again, though, I was running into the same issue. Either I'd have to do a ton of one-offs or I'd have to write some sort of engine to simplify things. But a simple text engine wouldn't really cut it; I'd need a scripting language to really make it work.

Christmas came, and by coincidence, my wife gave me 999: Nine Persons, Nine Hours, Nine Doors, a visual novel for the DS that had been on my list for a few years. It was the only console game I got this year, so I ended up playing a lot of it.

It was captivating, but not only that, it fed into what I was already doing: the more I played it, the more I wanted to work on the engine. At this point, I'd already written specifications for the scripting language and a parser/interpreter. (Compiler stuff is like crack to computer science geeks; that was the quick part.)

It took only a few weeks from that point to get this project to a working state. I hope you enjoy using it as much as I've enjoyed making it, and I look forward to seeing what you write!

Here's that link again
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

And I managed to break the reader right before making this announcement! If you tried reading in the past half hour, try again.
User avatar
Spoonweaver
Liquid Metal King Slime
Posts: 6516
Joined: Mon Dec 08, 2008 7:07 am
Contact:

Post by Spoonweaver »

Code: Select all

Error accessing database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'reads = reads + 1 WHERE book_id = '1'' at line 1 Query: UPDATE story_book SET reads = reads + 1 WHERE book_id = '1'
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Caught that. It should be good now.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7684
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I <s>get</s> previously got the same error as Spoonweaver when I try to view your book. When I try to view my own book, it quietly does nothing.

I am also unable to go back and edit Page 0 after I have edited it once.

I would definitely like a "Save" button. auto-saving is fancy and all, but provides no feedback.

Would it be possible to create a blank linked-to page simply by linking to it in a page option? I assume you did not do this because of the auto-save
Last edited by Bob the Hamster on Thu Jan 10, 2013 11:22 pm, edited 1 time in total.
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Oops, page 0 should not be a legal page number. Let me fix that...

edit: Should be good now
Last edited by Mogri on Thu Jan 10, 2013 11:33 pm, edited 1 time in total.
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

As for your other feedback:
I would definitely like a "Save" button. auto-saving is fancy and all, but provides no feedback.
There is a message displayed when saving occurs or fails. The primary reason I used autosaving so extensively is that it was easier than reminding the user to save changes every time he decided to switch to another page. There's also the issue of what exactly the save button should save -- either I have a dozen save buttons, or one really overloaded one.
Would it be possible to create a blank linked-to page simply by linking to it in a page option? I assume you did not do this because of the auto-save
You mean something like

1. User edits an option on page 1 and puts "5" in the dest page field.
2. Page 5 doesn't exist yet, so it's automatically created.
3. The user can later edit page 5.

The problem I have with this flow is that the user might be left wondering why page 5 exists. I'd prefer to have an auditing tool that you can use to figure out any broken page links.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7684
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Okay, I guess the autosave makes sense in that context.

What if, when you autosave a page number in an option, if the page number doesn't exist yet, a button appears that lets you create it now?
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Bob the Hamster wrote:Okay, I guess the autosave makes sense in that context.

What if, when you autosave a page number in an option, if the page number doesn't exist yet, a button appears that lets you create it now?
Better yet, a button to create a new page and automatically assign the new page number to the option. I like this idea.

edit: It is done and documented.
Last edited by Mogri on Fri Jan 11, 2013 12:35 am, edited 1 time in total.
User avatar
Master K
King Slime
Posts: 1899
Joined: Sat Jun 11, 2011 9:40 pm
Location: A windswept rock in the Atlantic Ocean

Post by Master K »

Amazing! Seems pretty cool, I'll try it sometime. I have a massive snowstorm in my area, so I'm most likely getting an early weekend, so maybe I'll start writing.

IRKS:

*Add a delete. For pages, and for books themselves. I don't need to see my failed thingy lurking at me.
*Page 0 still exists, and once exited, cannot be re-edited with intro text.
Last edited by Master K on Fri Jan 11, 2013 3:47 am, edited 1 time in total.
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Page 0 is a ghost page! You can never access it and it will never be read. So don't worry about it. I thought I fixed that, but I'll take another look.

Book delete is a good idea; I don't currently plan to add a page delete. You can always repurpose a page later.
User avatar
TheCube
Slime Knight
Posts: 190
Joined: Thu Dec 23, 2010 2:10 pm
Location: Seattle, WA
Contact:

Post by TheCube »

This style reminds me quite a bit of Twine. It's good to see IF and CYOAs making a resurgence, especially with the decline in "oh god what words DO you understand" text parsing games of old.

I'll have to make something with this soon :D
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

How timely. I recently just got interested in writing game books. I've got a big project in the works, but it's currently too far along to adapt it to The Interactive Storybook. I hope to toy with this in the future though.
User avatar
Mogri
Super Slime
Posts: 4678
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

This is a topic that still exists.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

How did I not see this. though I was out of mental stability last year, so it's actually not much a wonder when I think about it.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
Post Reply