Random posts

Twine: escape line breaks with backslashes

Update: The Javascript on this page is now built into Twine 1.4! It is no longer necessary to install it.

As you know, one of the most prominent difficulties with mixing code and prose in Twine games is the handling of line breaks. If you have a bunch of macros interspersed in your prose, especially <<if>> macros, then the temptation is to leave them on separate lines from the text, for readability. However, the line breaks adjacent to these macros end up appearing in the rendered passage.

The <<silently>> macro is the 'official' solution...

<<silently>>
<<set $hp -= 1>>
<<set $dead = true>>
<<endsilently>>
Wrap up all of the macros in it and the line breaks will be suppressed. But, it seems to me to be a half-effective solution, requiring two large macro tags enclosing each block, and disallowing <<print>> macros within it.

I've previously advocated a different solution, involving the TiddlyWiki comment syntax:

/%
%/<<set $hp -= 1>>/%
%/<<set $dead = true>>/%
%/
This has the advantage of allowing the use of <<print>> macros. But it, too, is authorially and visually unwieldy, requiring both the end and beginning of lines to be tagged with one of two similar-looking tags.

However, I believe it's on the right track. Right now, my proposal is to directly borrow the syntax of the C language's preprocessor - a single backslash at the end of a line suppresses the line break:

<<set $hp -= 1>>\
<<set $dead = true>>\
You are \
<<if $hp gt 1>>
hale
<<else>>
almost dead
<<endif>>.
In my opinion, this has much more convenience compared to the other two.
Here is the script code to enable this in your stories:

Obsolete script removed: use Twine 1.4

To recap, when you install this script:

  1. A line that reads:
    You have \
    twenty dollars.
    ...will be rendered as "You have twenty dollars."
  2. A line that reads:
    You have \
    <<set $cash = "twenty">>\
    <<print $cash>>\
    dollars.
    ...will be rendered as "You have twenty dollars."

Feel free to report any bugs to @webbedspace.

Draknek's picture

Shit Snake 2: Shit Harder

screenshot.png

Blergh, not complete but not sure when I'll get the time to fix all the issues I have with it.

Made For: 
An event

Video Game Anomalies

chubgam.png

so I recently stumbled upon some youtube video and it got me thinking..
thinking about stupid stuff that is so this will be just a ramble mostly
feel free to ignore it

I sort of remember searching for FPS games or list of FPS games and somehow
Chub Gam 3-D and Red Babe usually found their ways onto these lists
and I mean among the big ones like hanging out with Doom and Duke3D
the greats there was usually Chub Gam for some reason
and i'm not sure why it was selected among the many other GCS games
but to this day you can find it on wikipedia, it seems to be everywhere
(I wouldn't be surprised if congress has a floppy of Chub Gam for being
culturally significant)

and I'm not pro or against Chub Gam it's just strange to me how it seems
to be everywhere .. maybe it's just me

another similar anomaly is that at a time I remember nearly every game
developer interviews mentioned that the guy or gal has worked on
Project Gotham Racing in the past in some sort of role
so it was just like some random game and they would mention
XY or so and so has previously on the team for Project Gotham Racing
apparently everyone and their dog has worked on Project Gotham Racing
which also has nothing to do with batman it's some sort of other Gotham
i'm not exactly sure about that part

other similar anomalies:
- whenever Tim Curry appears on a talk show he always gets introduced
as the guy from Rocky Horror Picture Show (despite being on hundreds of other
projects, movies, tv shows, games whatever since then)

- Mega Man always ends up as called the "Blue Bomber" and it makes no sense
afaik the games didn't bomb and he is not using bombs in the games
I mean he is not exactly bomberman who literally uses bombs

Has anyone experienced or remember any similar things?

Extreme Fishing

3093-shot1.png

Insane fishing action! Kill fishes and get meat, but be careful with hazardous obstacles! Can you get enough meat to satisfy Poseidon and reach the top on the online highscores?

- Online highscores! Register your name as the deadliest fisherman in the world!
- Punk Piranhas! Gentlefishes! Spartan Swordfishes! EIGHT different kinds of fishes to hunt down!
- Use harpoons, torpedoes and even LASERS! A total of 31 COMBOS!

Author: 
Leonardo Millan & João Zanini
Made For: 
An event
sergiocornaga's picture

Sergio Cornaga, Procrastinator: 2017 Edition

scp2017.png
Game File: 

The contemporary remaster of Sergio Cornaga, Procrastinator that the fans demanded.

Background animations by Bees & Bombs.
Sound sampled from chibi-tech - Neuromageddon (arthur x medic remix).
Submitted jointly and belatedly to Slice of Life 2017.

Use the arrow keys to move... to the eXtreme.

Made For: 
An event
kirkjerk's picture

robotish

robotish.png
Game File: 

you are a robot surrounded by hostile blue headed robot. You can drop mines to dsestroy your evil brethren, but once the mines are armed they are as dangerous to you as you are to them.

Made For: 
An event

Naked Forest Walk

nakedforestwalk.png

A nature-walking simulation. Experience the wonders of a simulated outdoor environment, free of the mental clutter of actual productive life. Maybe, by being unencumbered and unclothed both figuratively and literally, you will discover something new about the world that you hadn't noticed until now?

Arrows - walk left and right. You will randomly have epiphanies as you walk.

Hold down the D, R, U and G keys to take the drugs you brought, 'just in case you get bored'.

Event Created For: 
Made For: 
An event
Smedis2's picture

BOG ROGS

BOG ROGS.png
Game File: 

use arrow key to move
keep going forward to win
please disregard any bugs

Event Created For: 
Made For: 
An event
boxedlunch's picture

A SAD LACK OF BULLETS

gameaboutbulletsscreen.png
Game File: 

I made a game about fighting other people in the desert with guns with only one bullet in each of your guns.

First Player to shoot the other wins. Fireworks give you your one bullet back.

Event Created For: 
Made For: 
An event
Kate B's picture

Flamingo Quest

flamingo28.png
Game File: 

A story about a Flamingo I know

Flamingo Quest follows a girl raised by flamingos. Set in the Top Secret Neon Pink Planet universe but you don't need to read any external material to understand this

Made For: 
An event
Syndicate content