Ticky Tacky

Ticky Tacky

Player Instructions

Use the arrow keys and space bar to play and explore. You'll need Flash Player 10 or above installed for this to work.

Developer Instructions

Press F4. Surprise! This is the code for the game you're currently playing. It's written in Lua and executed viato lua-alchemy. Hit F5 at any time to reload the code without restarting the game (which is great for tweaking constants), or hit F6 to reload and reinitialize.


Global variables up, down, left, right, and fire are all set to 0 or 1 to express keyboard state. init() is called when the game starts, and update( delta ) is called every frame with delta containing the time since last update in seconds.


draw( hue, saturation, value, x, y, width, height )
Draw a rectangle on the screen. The screen is cleared each frame so you'll need to do this in the update loop. Colour is specified via hue, saturation, and value, all of which are values in the range 0..1. hue may actually be outside this range, and will wrap automatically. The screen is 300x200 units in size, with the coordinate 0,0 denoting the center of the screen. Note also that the draw function draws a rectangle centered around x and y. This takes some getting used to but I find it simplifies most layout operations.

beep( note, volume, pan, delay )
Play a short beep sound. note is in semitones, ranging from -12 to 24. volume is in the range 0..1, and pan is in screen x coordinates (-150..150). Delay is in 20ths of a second, and can be used to concatenate beeps for more expressive effects.

goto( title, prompt, door, url )
Unload the current game and load another from anywhere on the web. title should be the title of the game, used to distinguish between multiple games hosted on the same page. prompt is the message shown to the player as the new game loads. door is a string made available to the new game as a global variable. This lets the new game know where the player has come from. url is the url where the game is hosted. If goto() fails it will reload the current game but still supply the new door value.


To share your game, make sure you've specified the game title and the url where you intend to host it at the top left of the editor. Hit F7 to export to your clipboard, then paste the contents of your clipboard into a web page (eg a blog, forum, or empty page). The pasted data should include a link back to TickyTacky which will load your game. Share and enjoy!

Site and contents © 2009 Farbs