Life lessons in Squiffy
Bluevoss
31 May 2016, 13:47Had a really close call with Squiffy last night. Been working on a big game, out to 1500 lines. Worked on it on and off over the weekend, just enjoying myself. Last night after dinner, I sat down with a bunch of new ideas I had and entered them in over two hours or so. New sections here, new sections there, additions to code all over the place.
Then I went to run it.
Syntax error.
Uh oh.
Fortunately, I remembered one line I didn't think would work. I went there, deleted it, hit run - the adventure started up. But that made me think - Since Squiffy doesn't identify failures by line number (or even the text of the line), it's probably a good idea to hit run every so often while developing just to make sure the thing works. In my case, if it hadn't been that line, I don't know what I would have done to find it. Probably delete section by section until it started up, just to find it.
Then I went to run it.
Syntax error.
Uh oh.
Fortunately, I remembered one line I didn't think would work. I went there, deleted it, hit run - the adventure started up. But that made me think - Since Squiffy doesn't identify failures by line number (or even the text of the line), it's probably a good idea to hit run every so often while developing just to make sure the thing works. In my case, if it hadn't been that line, I don't know what I would have done to find it. Probably delete section by section until it started up, just to find it.
Dennis Carlyle
31 May 2016, 16:00Don't forget that there is a command line version of Squiffy available. That shows error and warning messages by line #. It might be worth setting up that version as a 'backup' way of error checking, even if you don't use it normally.
Bluevoss wrote:Had a really close call with Squiffy last night. Been working on a big game, out to 1500 lines. Worked on it on and off over the weekend, just enjoying myself. Last night after dinner, I sat down with a bunch of new ideas I had and entered them in over two hours or so. New sections here, new sections there, additions to code all over the place.
Then I went to run it.
Syntax error.
Uh oh.
Fortunately, I remembered one line I didn't think would work. I went there, deleted it, hit run - the adventure started up. But that made me think - Since Squiffy doesn't identify failures by line number (or even the text of the line), it's probably a good idea to hit run every so often while developing just to make sure the thing works. In my case, if it hadn't been that line, I don't know what I would have done to find it. Probably delete section by section until it started up, just to find it.
Bluevoss
31 May 2016, 16:20Really? Where does one get it? I've downloaded the windows version. Looked around on the site. Where do you get it from?
That WOULD be a handy thing to have...
That WOULD be a handy thing to have...
Dennis Carlyle
31 May 2016, 16:32Bluevoss wrote:Really? Where does one get it? I've downloaded the windows version. Looked around on the site. Where do you get it from?
That WOULD be a handy thing to have...
There is a link on the main Squiffy documentation page, under "Using Squiffy".
http://docs.textadventures.co.uk/squiffy/
When it says you can edit your file in any text editor . . .
I actually use the Squiffy offline editor to edit and 'run' the script. But usually not to "build" the game for testing in a browser window. For that, I use the command line, with the "--scriptonly" command added at the end. ("squiffy myGame.squiffy --scriptonly"). That way, any changes I make to the HTML and CSS files are not overwritten with the defaults when the game file is compiled.