Sunday, 24 June 2012

Coding Practice: Staying Classy

There have been two EnCharter developments this weekend so far, one totally invisible to the user and one that is extremely useful to the user.

The invisible one is the change from having each stitch hardcoded as a very tenuous list structure to having a class called 'Stitch' which contains the name of the stitch and all the attributes, including the method of drawing it. This will eventually allow for the user to define their own stitches by how many loops go in and how many come out, so all my favourite crazy Estonian lace stitches will be representable. This class structure will also allow the automatic creation of stitch keys and technique descriptions when you make the final chart, all of which is terribly exciting. Oh, and I fixed the stitch logic checker so that it'll work again. Your lace will never come up short again!

The extremely useful change is that you can now export your  patterns as a pdf. This is something that I've been really wanting to get sorted so that I can start working on my other knitcoding project (Morphic: a fitted cardigan pattern distributed as software that generates a customised pattern based on user inputted measurements)

I could probably start letting people have a go at playing with EnCharter soon, so that I can see exactly how it is possible to break it.

ETA: Would you like to play with the current EnCharter alpha? I'm going to make it into an .exe so it can be distributed.

ETA2: Ok, so making EnCharter a single file executable for Windows or Mac isn't actually working at all well. In lieu of actually producing a playable alpha, I've added save and load functions and tried to do something about that damned resize bug. With limited effect.

No comments: