Flashtease analysis tool

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Flashtease analysis tool

Post by dtspam »

It find it quite anoying, if I stumble accross errors in flashteases. Especially if it took quite some time to do the tease up to that point, I'm realy horny and I can't finish the tease because of some missspelled page name in the script.
Thus I thought it would be nice to have a tool that checks scripts for some common errors and prints out a list of terminal pages so that an author can take a look and see whether or the tease was intended to end there.

The tool can be downloaded here: http://milovanaflashparser.kenai.com/
I'm also willing to publish the source code but until now its rather prototypish.

As an example I took the liberty to analyse the last flash tease "Paige decides your orgasm"
At first the parser just terminates with an error, since the script contains some empty parantheses "()" after page 14. Maybe the flashtease viewer doesn't care about them, but I didn't click through the tease that far.

After fixing that my program produces the following output.
##Relevant pages:
[]
### Undefined pages:
20preend
22
18a-repeat
21b
21c
21d
### Terminal pages:
17end
16end
18end
20h
20goodend
end
19end
### Transitions:
{start: {}, {}} -> {page2: {}, {}}
{page2: {}, {}} -> {page3: {}, {}}
{page3: {}, {}} -> {page4: {}, {}}
{page4: {}, {}} -> {page5: {}, {}}
{page5: {}, {}} -> {page6: {}, {}}
{page6: {}, {}} -> {page7: {}, {}}
{page7: {}, {}} -> {page8: {}, {}}
{page8: {}, {}} -> {page12: {}, {}}
{page8: {}, {}} -> {page9: {}, {}}
{page12: {}, {}} -> {page13: {}, {}}
{page9: {}, {}} -> {page10: {}, {}}
{page13: {}, {}} -> {page14: {}, {}}
{page10: {}, {}} -> {end: {}, {}}
{page10: {}, {}} -> {page11: {}, {}}
{page14: {}, {}} -> {page15: {}, {}}
{page11: {}, {}} -> {page12: {}, {}}
{page15: {}, {}} -> {18: {}, {}}
{page15: {}, {}} -> {20: {}, {}}
{page15: {}, {}} -> {16: {}, {}}
{page15: {}, {}} -> {17: {}, {}}
{page15: {}, {}} -> {21: {}, {}}
{page15: {}, {}} -> {19: {}, {}}
{18: {}, {}} -> {18a: {}, {}}
{20: {}, {}} -> {20a: {}, {}}
{16: {}, {}} -> {16a: {}, {}}
{17: {}, {}} -> {17a: {}, {}}
{21: {}, {}} -> {21a: {}, {}}
{19: {}, {}} -> {19a: {}, {}}
{18a: {}, {}} -> {18b: {}, {}}
{20a: {}, {}} -> {20b: {}, {}}
{16a: {}, {}} -> {16b: {}, {}}
{17a: {}, {}} -> {17b: {}, {}}
{19a: {}, {}} -> {19b: {}, {}}
{18b: {}, {}} -> {18c: {}, {}}
{20b: {}, {}} -> {20c: {}, {}}
{16b: {}, {}} -> {16c: {}, {}}
{17b: {}, {}} -> {17c: {}, {}}
{19b: {}, {}} -> {19c: {}, {}}
{18c: {}, {}} -> {18d: {}, {}}
{18c: {}, {}} -> {18end: {}, {}}
{20c: {}, {}} -> {20d: {}, {}}
{16c: {}, {}} -> {16end: {}, {}}
{17c: {}, {}} -> {17d: {}, {}}
{19c: {}, {}} -> {19d: {}, {}}
{18d: {}, {}} -> {18end: {}, {}}
{20d: {}, {}} -> {20e: {}, {}}
{17d: {}, {}} -> {17e: {}, {}}
{19d: {}, {}} -> {19e: {}, {}}
{20e: {}, {}} -> {20f: {}, {}}
{17e: {}, {}} -> {17f: {}, {}}
{19e: {}, {}} -> {19f: {}, {}}
{20f: {}, {}} -> {20g: {}, {}}
{17f: {}, {}} -> {17g: {}, {}}
{19f: {}, {}} -> {19g: {}, {}}
{20g: {}, {}} -> {20h: {}, {}}
{17g: {}, {}} -> {17end: {}, {}}
{19g: {}, {}} -> {19end: {}, {}}
### Deadlocks:
{21a: {}, {}}
### Unreachable pages:
22b
22c
22d
20goodend
### Terminal states:
{20h: {}, {}}
{17end: {}, {}}
{18end: {}, {}}
{19end: {}, {}}
{end: {}, {}}
{16end: {}, {}}
{21a: {}, {}}

