intfiction.org

The Interactive Fiction Community Forum
It is currently Sun Dec 17, 2017 6:10 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sun May 04, 2014 8:14 pm 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 1526
This topic is for discussions related to Vorple by Juhana Leinonen

_________________
BlogTextureVorple


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jun 03, 2014 7:21 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Juhana;

A while back, there was some indication that Vorple could, or would eventually, generate html buttons.
Is this now possible by using the html code embedding capabilities in the version released with the new Inform7?

If one can and you happen to have an example, it would really help me get going on my next project.

By the way; the Vorple-based game you advised me on took second place in the spring geocaching event. :D
I had a number of favourable comments on it.
Thanks, so much, for your help and patience.

Regards;
Gary


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jun 04, 2014 5:14 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 1526
Gary wrote:
A while back, there was some indication that Vorple could, or would eventually, generate html buttons.
Is this now possible by using the html code embedding capabilities in the version released with the new Inform7?

It's possible with Vorple Hyperlinks and some custom CSS styling, but out-of-the-box support is coming only in the next major version.

If you could show an example of where the buttons are used (in the story text or fixed in some position in the screen) I can make an example of a CSS file that does it.

Quote:
By the way; the Vorple-based game you advised me on took second place in the spring geocaching event. :D
I had a number of favourable comments on it.

That's great! Is it playable somewhere?

_________________
BlogTextureVorple


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jun 04, 2014 6:20 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Juhana;

As you know, I've been hoping to get that capability for some time.
Unfortunately; I don't have a particular example that I can post.
I'm just starting to write using the new Inform7 with Vorple.
If I can see an example of how to attack a simple case, I think I can extend that knowledge to whatever I settle upon.
Sorry to impose, but a generalized example of buttons would be really helpful!

I put out the adventure I noted it under the pseudonym, Raetsel Brueder.
It's a four stage puzzle.
I wrote the adventure, which is the first stage.
A fiend encoded the cipher which can be solved using the clues found during the adventure.
A field puzzle is located at the coordinates that one finds by decoding the cipher.
Solving the field puzzle allows one to find the final geocache.
All that said, many of the people loved the adventure, just for itself.
It's available to play online from the start page at: http://www.geocaching.com/geocache/GC4Z ... ce-is-ours


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jun 04, 2014 10:22 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Juhana;

Something odd is going on with the modal dialog boxes implementation.

The documentation, Chapter 4: Turn types, in this package appears to be incorrect for mark the current turn "normal";. The word "turn" appears not to be recognized by the "compiler". It does, however, recognize the word "action" instead of "turn". This was the word used in the previous version of Vorple. The other issue is that the "Ok" button on the actions marked as "dialog" does not seem to work and control is not returned to the adventure.

I traced the first issue to the extension code, which does not match the documentation and says:

Chapter 4 - Turn types

To mark the/-- current action (type - text):
execute JavaScript command "vorple.parser.setTurnType('[type]')".

For the second one, it looks as if marking an "say ..." as "dialog" and doing a "show notify" are equivalent. The difference is that the "Ok" button on the latter works. Did you actually mean to include the former in this release?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 05, 2014 4:36 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 1526
Gary wrote:
As you know, I've been hoping to get that capability for some time.
Unfortunately; I don't have a particular example that I can post.
I'm just starting to write using the new Inform7 with Vorple.
If I can see an example of how to attack a simple case, I think I can extend that knowledge to whatever I settle upon.
Sorry to impose, but a generalized example of buttons would be really helpful!

The reason I'm asking is that there is no generalized example; the solution depends on what kind of effect you're trying to achieve. The general idea is that you'd do this:

Code:
Include Vorple Hyperlinks by Juhana Leinonen.
Release along with the "Vorple" interpreter.
Release along with style sheet "buttons.css".

When play begins:
   say "Blah blah blah?";
   say line break;
   place a link to command "look" reading "Take a look around";
   say "    ";
   place a link to command "inventory" reading "Take inventory";
   say "    ";
   place a link to command "jump" reading "Jump".

