Accueil > Root > Log book > Shifting priorities
Shifting priorities
mardi 11 mars 2025, par
Toutes les versions de cet article : [English] [français]
It had been a while since I last had coffee with Claire, this is now solved as we were able to meet close to where I live. We had an interesting discussion that allowed me to be more clear on where is my work going those days, where I am currently procrastinating, etc.
It turns out it was a good idea to put back my "old website" as the interactive portal of my realm, and I realized again that I had the desire to create an interactive adventure on here. As I keep coming back to this idea, I think my highest priority should be to put resources on this project.
And this leads us back to DiaVN. My initial priority was to create the Dia to RenPY translator, but with this feedback, I think I need to first do the Dia to HTML translation tool.
So the idea is to generate, from a Dia diagram, a web of linked pages, forming together an interactive story. And there should be one, or several, access points in the current website.
The starting point of the story could be a guy who watches by the window as he is working full remote, and the play could select "branches" that could allow him to observe more closely some elements of the scene. The interactivity, beyond the choices the player can take, would come from the possibility of sending feedback when reaching a leaf of the tree - a new possibility of continuing the story. The player would fill a little form, I’d get the feedback in my mailbox, and I would possibly continue the story, and notify the player of this. Meanwhile, the player would have Ctrl-Ded the last page as a crude way of saving the game.
In this context, DiaVN would be used as a HTML generator for a static tree (possibly with loops, so a graph), without database or internal state (so, no variables). After first testing and preliminary analysis, different challenges appear that do not exist in the RenPY generator :
- so of course, no possibility to use variables to represent an internal state of the game (so no player data for example, no keys that can be carried to open doors, etc.)
- no possibility to count the number of passages in a loop (so can’t use the special dialog forms taking advantage of that)
- no possibility of using procedures as it is not possible to store internally the caller’s URL
- Javascript needed to display dialogue as a page unrolls
- template management (how to change color of the text, of the background, of dialogs...?)
- and most importantly : importance of generating the same tree at every compilation, at least for that part of the tree that does not change between versions —> this to allow the user to save with Ctrl+D.
The main obstacle for this last point is caused by the way Dia automatically attributes IDs to diagram elements. IDs are noted from O0 to Oxxx, and if one element is deleted, then the next created element will take the freed ID. This means that when comparing two versions of the same diagram, two different elements can have the same ID. And I use the IDs, as they are unique, to generate elements in DiaVN. Therefore, if I naively generate file names using those IDs, I am at risk of changing my tree between compilations and making a mess of the player’s bookmarks.
So how can I make sure DiaVN generates the same tree for the part that did not change ?
- it should be "forbidden" to delete and recreate element - or at least the user of DiaVN should be aware that this will break the save system
- i can leverage the unofficial end elements to create the story’s continuation points, whereas the Game Over (End) element should be used to indicate that the story is really finished.
This implies that there will probably be differences between RenPY and HTML diagrams. But I can try to make it so that HTML diagrams are valid subsets of RenPY diagrams and therefore a HTML game can be ported to RenPY easily - the opposite being false, of course.
Update
It’s even worse than I thought : deleting an element will change the ID of all the elements that were created after it. Argh.