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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
Amethysts
Regular
Posts: 40
Joined: Thu Aug 23, 2018 1:17 pm
Projects: Coalescence
Skype: amethysts-studio
itch: amethysts
Contact:

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

#16 Post by Amethysts » Tue May 04, 2021 5:07 pm

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! :)

User avatar
Donmai
Eileen-Class Veteran
Posts: 1912
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question
Projects: Slumberland
Location: Brazil
Contact:

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

#17 Post by Donmai » Tue May 04, 2021 6:50 pm

hell_oh_world wrote:
Fri Mar 05, 2021 2:45 pm
Wrong section though
Well, considering that the name of this section is "Questions and Announcements", then here is the correct place.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Amethysts
Regular
Posts: 40
Joined: Thu Aug 23, 2018 1:17 pm
Projects: Coalescence
Skype: amethysts-studio
itch: amethysts
Contact:

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

#18 Post by Amethysts » Thu May 13, 2021 8:53 am

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

User avatar
Amethysts
Regular
Posts: 40
Joined: Thu Aug 23, 2018 1:17 pm
Projects: Coalescence
Skype: amethysts-studio
itch: amethysts
Contact:

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

#19 Post by Amethysts » Sun Jun 06, 2021 5:14 pm

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

User avatar
henne
Newbie
Posts: 7
Joined: Tue May 25, 2021 6:10 am
Contact:

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

#20 Post by henne » Sun Jun 06, 2021 7:25 pm

That looks like fun :O

Is there some kind of maxium it can work with?

User avatar
papillon
Arbiter of the Internets
Posts: 4063
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

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

#21 Post by papillon » Sun Jun 06, 2021 8:10 pm

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 :)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3382
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

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

#22 Post by Imperf3kt » Sun Jun 06, 2021 11:39 pm

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.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Latest Blackjack updates

User avatar
Amethysts
Regular
Posts: 40
Joined: Thu Aug 23, 2018 1:17 pm
Projects: Coalescence
Skype: amethysts-studio
itch: amethysts
Contact:

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

#23 Post by Amethysts » Mon Jun 07, 2021 2:44 am

@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)

Post Reply

Who is online

Users browsing this forum: Google [Bot], h333, henvu50, Ocelot