...which would produce:

Code:
Blah blah blah?

Take a look around    Take inventory    Jump

...and the links would be styled to look like buttons and positioned according to the rules in the buttons.css file.

Now if you wanted the buttons to be visible on the page at all times, like as if they were on a status line or similar, then the procedure would be slightly different.

Quote:
The documentation, Chapter 4: Turn types, in this package appears to be incorrect for mark the current turn "normal";. The word "turn" appears not to be recognized by the "compiler". It does, however, recognize the word "action" instead of "turn". This was the word used in the previous version of Vorple. The other issue is that the "Ok" button on the actions marked as "dialog" does not seem to work and control is not returned to the adventure.

That's a documentation error and something wrong with the dialog turn style; I'll take a look.

Quote:
It's available to play online from the start page at: http://www.geocaching.com/geocache/GC4Z ... ce-is-ours

Thanks, I'll check it out!

_________________
BlogTextureVorple


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 05, 2014 1:26 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Thanks. Will wait for a post indicating it's fixed.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 05, 2014 3:52 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Juhana;

Quote:
Now if you wanted the buttons to be visible on the page at all times, like as if they were on a status line or similar, then the procedure would be slightly different.


Actually; putting the buttons on a static pane is pretty much what I'm trying to do. You did something very similar in an Undum-based example on your site. I'd like to put up a pane with buttons for at least the 4 cardinal compass points (and possibly the remaining four). Quest5 does something like what I want to do, but I don't want to use Quest5. I'm hoping that by seeing an example of the correct approach to implementing this with Vorple, I can make the specific implementation I need and maybe even extend it a bit more.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jun 06, 2014 8:16 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 1526
Sure, here's a rudimentary compass rose displayed in a sidebar.

Inform code:

Code:
Include Vorple Hyperlinks by Juhana Leinonen.
Release along with the "Vorple" interpreter.
Release along with style sheet "sidebar.css".

To display sidebar:
   open HTML tag "div" called "sidebuttons";
   place a link to command "northwest" reading "NW";
   place a link to command "north" reading "N";
   place a link to command "northeast" reading "NE";
   place a link to command "west" reading "W";
   place a link to command "look" reading "+";
   place a link to command "east" reading "E";
   place a link to command "southwest" reading "SW";
   place a link to command "south" reading "S";
   place a link to command "southeast" reading "SE";
   close HTML tag.
   
When play begins:
   display sidebar.


If you clear the screen at any point you'll have to redraw the sidebar, which is why I put it in a "to display sidebar" phrase.

Here's the sidebar.css that places the sidebar and styles the links to look like buttons. It's included also as an attachment, rename it to sidebar.css (the forum doesn't allow the .css file extension) and put it in the Materials folder. If you don't know CSS, you'll find a lot of references and tutorials online, for example here and more with Google.

Code:
.sidebuttons {  /* the container for the buttons */
    position: fixed;
    top:0;
    right:0;  /* change to left:0; if you want to show it left */
    width:200px;
    height:100%;
    background-color:white;
    padding:10px;
    text-align:center;
}

.sidebuttons a {     /* the buttons themselves */
    background-color:darkblue;
    color:white;
    font-family:sans-serif;
    padding:3px 5px;
    margin:5px;
    border:1px solid gray;
    box-shadow:1px 1px 1px gray;
    display:inline-block;
    width:40px;
}

body {  /* move the story text left so that the sidebar doesn't overlap it */
    padding-right:200px;  /* use padding-left instead if you moved the sidebar left */
}


Attachments:
File comment: Rename to sidebar.css and put in the project's materials folder
sidebar.css.txt [578 Bytes]
Downloaded 62 times

_________________
BlogTextureVorple
Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jun 06, 2014 7:20 pm 
Offline

Joined: Sat Jul 13, 2013 9:15 pm
Posts: 174
Juhana;

THANK YOU SO MUCH!!!
This is exactly what I've been wanting to do.
I really appreciate your taking the time to put together the example. :P


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group