"Relevant Pages" lists pages where the set-status has to be considered. In this case (and most other case) there are no such pages.
"Undefined Pages" lists pages, that are used by some actions but are never defined. So this tease clearly has some errors.
"Terminal Pages" list pages, that contain no actions. The user has to check, whether this is intended.
"Transitions" list possible transitions between actions. This is more for debugging reasons but may be helpfull for smaller teases.
"Deadlocks" lists states, that can be reached and the related page has some actions but no action can be executed. In this case the action refers to an undefined page, but a deadlock can also occure because of the set-status of a page, the range command and must/mustnot conditions.
"Unreachable Pages" list pages, that can't be reached. Usually this indicates an error, but some teases use unreachable actions as flags using their set-status.
"Terminal States" lists the states reached when a terminal page is reached. Between the empty braces "{}" the program puts out information about the set-status of relevant pages. So this listing is only interessting if the set-feature is used.

I hope for some feedback, whether this tool is usefull and how it may be improved.

dtspam
Last edited by dtspam on Sat Jan 09, 2010 12:07 pm, edited 1 time in total.
User avatar
green
Explorer At Heart
Explorer At Heart
Posts: 789
Joined: Thu Jul 24, 2008 11:43 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Switch
Location: Germany

Re: Flashtease analysis tool

Post by green »

Cool stuff ! :)

You should have written it in php or maybe even javascript though : P. That way it could be implemented as feature in Milovana ;).

-green-
You can own the earth and still - All you'll own is earth until
You can paint with all the colors of the wind
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Flashtease analysis tool

Post by dtspam »

Hm, I could allways turn it into an applet.
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Flashtease analysis tool

Post by dtspam »

Now you can use the tool as an applet. So you just have to copy your script in the textbox and click a button.
If Java isn't installed you should be redirected to some place to download it.
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Flashtease analysis tool

Post by dtspam »

I moved the project to http://milovanaflashparser.kenai.com/
You can access the source code repository there directly (if you don't know how to do that, you want to learn) or download the source code.
There is no documentation of the source code and at least the code of the parser is quite messed up since the documentation of the scripting language is very limited, thus I had to modify the parser until it could parse all the scripts of the flash teases.
Xenophobe
Explorer
Explorer
Posts: 92
Joined: Sat Jul 07, 2007 1:42 pm

Re: Flashtease analysis tool

Post by Xenophobe »

Holy crap, mad props dtspam! This is awesome, thanks for publishing the source.
User avatar
green
Explorer At Heart
Explorer At Heart
Posts: 789
Joined: Thu Jul 24, 2008 11:43 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Switch
Location: Germany

Re: Flashtease analysis tool

Post by green »

Haha, it fails at validating my tease ;).
You can own the earth and still - All you'll own is earth until
You can paint with all the colors of the wind
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Flashtease analysis tool

Post by dtspam »

Your webtease is in fact quite simple. What causes the tool to fail is, that you use the range command without unset and that your tease doesn't end at the last page but starts again at the beginning. If you remove that loop or add unset commands your tease is analysed quite fine.
I suspect that you didn't really intend to disable possible paths with each repetition of the tease anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests