Outils pour utilisateurs

Outils du site


issue151:jeux_ubuntu

Ceci est une ancienne révision du document !


Website: http://textadventures.co.uk/squiffy Documentation: http://docs.textadventures.co.uk/squiffy/ Version: 5.1.2

Did you ever read those “choose your own adventure” books when you were a kid? Do you still read those types of books, because it gives you a bit more freedom to interact with your fiction? Then today you are in luck. I want to introduce you to Squiffy. If you have no idea what we are talking about, please buckle up for a most pleasurable ride. (Those of you who just enjoy adventures also don't go away! ).

I will explain the basics of Squiffy, then make things more interesting. Squiffy has its own “programming language”, squiffy script - when I say this, don't immediately switch off. There is but three things you need to remember, they are:

Cheat Sheet:

• Sections are in double square brackets with a colon jeux_ubuntu: • Paragraphs (passages) are in single square brackets with a colon [ ]: • Links are in double square brackets or parentheses without a colon jeux_ubuntu and/or ( )

The difference between two and three on our cheat sheet is that one takes away your other options if you choose it. You don't want someone to pick up a rope after they have 'died'!

Squiffy can be used on-line and off-line. The on-line version runs right in your browser, so you can start immediately. As you can see by our 'cheat sheet', the entry level to Squiffy is very low, so anyone can make a piece of interactive fiction or even a game. Yes, I said game, but unlike traditional text adventures, you do not need to type “north”, “south” or “dig”. You can provide these with squiffy script and they are presented as hyperlinks. This removes the guesswork and helps move your story or game along. Your interactive fiction can have multiple paths and thus multiple endings, or just one path, where all the incorrect decisions will kill you. ( Could be fun! ). You can make a 'capture the flag' game or whatever you like, the limits are your imagination!

You can download Squiffy for Linux, extract the archive and set execution permissions on the Squiffy binary. This will allow you to run Squiffy off-line. When you run it, you will see a similar interface to the browser. It seems to be an electron app, so it may not open immediately, the wait can be mitigated with the installation of readahead on an Ubuntu system.

The ribbon menu has the standard “file”, “edit”, “view” and “help”, as well as a “build” drop-down. Yet the buttons are accessible from within the program also - “open”, “save”, “run”, “settings” and “build”. The editor is broken into two halves, with your “code” on the left and the “output” on the right, see initial image:

Compare this initial screen (left) to our cheat sheet.

Do you want to dive right in and play? Go ahead! Those of you who feel a little afraid, dive in with us! Yes, in Full Circle Magazine we do not just tell you about something and leave you hanging!: • Click File → New, and your left pane will turn blank. • Enter the following: Start: {and press enter / return}

The text should turn green to show you that Squiffy understood your command. This is a section. You may think of it as a chapter in a book, only you can link to it from elsewhere. Okay, now type away at your first chapter. Can't think of anything? How about a de-make of your favourite game? Become your favourite character in your favourite book. Keep asking yourself - “and then what happened?” - every time you get stuck.

The first trick of writing interactive fiction is to make your reader part of the action, so the reader becomes the protagonist - works for games too.

The second trick is when your character / reader comes to an action - verb even, you can now split your story. Does she make a fire at night, or get eaten by a Grue? Does he go to Paris to meet his contact, or St Petersburg? I suggest keeping a piece of paper handy to draw your branches on, keeping it all straight in one's head can be difficult. Mind maps are good too!

The third trick is to write your text in something with a spell-checker. Squiffy does not have one of those, then copy / paste your text into Squiffy.

I will go first. Excuse the lame story, it is for illustration only. This is my 'code'. (the left side of Squiffy). Followed by my output. (right side of Squiffy)

As you can see, it is basically a WYSIWYG editor. Let us examine the branches.

Our first branch is:

Do you fly to Ankara(Ankara)

When we use double square brackets, without a colon at the end, it becomes an option. I say option as it provides options in your interactive fiction and passage does not really describe what it does.

The name in parenthesis must match your variable name in your next section. Yes, sections / choices are treated as variables, so watch the spelling of your section names.

If I left off the “(Ankara)” bit, my next linked section needs to have a name that matches my question, ie. Do you fly to Ankara: - So, using the brackets is a nice way to keep variable names short. Look at the second branch to see what I mean. Now if I had chosen more info, I may still have the option to go to Ankara from there, even though the next piece of text may read “fly to your previously planned destination”.

Okay, you may also have noticed that it is not 100% WYSIWYG. It did not put a new line where you entered an extra line on the left. That is because Squiffy supports basic HTML. If you need a line-break, simply add <br> after your line of text. Any word in a sentence that you enclose in double brackets will also be links. However, this is a bad idea. Using common words as links opens you up to repetition, as multiple links(references) to the same variable name - Squiffy will just choose the first option. A link [down] in section one and a link down in section three of your fiction will always point to the first one Squiffy can find.

That's it for now! Please create an interactive fiction and send it to us for some creative cred!

Quick dirty info on HTML: http://www.simplehtmlguide.com/cheatsheet.php

Next issue, we will make it even more interesting with more advanced features!

Should you have any questions, please find me (EriktheUnready) on the official FCM telegram group, or email questions@fullcirclemagazine.org

issue151/jeux_ubuntu.1575118506.txt.gz · Dernière modification : 2019/11/30 13:55 de auntiee