Support for variables?

Is there any concept of variables in Demibook?

For example, we want to remember what number was last picked in a puzzle and store that in a global variable as a string or int called lastNumberPicked. We want to use that on some/any other page(s) in a simple if type statement; i.e., if lastNumberPicked = x etc.

If not, is that planned?
2 people have
this question
+1
Reply
  • Or something as simple as being able to remember the position of objects on a page. Another example:

    A reader moves a balloon, teddy bear, and star to specific positions on a page. They go to another page where they press a button that says "Hide the bear" and come back to the first page and the bear is now moved, but the other objects are not.

    In this case, you'd need a X/Y position stored as a global variable to manipulate it from more than one place in the book, and read by the teddy bear object when a user goes back to the first page.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Thanks David. Yes we plan to implement simple stateful Behaviors (which would allow setting and testing variables, like your first question) in future. I am not sure whether we'd support your second case yet, it's a matter of whether there is enough demand for such capabilities.

    Generally, the more powerful and flexible such a system is, the harder it will be for less technical people to use. So, we need to balance the effort to develop the feature against the number of people who will be able to use it.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Thanks for the response, Andy. As a UX developer and designer of 20+ years I fully understand the concern and trade-offs between power and usability. Looking forward to seeing where Demibooks goes with the app.

    One project I have been approached about is a "choose-your-own-adventure" type affair, and the second example relates to a map page that, when visited, would show objects updated to be in different "locations" on the map based on choices a reader makes during the course of the adventure.

    Again, thanks.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hi David,

    You'll be happy to know that you can already do a Choose Your Own Adventure type book because (thankfully) the dev team graciously implemented the "Jump to Page X" behavior for V1 of Composer! I had been thinking about doing something like this. Basically you'll need to map out the whole book on paper, then build your pages with objects that are programmed with the "Upon User Touch>>Jump to Page X" behavior, and provide as many choices as you need on each page.

    For a book like this, you might not want to do typical Master Page navigation arrows, but instead build your book like a non-linear maze with branching paths, secret passages, etc. In this case I *would* use the Index and use the "Hide/Show" index controls to make a button where you could jump back to the beginning of the book. I can do a video to show how to do this if there's any interest in it.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated