Random posts

PIGS IN SPACE

pigspace2.jpg
Game File: 

testing out my shiny new c++ opengl engine
last time i checked it works on win xp, 7, 8, and 10
but i wanted to double-check

Author: 
pigs
Made For: 
An event
Isaac's picture

SPACE ZEPPELIN ADVENTURE

I finally sucked it up and threw something together in Klik-n-play. It taught me a few things about the software, so hopefully it won't be such a painful process in the future.
It's three levels of action-packed space genocide with a zeppelin storyline and a real twist at the end.

So here it is: THE DOWNLOAD.

Survive for 10 seconds

straw.PNG
Game File: 

Just try.

Made For: 
Pirate Kart 2

Save The Pandas!

savethepandas.png

Save the pandas! Save the pandas! SAVE THE PANDAS!!!

Author: 
BentoSmile
Made For: 
An event
Architectural Diagram's picture

Reflexive (Interaction Poem IV)

Reflexive Cover Photo.png

"Reflexive (Interaction Poem IV) demonstrates how a hyperlink doesn't have to 'link' to anything to provide conceptual information."

Author: 
Architectural Diagram
Made For: 
testing
colincapurso's picture

COOOOOINZ

Screenshot.png

A side scrolling action game. Collect as many coins as you can! Challenge your friends!

Controls
WASD or Arrows or Thumbstick (Gamepad) to MOVE
Space or Button A (Gamepad) to JUMP

-= These are required to play =-
COOOOOINZ.zip
Includes Setup file

-= These are required to play =-
COOOOOIZ_StandAlone.zip
The .NET Framework 4.0 Redistributable
The XNA Framework Redistributable 4.0 Refresh

Soundtrack written and played by Sam Wilksch.

Author: 
Colin Capurso
Made For: 
An event

Twine code shortcuts, tips and unconventional operators

Since everyone has read my summary of Twine's built-in macros, you'll notice that many other JavaScript operators can be used in the <<set>>, <<remember>>, <<if>> and <<print>> macros. Here is an incomplete list of a few that you may find useful. Many of these are not as "tidy" as the documented operators, and some of them are counterintuitive in their meaning. You can still use them, though, if you so wish.

Note: No greater-than signs

Before we begin, a quick reminder: the greater-than sign can't be used inside a valid macro tag - the macro will not be recognised. That's why the "gt" and "gte" operators are provided to you instead.

Setting multiple variables in one <<set>>

You can set multiple variables in a <<set>> macro if you separate their equations with a semicolon:

<<set $green = "Rice" ; $gold = "Cheese" ; $ammo = 14; $score = 0 >>

Note: you should not do this using <<remember>>: the macro only remembers the first $variable used in it.

Modifying a number variable: +=, -=, *=, /=

A commonly known programming shorthand for arithmetic operations is available. Instead of writing <<set $strength = $strength - 1>> you can just write

<<set $strength -= 1>>

This sets $strength to itself, minus 1. The other operators +=, *=, /= also work for their respective arithmetic. These can only be used in situations where the = sign would normally be used.

(Do not accidentally write <<set $strength =- 1>>, because that will set $strength to -1. The arithmetic operator goes before the equals sign.)

The ternary operator ( ? : )

The ternary operator can be used as a condensed, specific version of <<if>> <<else>> <<endif>>. Whenever a statement calls for a value, you could instead put ( [an if-macro condition] ? [a value if the condition is true] : [a value if the condition is false] ).

<<print ($ammo gt 4 ? "Ammo OK" : "Ammo low" )>>

The above line prints "Ammo OK" if $ammo is greater than 4, and "Ammo low" otherwise. If you want to make things much less readable and comprehensible, you can nest ternaries in each other:

<<print ($ammo gt 4 ? ($ammo gt 16 ? "Ammo oversupplied" : "Ammo OK") : "Ammo low" )>>

If $ammo exceeds 4, then the value of the inner ternary is printed. You can also rewrite it like this, which is slightly more readable:

<<print ($ammo gt 16? : "Ammo oversupplied" : ($ammo gt 4 ? "Ammo OK" : "Ammo low" )>>

Show all the game's variables for debug purposes

All the story variables are accessible in the JavaScript object "state.history[0].variables".

This line of code will print the variables that have currently been set:
<<print JSON.stringify(state.history[0].variables)>>

This will print something like the following:
{"meal":"Rice","snack":"Cheese","ammo":14,"score":0}
As you can see, it features pairs of values - the variable name, followed by a colon, followed by the value of the variable.

Internal links using string variables

Pointed out by one HarmlessTrouble: the <<print>> macro, if given a string containing wiki markup, will render the markup when printing it. This means that you can generate an internal link that uses string variables for its data, just by doing something like this:

<<print "[[" + $passage + "]]">>
<<print "[[" + $label + "|" + $passage + "]]">>

Remarkable! Of course, due to the No Greater-Than Signs rule, you can't do this with the <<choice>> macro, the <<display>> macro, or any macro at all.

Creating an internal link inside HTML blocks

You can do this like so:

<a href='javascript:void(0)' onclick='state.display("PassageName")' class='internalLink'>Link text</a>

PassageName is the name of the passage. You need to give it the class "internalLink" if you want the standard CSS to be applied to the link.

Alternative to the <<display>> macro that can use string variables

Since <<display>> doesn't interpret its parameter as code, you can't, for instance, specify a passage name inside a variable. Hopefully this will be fixed at some point, but until then, here's an alternative you can use right now:

<<print tale.get($variable).text>>

$variable can be any statement or valid series of operations, as long as it equals the name of one of your passages:

<<print tale.get($hp eq 0 ? "DeathEnd" : $race + "Ending").text>>

Of course, it'd be much better if you could just fix <<display>> so that you can use code in it.

Accessing information about the current passage

This could be useful if, for instance, you use <<display>> a lot, and want the displayed passage to know something about whatever's displaying it.

The JavaScript object corresponding to the current passage is accessible in state.history[0].passage. If you want to, for instance, get the title of the current passage, try:

<<set $title = state.history[0].passage.title >>

All of the tags are in the array state.history[0].passage.tags. You can use the array syntax to access them (but I do not recommend modifying them). To see if the current passage has a tag, try:

<<set $hasTheTag = (state.history[0].passage.tags.indexOf("tag") gte 0) >>

Putting non-printed space between macros

You can use the TiddlyWiki comment markers /% and %/ to prevent whatever is inside them from being printed or run. You can use this to give large blocks of macros some breathing room without having to use a <<silently>> macro.

<<set $red = 1>>/%
%/<<if $green gt 4>>/%
%/<<set $blue += 2>>/%
%/<<remember $white = 2>>/%
%/<<endif>>/%
%/Some actual passage text...

Son of a dolphin's picture

my first flash cartoon made with stencyl

falling frame 4.png

this isn't a game, but it was made with stencyl, so maybe it sorta kinda counts? i've never made a cartoon, i wanted to try to do a little one. this is sorta close to what i intended. i don't know if i'll make more of these with stencyl, but i probably will make more cartoons. i probably won't put any more here because this is for games, i guess

Made For: 
An event

Shikieiki Moon Judgement Party

shikieiki.PNG
Game File: 

Help Eirin and Reisen save the pregnant Kaguya from the wrath of Shikieiki's judgement burgers!

Made For: 
Pirate Kart 2
Syndicate content
pensive-mosquitoes