Seeking guidance for an online text adventure built on Kirby

Hey there! I thought I could pick the brain of the Kirby community on this rather open subject. So, I’m trying to prototype an online text adventure game, with Kirby as a backend. Basically, the goal here is to have normal kirby content files that can be retrieved and displayed asynchronously per some logic that is informed by user input.

So far, I’ve had a few ideas. For the text parsing, I thought I could go with Verbal Expressions. The idea here is to parse user input with regex (maybe there is a Kirby specific way to do this?) to find some keywords or other logical setup that will retrieve the corresponding content from a regular kirby markdown file.

Ideally, a list of user inputs could be saved to a new content file so a user could ‘save’ their game (or maybe a cookie or something here…), but that’s definitely further down the road.

I’m not sure whether the JavaScript or PHP variant of Verbal Expressions would work better with this. I’m suspecting the javascript version will be more useful for the ‘live’ asynchronous aspect going on here… Maybe somehow take advantage of JSON here? Am I on the right track?

This is quite a broad question, but I would appreciate any thoughts someone might have on this topic. Thanks!

1 Like

I have been thinking of a similar thing, but more in terms of structure: to create a linking context that is more like a rhizome than a tree.

There is a website with a survey on available online text adventueres, I am certain you have found lots of similar sites in the web: ifwizz. Many of the online examples use Parchment, and it seems that also images and other files can be included.

I am not a developer of such a thing – far away ! – so I would be very interested in seeing how you proceed!

PS.: Years ago I worked with text adventure in a completely different context but my experience is that the creators of those stories are usually very helpful when it comes to technical advice.

Maybe something like this: