Ember is discontinued. It still works, but it gets no more updates or support. Back to uayi.org
Home · Terrified Gorillas · Glimmerwood · Starfall Hollow · ‹ Prev Next ›
Ember
Download

Scripting

Blocks

Blocks work like Scratch, made easier: snap them together and every stack reads as a sentence. They compile to Lua, so blocks and scripts mix freely in one game.

Open the editor with Code > Blocks Editor, Inspector > Add Component > Blocks, or Make it do something! in Easy mode. Block files are .blocks.

The library

There are 428 blocks in 9 categories, each with a search box and drop-downs for every choice:

Category Blocks Examples
Motion 58 Keep moving me with the keys · Keep driving me like a car · Make the camera follow me
Sensing 54 touching what? · key held down? · can I see object? · on the ground?
Events 53 When the game starts · When key is pressed · When I touch what · When I land on the ground
Looks 53 Say text for n seconds · Shout text · Show text on the screen
Math 53 random a to b · remainder of a / b · comparisons and variables
Game 51 Add n to the score · Lose a life · win / lose the game · spawn · timers
Sound 51 Play sound sound · at a random pitch · Play the fx effect · music and volume
Control 50 Wait n seconds · Wait until I touch what · repeat · forever · if / otherwise
My Blocks 5 + yours blocks you make with Make a Block

52 ready-made behaviours fill a script in one click: Player, Car, Tank, Coin, Enemy, Patrol enemy, Turret, Boss, Moving platform, Elevator, Jump pad, Door, Locked door, Key, Teleporter, Checkpoint, Treasure chest, Day and night, Countdown and more.

Make a Block

Make a Block turns a stack into your own block, with inputs. Any script in the project can call it, and a reporter version returns a value. Packages and projects can add whole categories as JSON files in blocks/.

Write it in words

In the Blocks editor, Write it in words turns English into blocks:

When space is pressed, jump 3 high and play the jump effect.
Every 2 seconds, if the score is more than 10, say "Great!" for 1 second, otherwise move forward 2 steps.
Set coins to 0. When I touch a Coin, change coins by 1. If coins is at least 5, win the game.
To dance with steps: spin around once and move forward steps steps. When this is clicked, dance 3 times.

It can be inaccurate. It may choose the wrong block, number or object, or miss part of a sentence, so check the blocks before you play:

It runs offline with fixed rules (no AI service, no internet), so the same sentence always gives the same blocks. It understands number words ("two and a half", "twice"), units (ms, minutes, cm, %), events ("when…", "every…", "after…"), loops ("repeat 3 times", "forever", "until"), conditions ("if lives are less than 1… otherwise…", and / or / not), chances ("a 20% chance to…"), variables ("set coins to 0") and your own blocks ("To NAME with A and B: …").

On 37 test sentences it understood 115 of 117 steps. The two misses ("the door opens slowly" and a nonsense line) became Note blocks.

Ember 1.1 documentation. Found a mistake? The source of this page is site/docs/blocks.md in the Ember source.