Suggestions For Squiffy [Basically a petition]

pls comment suggestions you have for squiffy because if you dont know javascript you'll spend half your time on the forums xd


Hello.

I don't understand what you are requesting.


To improve and steamline Squiffy, I'd add:

  1. Random number generators
  2. Better controls on all screen/text/link colors
  3. Simple AND and OR operators in squiffy logic
  4. Some solid way to save game progress

Some solid way to save game progress

Squiffy automatically saves the story progress to the user's browser's local storage.

Does anyone like this? (I don't.)


Random number generators

Like this (but in Squiffy by default)?

[[start]]:
    squiffy.getRndInteger = function(min,max){
        return Math.floor(Math.random()*max)+min;
    };
Hello.

[[get a random integer]]


[[get a random integer]]:
    set("int", squiffy.getRndInteger(0,10));
Your random integer is: {int}.

[[get a random integer]]

Simple AND and OR operators in squiffy logic

That appears to be handled (or not handled) by the text processor function(s):

if
https://github.com/textadventures/squiffy/blob/master/squiffy.template.js#L429

else
https://github.com/textadventures/squiffy/blob/master/squiffy.template.js#L481


This post is not really any help to anyone. Just posting the information here to provide easy access to the code that handles such things.


Better controls on all screen/text/link colors

I'm not helping much with this post (again), but this requires modifying the CSS settings.

Squiffy's default CSS document:
https://github.com/textadventures/squiffy/blob/master/style.template.css


Maybe Squiffy could check for "special" sections like [[link-color]], [[text-color]], [[background-color]], etc.

No, wait...

@link_colour, @text_colour, @background_colour, etc.


Yes, there are ways to do all these (which you've shown) but these should be built in (as the initial post asked for). When I first read the squiffy documentation, I nearly turned my back on it - "No randomness," I thought. I want to write games that play differently every time (See my "StoreyMinus" for an example). However, I started asking questions on the forums and learning how to use JS code to fill in the gaps.

That said, random numbers, logical operators and color selection should be part of the basic package. You aught to be able to do this out of the box, and not have to learn a second language on top of the first.

And, let me also add that JS coding is dangerous in Squiffy. You can mess up your game fairly easily with a misplaced character in the JS code. So let me add another...

  1. Better JS error identification (i.e. line numbers) in the Squiffy editor.

Oh, no. I wasn't saying, "you can do that already." I was just making sure I was understanding exactly what you were saying should be added. (I'm not always on the same page as everyone else in the Squiffy forum. I don't have that much Squiffy experience. Hehehe.)

But yeah. . . if any of that code I posted is exactly what everyone thinks should be added to Squiffy, I will go on GitHub and create a pull request to add it to the next version of Squiffy.

...or, for stuff I'm not sure how to code, I'll create an Issue on GitHub, explaining what we want, why it should be included, and include my best attempt at how it could be coded.


I almost think I see how the logical operators work, but when I try to imagine what should be added to make things work as expected with else, and, and/or or, I go blank.

Same goes for JS error identification. I wouldn't even know where to begin with that one.

We have Javascript wizards around these here parts, though. Someone will probably come up with some awesome code soon.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums