Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Infinite Fight Scene #127

Open
filiph opened this issue Nov 30, 2017 · 6 comments
Open

The Infinite Fight Scene #127

filiph opened this issue Nov 30, 2017 · 6 comments
Labels
completed For completed novels! preview There is an excerpt somewhere in the thread!

Comments

@filiph
Copy link

filiph commented Nov 30, 2017

This is a hack of my own IFCOMP entry (a procedural gamebook). The NaNoGenMo version removes all interactivity, switches from second person to third person, and keeps the initial fight going ad infinitum.

Output

Code

Here's the code: https://github.com/filiph/edgehead/tree/nanogenmo2017

You run the code by cloning the repo, installing Dart, running pub get and then dart bin/play.dart --automated. It's actually very slow, partly because the actors in the book are planning each move, and partly because this is not what this thing is optimized for.

See comment below for more info and best starting points.

Excerpts

Here's the first page of output2.pdf:

screen shot 2017-11-30 at 14 39 54

Page 147:

screen shot 2017-11-30 at 14 50 54

Here's an early excerpt:

Briana takes the scimitar and the sword. From the blackness of the caverns, another goblin comes into view. He lifts his fist.

Briana casts her spear at the goblin. The spear drills through the goblin's shoulder. The goblin grunts in pain and springs at Briana.

Briana dodges the goblin. He hits the rock floor. Aren strikes down at the goblin. The goblin tries to roll out of the way, but can't. The sword slashes his side. He stops moving.

Briana takes the spear. From the shadow of the caverns, another orc comes into view. He lifts his spear.

Briana kicks the orc's right shin. He grunts, and falls to the cavern floor. He tries to scramble out of reach. Aren strikes down with his sword at the orc. The orc tries to roll out of the way but can't. The sword cuts his side. He stops moving.

Here's the algorithm in action, as it writes in realtime:

nanogenmo2017

@hugovk hugovk added completed For completed novels! preview There is an excerpt somewhere in the thread! labels Nov 30, 2017
@hugovk
Copy link
Member

hugovk commented Nov 30, 2017

"It's just a flesh wound!"

@filiph
Copy link
Author

filiph commented Nov 30, 2017

Some more context of the fight/simulation system: https://medium.com/@filiph/skyrim-rendered-in-text-1899548ab2c4. In the article, I'm also explaining the concept of "fractal stories" employed in both the book and this NaNoGenMo entry.

I just realized you'll have trouble running the code because I based this hack on the master branch of Insignificant Little Vermin, which depends on a currently closed-source package. If you want to play around with the system, use the dev branch.

Since I'm reusing code for a game, there's a lot of it. If you want to read the interesting parts, here are a few tips:

@filiph
Copy link
Author

filiph commented Nov 30, 2017

Ok, I couldn't resist and made some minor bug fixing today, plus added a script for PDF generation. There are now 2 outputs.

Thanks @hugovk for organizing this. It was a lot of fun!

@maetl
Copy link

maetl commented Dec 1, 2017

This is great! I remember thinking when reading your article about fractal stories a few weeks ago that a lot of these ideas could be applied to generating books/NaNoGenMo texts as well—nice to see some amusing experiments based on that core work.

@superMDguy
Copy link

Yeah, this is incredible! I loved reading about and playing your "Insignificant Little Vermin" text adventure.

@hendrikboom3
Copy link

Briana is a real survivor, isn't she?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed For completed novels! preview There is an excerpt somewhere in the thread!
Projects
None yet
Development

No branches or pull requests

5 participants