bell notificationshomepageloginNewPostedit profile

Topic : How do I program a game for an ereader? I have a question that relates to this one: I want to write a Choose Your Own Adventure styled e-book, what's a good approach? I have made CYOA - selfpublishingguru.com

10.01% popularity

I have a question that relates to this one:
I want to write a Choose Your Own Adventure styled e-book, what's a good approach?

I have made CYOA games in various programming languages. Now I want to make something for an ereader(specifically my mom's ereader). I imagine the game would incorporate a simple interface that can update when a person "turns the page" that would include a health bar among other things.

In python this project was easy. I imagine I may have to use HTML. Could someone explain the best approach for this idea? It would be greatly appreciated!!

-Daveyman


Load Full (1)

Login to follow topic

More posts by @Sarah872

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity

CYOA games require a method by which the reader's choice from a list of options changes the current page to an associated link. In most publishing platforms, this can be easily accomplished. Take a look at this link for details on how to add touchable links to an epub document.

As for the dynamic health bar interface on each page, that probably exceeds the language capabilities of most ereader document formats, but you can simulate such an interface with a non-dynamic embedded image placed at a standard location on every page.

Imagine that your pov character has 4 health points and that there are 3 treasure/tool items which can be found during the adventure. It would take only 20 images to represent all of the possible health bar interface conditions (0-4 health points times 0-3 treasures found). Now all you have to do is make 20 copies of each of the pages in your adventure, embedding a different image in every instance of the page. Then chain those pages together with links (as described above) such that the players current health and possessions are consistently represented.

The game starts with a page that says...

In the first room you find a key. 1) Pick it up. 2) Leave it. -with a health=4 treasures=0 image embedded at the bottom.

If the player chooses 1, link to page 100 which says...

You now have the key. There are two doors in front of you. A) Go through the left door. B) Go through the right door. - with a health=4 treasures=1 image embedded at the bottom.

...while if the player chooses 2, linke to page 200 which says...

There are two doors in front of you. A) Go through the left door. B) Go through the right door. - with a health=4 treasures=0 image embedded at the bottom.

All of the links on page 100 go to pages which have the health=4 treasure=1 image in them. While the links on page 200 go to nearly identical pages with the health=4 treasure=0 image. This leads to a lot of nearly identical duplicate pages, but it allows you produce an interactive game in a non-interactive e-book environment.

The big problem with this approach (aside from the complexity of it creation effort) is that there is no way to keep the player from using the next-page and previous-page buttons on their ereader. Just like with a real book, their compliance with the rules of the CYOA game is completely unenforced.


Load Full (0)

Back to top