Page 2 of 2

Re: I made a routes analyser - visualise your project with a graph!

Posted: Tue May 04, 2021 5:07 pm
by Amethysts
For the last piece of code you shared:
You're right, the graph doesn't indicate where there is a lot of text, and where there is none or just a few...
It's actually a hard things to do ! Also, it could be very messy to display things like this... even from a design point of vue, it's not an easy question to determine how to do it.

To be fair, I'm trying to make a general tool, your project does not look like every other project (I mean it in a good way don't worry), sorry I think I will not help you any further :/

But thanks so much for testing it, and I hope it helps a bit more when I add the sub-label functionality! :)

Re: I made a routes analyser - visualise your project with a graph!

Posted: Tue May 04, 2021 6:50 pm
by Donmai
hell_oh_world wrote: Fri Mar 05, 2021 2:45 pmWrong section though
Well, considering that the name of this section is "Questions and Announcements", then here is the correct place.

Re: I made a routes analyser - visualise your project with a graph!

Posted: Thu May 13, 2021 8:53 am
by Amethysts
Ocelot wrote: Tue May 04, 2021 10:45 am One problem I found: it appears that it does not work with sublabels:
This is fixed on the last version ! :D

Also, I added a new feature to help handle data-driven games ;)
Here: https://github.com/EwenQuim/renpy-graph ... ke_jumpa-b

You can try the online version if your project is public on GitHub here: https://renpy.amethysts.studio
Or download it here otherwise: https://github.com/EwenQuim/renpy-graphviz#how-to-use

Re: I made a routes analyser - visualise your project with a graph!

Posted: Sun Jun 06, 2021 5:14 pm
by Amethysts
New release, sorry for the up but this is a real improvement.

Image

- SUPPORT FOR SCREENS
And you can deactivate it if it is not relevant to your project

- EVEN MORE INTELLIGENT ALGORITHM
Can detect almost every pattern (there is still work to do but honestly this feels almost natural, you can just use the program without touching anything)

- COLORS and SHAPES
You can customize as you wish

- CONFIGURATION FILE
You can control the program's behaviour even without the command line, by modifying the `renpy-graphviz.config` file


There is still more to come. The main goal is: you run the program, and it explains everything to you. If you enjoy the project, go check https://github.com/EwenQuim/renpy-graphviz and leave a star ! :D

Re: I made a routes analyser - visualise your project with a graph!

Posted: Sun Jun 06, 2021 7:25 pm
by henne
That looks like fun :O

Is there some kind of maxium it can work with?

Re: I made a routes analyser - visualise your project with a graph!

Posted: Sun Jun 06, 2021 8:10 pm
by papillon
Sounds like a neat idea - I don't know if it'll actually work on my spaghetti or not yet but I'm posting here partly to remind myself to examine more later :)

Re: I made a routes analyser - visualise your project with a graph!

Posted: Sun Jun 06, 2021 11:39 pm
by Imperf3kt
I'd be interested to see how this handles something with next to no story but infinite possibilities. Must remember to give it a try tonight on my Blackjack game lol. In that I use labels and menu statements to control game flow.

Re: I made a routes analyser - visualise your project with a graph!

Posted: Mon Jun 07, 2021 2:44 am
by Amethysts
@henne There's almost no maximum. I tried it on VNs with 200k lines of code and it creates the graph in 2/3sec: for more than 200 labels, it struggles a little (mostly because of the .png generation: it will be huge). But for almost all VNs, it works under a second !

I tried to handle errors (that may happen) that happens if your VN isn't structured like my tool would like, but that's very rare and the program will give meaningful explanations to try and fix it without changing the behaviour in Ren'Py. Also, you can create fake labels in comments (see TAGS) if you want a bubble with some text in it without having to create a real `label` in Ren'Py. So don't worry about limitations haha. (but I'm still interested if you have ideas to make this tool better!)


@papillion and @Imperfekt uuh it works well with stories, and now with screen support, it can handle (some) data-driven games too.

The only thing that can kill my lil program ( :sad: ) are `if/else` statements controlled by variables. I try to handle this but my tool only perform static analysis, so that's super hard... Now my program will try draw the lines anyway, it will just not understand what is happening for real (but you can guess)

Re: I made a routes analyser - visualise your project with a graph!

Posted: Tue Nov 23, 2021 10:30 am
by Amethysts
@Imperf3kt here it is with your BlackJack game (I decompiled it, sorry).

Image

Honestly I don't know a lot about BlackJack but it seems neat, doesn't it ?

I might work on this tool a bit more in 2022 for even more pattern recognition, but I'm waiting Ren'Py to migrate to Python3, so my tool might get even more super-powers!

Re: I made a routes analyser - visualise your project with a graph!

Posted: Tue Nov 23, 2021 2:42 pm
by Imperf3kt
It's like art lol

Re: I made a routes analyser - visualise your project with a graph!

Posted: Sun Dec 05, 2021 2:18 am
by Kia
Sounds interesting. One thing you might want to be aware of, is the gameplay loops:

Code: Select all

label main_loop:
    show screen some_map
    pause
    jumps main_loop
They're often used for minigames and such, the code might have problem computing infinite loops like this.