[ANN] GemIF - Simple Interactive Fiction engine for Gemini
Norm MacLennan
norm at iwritethe.codes
Wed Dec 2 12:05:27 GMT 2020
On 12/2/20 4:13 AM, Luke Emmet wrote:
> Its a great start, but I'm afraid it breaks the forward and back
> navigation in my client, and might affect other clients too. This is
> because each rendered page has the same URL.
>
> I would suggest some sort of simple modification should fix it, for
> example a simple step number, like this maybe
>
> gemini://server/path/sessionguid/step
>
> e.g.
>
> gemini://gemif.fedi.farm/game/cb3e4821-c316-4124-a2f7-fa82a7110ed5/1
> gemini://gemif.fedi.farm/game/cb3e4821-c316-4124-a2f7-fa82a7110ed5/2
> gemini://gemif.fedi.farm/game/cb3e4821-c316-4124-a2f7-fa82a7110ed5/3
> etc
>
> Or some other marker - it doesn't have to be an incrementing index. This
> would then work in a wider range of clients and they'd be able to back
> and forward through their session.
Hey Luke,
Thanks for checking it out and thanks for the feedback. Since I was
always opening a new Amfora tab to test, I hadn't considered how it
breaks back/forward but you're completely right.
Due to the nature of how the application currently works, I'm going to
have to do some noodling on how to fix this. Though your suggestion will
likely be some part of it.
If I wanted to keep the low complexity of the app as it is now, I could
even do away with the notion of "games" completely and just have it move
you between a static URI for each room. That is,
```
# GemIF
This is the homepage.
=> gemini://gemif.fedi.farm/room/the_beginning start the game
```
And on the next page
```
# The Beginning
Some description.
=> gemini://gemif.fedi.farm/room/the_middle_a make choice a
=> gemini://gemif.fedi.farm/room/the_middle_b make choice b
```
That would probably be the most straightforward way of not hijacking
history for the clients as the user could freely jump back and forward
due to stable URLs and lack of server-side state.
However, it becomes a little problematic if I want to introduce actual
game state (e.g. you have the key because you made choice b). So I'll
need to do some thinking on how important such state is to me (and
anyone else interested). It originally seemed fairly integral to the
ability to create a branching narrative without forcing the author to
repeat themselves, but maybe it's not actually necessary or just not
something I need to think about yet.
If I do decide to implement simple game state, I'll likely play with
your suggestion. But in stories where game state is used have it render
something like the below when the user goes back to a previous page:
```
# Invalid Game State
This story doesn't allow time travel.
=> gemini://gemif.fedi.farm/game/my_game_id/latest_recorded_step Go back
to the current scene
=> gemini://gemif.fedi.farm/ Exit game
```
Because otherwise I'm stuck selectively rolling back game state on the
server side. While it's not ideal and some users will find the messages
annoying, it should at least be a bit more pleasant than their clients
throwing error messages about non-existent exits or whatever it's doing
now. And it means I don't need to worry about server-side needing to be
able to selectively roll-back game state (or at least not immediately
and I can add that feature later).
Thanks again for the feedback, it has definitely been useful. If you
think of anything else let me know.
Thanks,
Norm
More information about the Gemini
mailing list