alathon / AwesomeMUD

An awesome MUD in Scala
1 stars 1 forks source link

Mechanism for storyboards/sequences of actions/forms #7

Open alathon opened 10 years ago

alathon commented 10 years ago

There needs to be a way to query for multiple things in a row. In an ideal world, I would be able to define a story, f.ex:

During all of this, the user should be able to move back to previous steps, and should be able to receive a summary at the end. Work on this is started but wholly unfinished in com.awesomeware.core.io.InputRequest.scala as a 'Story', where one story f.ex. is character creation.

It would be ideal to separate the input validation from the concept of going back/forth through a list of items the user needs to complete, and to allow common, easily-accessible ways to dispay and query for things, common validation constraints, etc. while still allowing custom on-the-fly constraints etc.

alathon commented 10 years ago

Working implementation should satisfy, at very bare minimum, these two usecases:

1) A basic character creation story 2) A quest / conversation dialog with multiple choices/results.

In that regard it should be noted that both the result of individual steps should be gettable, as well as a collection of all of the results, and used in subsequent steps or as the final result. It makes sense for the final result of the char creation to be used as a return value of character creation (as a Some value), while the dialog may very well need the result of individual steps to know which steps to proceed on to, and may not care very much about the end result.

To that effect, dialog options could be represented as letter-based choices (choice a, b, c, d...) and/or numbers (choice 1,2,3,4, ...), could have or could not have a back/forward/exit option to advance the story, etc.. indicating that input types can vary between plain text, numbers or multiple choice (signified as a choice from a list).