Pataforest

Here is another experiment with html5 canvas, this time working with Lina Kusaite to try and bring some of the groworld illustrations to life. There is nothing particularly ground breaking happening at the moment, we are just testing some things. You might need to reload the page for it to work properly, I still have to figure out some caching issues:

In my last post I forgot to mention a very big reason why javascript is important – the fact that it’s very easy to access via the browser’s “view source” feature. It’s a pretty simple thing to take a site and modify it on your own machine with just a browser and a text editor. I wouldn’t be surprised if this is the most common entry point for new programmers at the moment.

Wilderness in html5 canvas

My exploration of web programming continues, this is a rewrite of the wilderness game world from haxe/flash into javascript and html5 canvas. There are some plans to make this into something more resembling an actual game, but at the moment it’s serving as a good test as I get to grips with these new fangled bits and pieces.

Leaving out all the hot air about small companies beginning with “A”, here are my thoughts on canvas for making games compared with haxe/flash:

Pros:

  • Javascript is much nicer for me than Haxe due to dynamic typing and it’s comparative closeness to Scheme.
  • Immediate mode for graphics allows you to draw a scene how you want with your own containers. The retained mode MovieClip object in Flash is an annoyance for me. Hopefully similar things happen in web graphics as it did in 3D with the early DirectX retained mode, which was eventually abandoned.
  • I’ve started using Chrome for development – the javascript debugger is one of the best I’ve come across, and the Firefox one is pretty good too. When using haxe/flash I ended up completely relying on print statements.
  • It’s nicer to develop in a normal webpage rather than a plugin.
  • Cons:

  • Canvas is currently much much slower than Flash. It’s quite possible I’m doing something stupid, but the canvas version uses about 40% of my processor where as the flash version is 5-10%.
  • Less built in support for text and user interface items like entry dialogs. There is probably much more missing along these lines, and much that will need to be implemented from scratch. Personally speaking I am not too fond of library frameworks implemented by architecture astronauts, so I can live with this at the moment.
  • Update: While I hope HTML5 is the future, it seems on some counts my optimism was premature, it seems it’s still to reach a point where it’s available for the majority of people – and where it is available, the stability and performance is variable. With this in mind : On flash, software art and freedom

    Scheme Bricks for Graphics

    Scheme bricks was originally designed as a visual programming interface for functional reactive programming using frisbee – an experimental fluxus based game engine built on top of PLT’s FrTime language. I’ve ended up spending the last 18 months beta testing it in livecoding performances with slub using fluxa, culminating in the workshop last week.

    This example is one of the “hello world” type scripts in fluxus, a recursive cube structure. It’s the first time I’ve tried this with scheme bricks. Having the interface in the same world as the rest of the objects opens up lots of possibilities, and enters the realm of IOhannes m zmölnig’s “do sinusoids dream of electric sweeps” performances in pure data – code could be written to modify the representation of itself.

    Higher priority though, is to spend some time on making the interface itself easier to use 🙂

    Build a World

    A self building text adventure game which starts off with an empty world:

    You build new places with “build my house n” (which means build my house to the north) then you can go there “n” and give it a description “describe a blue house with red doors”. You can also make objects with eg “make cheese” and take it (when it will be added to your inventory), move around and drop it elsewhere.

    If you type “dot” you get a text description of the world which can be read by graphviz. Here is part of my mental model of Helsinki:

    As it says in the embedded page, it’s very much inspired by Craig Latta’s quoth musical livecoding system, which uses an interface like this to create musical entities you can interact with.

    Scheme bricks workshop

    A picture from the livecoding workshop in Antwerp, the first time scheme bricks has been exposed to so many people. We covered various synthesis techniques, as well as introducing livecoding more generally. This has given me a lot of motivation to move this stuff further – I’m thinking of putting it in the fluxus distribution as an alternative livecoding option.