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

python phone tree generation #15

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

python phone tree generation #15

wants to merge 10 commits into from

Conversation

ekate0
Copy link
Collaborator

@ekate0 ekate0 commented Oct 10, 2020

So it turns out that you can actually make phone trees from JSON! I wrote a small and extremely
janky framework to do this, and then ported the pigeon stuff into it (just to eat some dogfood woof)

Things that still suck:

  • Porting in text is still annoying because JSON doesn't believe in new lines, ugh. I don't know of a good solution
    to this, most config file formats suck for this, so I wanted to just stick with one.

  • Choices "Press 1 to fly" are not auto-generated. They could be. If that seems like a worthwhile improvement, it
    is pretty easy to add. ("Press 0 to return to main menu" is generated automatically on every end node though)

  • The x/y coordinates make the layout look good in Twillio. It is purely for show. Unfortunately, right now, you have
    to keep track of them globally, which blows. Ideally, we would probably have a per-config-file offset somewhere,
    so everything Pigeon-related is off to one side, etc. Y'know, this seemed like premature optimization at this stage.

Things that don't suck:

  • Transitions are really easy! This also means that it is easy to add more loops. For example, every pigeon end point
    also directs you to go back to dealing with the pigeons. I think that makes it more obvious that there is more
    content. (Kind of how in a CYOA book, when you read it, you often don't go back to page 1, you go back to the part
    where you chose to jump under the boulder for some reason).

  • Breaking subtrees up into separate config files rocks. I really hate dealing with any file longer than 500 lines.

This would be much harder if I didn't have a pre-made tree to go off from. I am not convinced that the software
is intended to be used this way, but it is very satisfying.

Ekate Kuznetsova added 10 commits October 10, 2020 00:24
So it turns out that you can actually make phone trees from JSON! I wrote a small and extremely
janky framework to do this, and then ported the pigeon stuff into it (just to eat some dogfood woof)

Things that still suck:
 - Porting in text is still annoying because JSON doesn't believe in new lines, ugh. I don't know of a good solution
 to this, most config file formats suck for this, so I wanted to just stick with one.

 - Choices "Press 1 to fly" are not auto-generated. They could be. If that seems like a worthwhile improvement, it
 is pretty easy to add. ("Press 0 to return to main menu" is generated automatically on every end node though)

 - The x/y coordinates make the layout look good in Twillio. It is purely for show. Unfortunately, right now, you have
 to keep track of them globally, which blows. Ideally, we would probably have a per-config-file offset somewhere,
 so everything Pigeon-related is off to one side, etc. Y'know, this seemed like premature optimization at this stage.

Things that don't suck:
 - Transitions are really easy! This also means that it is easy to add more loops. For example, every pigeon end point
   also directs you to go back to dealing with the pigeons. I think that makes it more obvious that there is more
   content. (Kind of how in a CYOA book, when you read it, you often don't go back to page 1, you go back to the part
   where you chose to jump under the boulder for some reason).

 - Breaking subtrees up into separate config files rocks. I really hate dealing with any file longer than 500 lines.

This would be much harder if I didn't have a pre-made tree to go off from. I am not convinced that the software
is intended to be used this way, but it is very satisfying.
Added the AOL subtree.

Managing subtree locations manually was gross, so our friend the x-offset makes an appearence.
Generating a sequence will auto-generate a series of 1-prompt situations like:

"There is no statue. Press 1 to continue."
"There is no pigeons. Press 1 to continue."

etc. Use at your own risk.
Fixes the phone tree generation code to be publishable.

Some light testing found the following issues, which are now fixed:
 - disconnecting the user on time-out is not good. This will no longer happen. Instead, instructions will be repeated.
 - speech nodes do not require speaking since many users will be listening to this in conditions where speaking is impossible.
   Speaking remains an option, but the node will proceed to the next node as planned.
 - Press 9 to repeat the instructions has been added to all choice nodes, by popular demand of the one beta tester.
 - some sequence blocks have been re-arranged because one-sentence sequence blocks are PITA to play with.
@annthurium annthurium requested review from annthurium and removed request for annthurium October 19, 2020 05:02
Copy link
Owner

@annthurium annthurium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay! I tested the phone tree, everything seems to be working as expected. Fuck yeah!!! Ship it!!! Thank you again, for everything 💟 🍕 🦝 💓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants