Page 2 of 13
Re: GuideMe Scripting Engine
Posted: Sat Jul 11, 2015 5:04 pm
by PlayfulGuy
So, after posting that last I went and gave more thought to changing the page definition, and started experimenting with my "SarasTease" script that I wrote for the initial release to see how it would affect things.
It actually makes some things easier, solves the problem of multi-line text and mixed formatting pretty nicely, and didn't take a whole lot to rework the script. It's a fair bit of code restructuring, but that's just work.
I'm gonna go play now and stop thinking about it for a while, but right now I'm pretty certain I will be re-working it as outlined in the previous post.
Bye for now.
Re: GuideMe Scripting Engine
Posted: Sat Jul 11, 2015 5:17 pm
by PlayfulGuy
philo wrote:The next version of guideme has the ability to change images and text on the page based on timers, so it will make the engine a lot easier to write.
Maybe. It wasn't all that hard to write so far. It will be interesting to see how that unfolds.
philo wrote:
longer term I want to write a .scr parser that would load .scr files.
my current plan is to try to convert the scr lines to guideme pages on the fly.
this should make debugging scr scripts a lot easier.
I'm hoping the code I'm working on can serve as a good base for you. I'm not sure how converting the script to pages on the fly will make it easier to debug them. I don't get your thinking there.
Something to keep in mind: My code basically updates the page elements of a single page on the fly. Take the case of my test tease - SarasTease.scr. The entire tease really only consists of two guideme pages, some javascript and a script file. I've noticed during my testing that it is
Very fast. Most page updates don't even flicker. I've had the page change right before my eyes and almost not noticed.
philo wrote:
I am also thinking of adding an scr node to the guideme xml so scr scripts can be mixed with more complex xml pages giving the best of both worlds.
Sounds great!
philo wrote:
... the whole window as a single html page and converting all the java controls to html, that way the author can over ride everything on the screen.
Fucking awesome! That will make me soooooo happy!
I'm really looking forward to the evolution of all this.
PG
Re: GuideMe Scripting Engine
Posted: Mon Jul 13, 2015 12:25 am
by desertfox
I think it all sounds good! Keep comma as a parser, it is way more intuitive and easy to type than anything odd.
I honestly think that player responses as buttons is sort of an awkward thing anyway and it would be cool to have a more 'game like' text that highlights on mouse over for those who are doing the more game-like exploration/story heavy teases. I know you could do that with css/javascript probably right now but might be a touch overkill, but might be food for thought down the line when formatting the single page scripting engine.
For buttons I actually had to keep catching myself for doing the button, label, target order of things, it does seem more natural as you usually think... am making a button, it says XYZ, and its going to <target>. I like the * and ** indicators for buttons a lot too, really saves a lot of typing in the long run, and the page definitions are not too bad.
Would pages still carry over state as what was there previously as before? Using the last image with the " is a bit of a life saver as i'm finding I like having the dialog on each page be very short and having the user click through a continue button or player response as a button to progress. Have been interspersing buttonless delay pages for timing as well.
Either way the page definitions I think would be really nice. Having the buttons on the bottom makes it easier to read through what you have in order of the way things are.
Also, for what he was saying about guideme turning everything into pages, the benefit might be that you can now use the debug interface of guideme to jump to specific page numbers.
Performance wise it seems ok though there can be some delay. I was using probably large image sizes and a few times when rapidly clicking to catch up to where I was debugging it would end up with the click events queued up faster than the pages were being flipped. I haven't power clicked through a normal guide though to see if similar slow downs happened. When playing at human speeds it is perfectly fine though.
Re: GuideMe Scripting Engine
Posted: Thu Aug 06, 2015 3:13 pm
by PlayfulGuy
Just a quick note to let you know I'm still alive and still working on this. Been a busy few weeks, but I've made major progress on this. You will be thrilled with the new features. I'm working on some fine-tuning, and need to polish up the tutorial to cover all the new features, but here's a quick summary.
Text can span multiple lines by enclosing it in braces and button commands can appear anywhere within the text block.
Code: Select all
image1.jpg {
Page text line 1
Page text line 2
button Continue
}
Added Audio and AudioFolder commands for playing sounds
A button or goto target may now be a guideme page as well as a script label
Added goSub and return commands for making subroutines
Added set and unset commands for setting and clearing flags
Added ifSet and ifNotSet commands for conditional branching
Added ability to assign variables with
variable = value
Added "Include" command to include one script file into another
Added named styles for formatting text;
Code: Select all
style BigRed = "font-size:150%; color: red;"
The first word of every line of text is checked to see if it's a known style name
In a text block each line can have a different style as in
Code: Select all
image, {
Style1 This text uses style Style1
Style2 This text uses style Style2
}
I'm totally loving it! This is going to be great for my own use, even if no one else uses it.
Stay tuned!
Re: GuideMe Scripting Engine
Posted: Fri Aug 07, 2015 3:26 am
by desertfox
Definitely tuned in!
Was very slooowly goofing around in javascript with some other stuff inspired by the way you have the script engine running (eg staying on page submitting to itself but doing different things depending how the vars are arranged).
It is hard enough to find time to create anything in the days and even worse to find private time to work on a tease. I can really appreciate how hard everyone works to get anything done at all.
Re: GuideMe Scripting Engine
Posted: Tue Aug 25, 2015 2:26 pm
by PlayfulGuy
Another quick update - I have all the coding done and tested. Made a few changes like Delays and Metronomes no longer carry over from page to page by default - In my testing I found it was causing me more problems than it was worth. You can turn that behavior on and off with a flag though.
I've updated the tutorial and added some documentation, now I just need to finish re-testing the sample tease to make sure those last changes haven't broken something else, then package it up and it will be ready.
I'm away for the next 10 days or so, so it probably won't happen until after that.
I'll be really happy to get this finished, for one because I earn myself an orgasm when it's done, and because then I can get back to my main project which is even more awesome.
Later....
Re: GuideMe Scripting Engine
Posted: Sat Sep 05, 2015 4:02 pm
by PlayfulGuy
At long last, here it is! The new, incredibly powerful version of the GuideMe Script Engine!
Download
This will download a zip file named ScriptTeases.zip. Unzip it to your Guides folder.
This will create a folder named "ScriptTeases", and will put several files in your guides folder.
Next open GuideMe and load the Guide "GuidemeScripts.xml". Start with the tutorial, and then have fun writing teases.
You will also find a text file named "ScriptEngine-Readme.txt" in your guides folder. There's more useful info in there.
If you have the original version of the script engine see the notes in this spoiler.
- Spoiler: show
- I have changed the folder structure to make the script engine and scripted teases more self contained, and to provide a better structure for developing your own script based teases.
In your Guides folder there will be a "PG" folder. If you have created any scripts you probably have them in PG/Scripts.
The new release package uses folder "ScriptTeases" instead of "PG".
After unzipping the new release package move your scripts from PG/Scripts to ScriptTeases/Scripts.
You can then delete the PG folder (unless you have one of my other teases you want to keep).
If you can't wait to read about the new features the command summary from the readme file is in this spoiler.
- Spoiler: show
Code: Select all
Any script line not recognized as a comment or other command is assumed to be a page command.
page A page command has the format
imagename, delay, metronome page text
Page text may be a text block enclosed in curly braces
imagename, delay, metronome { This is the beginning of the page text
which is continued on one or more subsequent lines.
} // A closing curly bracket on a line by itself or at the
// very end of the line ends the block.
Comments Any line that begins with // is a comment
Trailing coments are supported. In the line above (and the one below),
everything after the // would be ignored as a comment
Audio Specifies an audio file to play when the page loads.
The audio command can appear within a text block.
Only one Audio command is supported on a page. If more than one is given only the last one will be used.
AudioFolder Sets the subfolder used for Audio commands
ImageFolder Sets the subfolder used for images
Button and GlobalButton
Button and GlobalButton have the syntax
button Label, Target
Label is the button text, and target specifies one of the following:
A script label
A GuideMe page
An Exit command
A Return command
Button commands (but not GlobalButton) can appear within a text block
RemoveButton Removes the specified global button from the list of defined buttons
RemoveButton Label
goto Goto the script label or GuideMe page specified
goto someScriptLabel
gosub Goes to the specified script label or GuideMe page and records the
current script position. A return command then sends control back
to that position.
return Returns to the command following the most recent goSub.
May be specified as the target of a button as in
Button Leave, Return
Metronome Metronome bpm|off
TimerStyle secret|normal|hidden
Exit Exits the script engine.
May also be specified as the target of a button (Button Leave, exit)
By default will return to the GuidemeScripts page which loads the list
of available scripts for you to select one.
If the variable onScriptExit is defined control will go to that
GuideMe page. This is to support better integration of Guideme pages
and scripts. See Variables below
Set/Unset Set and Unset set or clear simple Truue/False flags. These establish
conditions that can then be tested with ifSet and ifNotSet
ifSet/ifNotSet
Tests whether the given flags are set or not and executes the given
command. Command can be any valid script command.
ifSet flags command
ifNotSet flags command
Include Include the contents of another script file
Variables Variables (GuideMe ScriptVars) can be set using a simple assignment
like
onScriptExit = "GuidemeScripts"
myCount = 30
Formatting text
Embedded HTML Any valid html codes can be included in your page text
Special codes
\h Heading /h \h and /h mark H2 style heading text
\p text /p \p and /p mark a paragraph
> At the beginning of a line indents the line 2 spaces
Can use multiple like >>> to indent more
\ Backslash followed by a space inserts a non breaking space
\\ Inserts a backslash
\< and \> Insert angle brackets
\& Inserts an ampersand (&)
Named styles
Style Define a named style with a command like
style largeGreen = "font-size:120%; color:green;"
Then apply it to a page using
image,delay,metronome style text
In a text block each line can have a different style as in
image, {
Style1 This text uses style Style1
Style2 This text uses style Style2
}
This allows mixing of styles in the page.
Special Tags
<ChooseFrom opt1,opt2,...>
<Random>
<mistress1>
<mistress2>
<myName>
<mySubName>
Special Flags
KeepDelays
KeepMetronomes
Enjoy, and I really hope other people start using this. Please send any feedback and suggestions for improvement.
PlayfulGuy
Re: GuideMe Scripting Engine
Posted: Mon Sep 07, 2015 5:24 pm
by desertfox
Sweet! Going to try to dig in tonight! I've been on and off writing some story and gathering some pic sets (that always seems to take up more time than writing ;) ), going to try to find time to plug it in. Will let you know how it goes!
Re: GuideMe Scripting Engine
Posted: Tue Sep 08, 2015 12:03 am
by desertfox
Was able to read through all the new stuff and started converting the small bits I had over. So far so good! Really keeps the simplicity of the first version and adds a lot more features to access, as well as the nice blending of dropping into regular guideme stuff then back out again.
I haven't worked with it enough for any more detailed comments though, but looks really good so far. I hope more people have tried this out than just myself, it's a really, really easy way to write a tease, I can't say this enough.
Re: GuideMe Scripting Engine
Posted: Sat Sep 12, 2015 6:29 am
by Xaron
Great program,
need to experiment with it a little bit longer. But it's a simple way to create teases.
Will be videos supported in next versions?
Re: GuideMe Scripting Engine
Posted: Sun Sep 13, 2015 3:29 am
by PlayfulGuy
Xaron wrote:Great program,
need to experiment with it a little bit longer. But it's a simple way to create teases.
Will be videos supported in next versions?
Thanks Xaron. Glad you like it so far.
I hadn't given any thought to supporting videos, but it would not be difficult to add. Probably something like
that just plays a video from start to finish, or even
Code: Select all
Playvideo path-to-video start-time end-time
I wouldn't want to complicate it any more than that though.
I'll add it to the list of possible enhancements.
PG
Re: GuideMe Scripting Engine
Posted: Mon Sep 21, 2015 4:20 pm
by Captnfappin
This is awesome!
How do I make a random metronome with the slideshows? I don't know what to do to make that happen.
Like during the slideshow. The metronome randomly switches tempo between each slide.
Re: GuideMe Scripting Engine
Posted: Tue Sep 22, 2015 7:54 am
by figroll
Captnfappin wrote:How do I make a random metronome with the slideshows? I don't know what to do to make that happen.
Like during the slideshow. The metronome randomly switches tempo between each slide.
I have the same problem. Specifically what I want to do is start a metronome, leave it playing and change the picture or text and process user clicks and so on. The best you can do, I think, is just start the metronome at the same pace on each page and it should be roughly in step.
Similarly I would also like to start an audio file playing and have the tease progress while that is playing.
I think this sort of thing is just a limitation of GuideMe which is inherently "page based"
Captnfappin wrote:This is awesome!
It is indeed.
Re: GuideMe Scripting Engine
Posted: Sat Oct 03, 2015 2:50 am
by PlayfulGuy
Captnfappin wrote:This is awesome!
How do I make a random metronome with the slideshows? I don't know what to do to make that happen.
Like during the slideshow. The metronome randomly switches tempo between each slide.
Sorry I haven't been by in a while. For the metronome (or the delay) you can specify a random one like
to get a random value from 30 to 60, but you'll get odd numbers like 31,37, etc.
To get a better result you can use RandomFrom or ChooseFrom.
You use ChooseFrom like this:
Code: Select all
image.jpg,,<Choosefrom 30,60,90> Page text
This will randomly choose one of the listed values. You can give more weight to some numbers by repeating them as in
Code: Select all
<Choosefrom 30,60,90,30,60,120,30>
With a list like that 30 is most likely to occur, then 60, then 90 and 120.
You can also use <Randomfrom 30,120,30> which will give you a random number from 30 to 120 in steps of 30, which results in one of 30, 60, 90 or 120.
<Randomfrom 30,120,15> will give you a random number from 30 to 120 in steps of 15, resulting in values like 30, 45, 60, 75 etc...
figroll wrote:
I have the same problem. Specifically what I want to do is start a metronome, leave it playing and change the picture or text and process user clicks and so on. The best you can do, I think, is just start the metronome at the same pace on each page and it should be roughly in step.
This you can do by setting the flag KeepMetronomes (requires the latest script engine version). With this flag set the metronome value is reused for every page until it's changed or turned off.
Code: Select all
set KeepMetronomes
Metronome 60
image01.jpg Page1 text
image02.jpg Page2 text
image03.jpg Page3 text
Metronome 30
image04.jpg Page4 text
image05.jpg Page5 text
With that code the first three pages get a metronome of 60, and the last two get 30. You can code the delay and metronome in the page command as usual
for a 10 second delay and metronome of 60. There is also a KeepDelays flag that does the same thing with delays. See the tutorial for more info.
figroll wrote:
Similarly I would also like to start an audio file playing and have the tease progress while that is playing.
I think this sort of thing is just a limitation of GuideMe which is inherently "page based"
Unfortunately you are correct on this one. The new version of GuideMe, which is in testing right now is supposed to allow you to set timers to make the page text change three or four times while keeping the same image, and I believe audio as well, but we won't know for sure until it's released.
I'm glad you're liking the engine so far.
Have fun!
PG
Re: GuideMe Scripting Engine
Posted: Fri Oct 16, 2015 3:34 am
by spdrmn55
Can you give me some information on how to use variables? Can I use a variable to set the delay or metronome? How do I change a variable? Like if I wanted to add 20 to my variable. Thanks I'm really enjoying the simplicity of writing a tease using this!