Tag Archives: Blockly

Truffle Blocks

A new project running here that brings together Germination X’s HTML5 game engine with Google’s Blockly in the spirit of Fluxus and particularly Scheme Bricks.

I’ve had a plan for working on a visual programming language for browser based games (and got someway to implementing Scheme Bricks with the Naked on Pluto art installation). Blockly has saved me a lot of time, and is inspired in turn by Scratch from MIT and it has some really nice additional tricks – like being able to add comments and collapse blocks. This is approaching the way I’d really like to be able to program these kinds of games, in terms of rapid prototyping but also one day perhaps full development.

Truffle Blocks is only a few days old and very proof of concept at the moment – the underlying game engine still needs a lot of work as it’s a port from the HaXE/flash version, and although it’s not been designed for this kind of programming it was pretty fast to get something fairly usable running.

Blockly is quite different from Scheme Bricks – which is very freeform but requires you to remember how the syntax works to build up more complex forms (as in Lispy dialects generally). Scratch and Blockly build a lot of this syntax information into the structure of their blocks, making it great for teaching programming. One of the things about Blockly which is going to be useful is the ability to modify blocks themselves in a similar editor – for example this screenshot of modifying the if block to include arbitrary numbers of elseif and a final else section:

All the source is hosted on gitorious here.