I was looking at Google’s Dart programming language again yesterday, it’s becoming more interesting again due to Flutter, which is Google’s attempt to create a better way to create Android applications in the future, that even run on iOS and possibly other devices without any of the pain that comes with that.

Looking around I stumbled upon a work in progress project called egamebook, written in Dart by Google employee Filip Hracek who is also working on the Dart language itself. Egamebook aims to combine artificial intelligence with multiple choice style interactive fiction (which is popular on mobile devices right now) to bring interactive fiction into the 21st century, making them as open and sandboxy as modern open world video games like Skyrim are.

In single player video games, the enemies are controlled by the computer, by an artificial intelligence. It looks at the state of the world, creates a list of possible actions it could take and chooses the best one.

Using this as a template, egamebook uses the same mechanic to not only control the world and the enemies in it to create a living, breathing world, but it also creates the choices that the player is given in a text interface. It takes the list of possible options that the artificial intelligence has chosen, takes the top four or so options and presents these to the player to choose from.

The idea here is that you wouldn’t want to give players stupid choices, like “run against the wall”, only choices that make sense, so the top choices are chosen. But you still want the player to be able to fail, so he has to find out for himself which of the options is the most likely to succeed.

And we’re really talking about most likely here. There is no option that gives you sucess and all others fail. It’s all a bit more fuzzy than that. The options are either more or less likely to lead to success. It depends on the state of the world with a little bit of chance added.

So let’s say you are playing a fantasy interactive book, where you are a knight who leads an army into battle. You are given, among other options, the choice to attack the south wall of the enemy castle. But if you succeed and breach the wall is not set in stone by the author of the interactive fiction. Instead, it depends on how many soldiers you have recruited for the battle prior in the story, how many catapults you have built, and so on. Just like in a video game. But in an interactive, multiple choice style interactive fiction book instead.

So this brings the openness of text adventures like Zork to multiple choice interactive fiction, which is much simpler to use and also works really well on smartphones.

The creator of this tool has written a few sample stories to improve it. The first one he created is called Loch Ness, you can play it here. It was created in just two days for a game competition so don’t expect too much, but you can already see that the idea of combining artificial intelligence with interactive fiction actually works.

The second one, Edgehead, is a lot more sophisticated. You can play it here.

As you can see, there isn't just text, pictures are shown here and there to make it more interesting which I think is a great idea.

Creating this new type of interactive fiction is going to be a lot harder than using something like Twine or Ink, you have to write actual programming code, but it seems to be worth it if it leads to creating a whole new generation of interactive fiction that is as open as the old classic text adventures like Zork. Do you think so too? Tell me what you think in the comments!

Links:

egamebook

-> egamebook website

-> Google+ community

-> Mailing list

egamebook games

-> Loch Ness

-> Edgehead

-> Edgehead source code