I haz a SpaceChem Mission Viewer

Well, that took a little longer than I anticipated. Anyway ...


One of the fun things about SpaceChem is that you can create your own missions and share them with others. For example, this is the one for my 'Fun With Water' mission.


Unfortunately, you can't really tell what the mission is about until you import it. This can be a little tricky if you're not behind a computer on which SpaceChem is installed, like when you're at work. Oh wait, not when you're at work, obviously – because that'd be wrong. But my point is that you can't see what the code does if you're not at your usual computer.

until now ….


Presenting: my web-based SpaceChem mission viewer :D


Continue reading

SpaceChem addendum : fun with ωater

I'm working on a little spacechem-related side project right now. Here's a small hint on what it's about.


If you're familiar with the researchNet editor, you will notice something isn't quite right here. :)

GCC 4.7 vs ARM assembly

In a recent bout of ‘They Changed It, Now It Sucks’, GCC 4.7 won't add interworking instructions to ARM assembly code unless you add a .type directive to the function boilerplate. Following some code from devkitARM 38 announcement:

    @ section directive goes here.
    @ code dirctive goes here.
    .align  2
    .global foo
    .type   foo STT_FUNC                @ Add this line right here
    @ etc

Though the change is simple, it does effectively mean that basically all older assembly code is now b0rked, including tonc and many of the ASM functions I've written about here. I hope I can assess the damage this weekend and fix everything.

UPDATE 2012-05-20

Had some time to work on this. When I first saw that I was going to have to do this, I though ‘Oh naw, I'm going to have to update every single ASM function I have?’ But then I noticed that I had already done so, more or less. One of the things I realized some time after the 1.4 release was that copy-pasting the standard boiler-plate code for ASM functions was stupid, so I created macros to do that instead. I was pleasantly surprised to see that I had already upgraded all tonclib functions with that macro, so all I had to do was add the single line in a single place and recompile. Fuck yeah, macros.

The only troublesome thing was that the inline ASM I used in swi_demo failed horrifically, so I just removed those.


The current status is that all the code's okay again, but the text parts still need to be updated.

Gaddammit, SpaceChem


So here I was, thinking I could have a nice and relaxing easter. But then the spacechem bug bit me again, so now I just have to write down some assignments to solve when AFK.

But I can stop anytime I want! Really!


Oh, I also found this on a penny-arcade thread:

this goddamned game. spend 20-40 minutes finishing a level and think "hey I'm pretty clever" only to load the next one and have the game kick you in the balls and whisper "nope, you're actually dumb as shit" in your ear while you're rolling on the ground

Yeah. That's pretty much sums it up.

SpaceChem tutorial : Fun With Water

1 Introduction

One of the great things about SpaceChem is that you're completely free in the approach to a solution, so you can let your creativity run wild. At the same time, one of the worst things about Spacechem is that you're completely free in the approach to a solution, so you have to let your creativity run wild. This means that, at first, you might have no idea where to start. And even if you do, the solution you come up with might be, well, let's be generous and say‘not exactly brilliant’. For that reason, I'd like to show a few common patterns that can serve as starting points for efficient solutions.


For this, I will use the assignment shown in SpaceChem's introduction video, where you use hydrogen (α) and oxygen (β) to create water (ω). This is ideal for two reasons. First, like any good introduction video, it shows the building process and what happens when a command is activated, so you should have some idea of how things work in this game. Second, it's also actually a terribly inefficient solution, so we can try to optimize it :).

Continue reading

Wet paint (this is not an instruction)

hhhyeah, I guess it's time to give this thing a new theme. Had the old style since, what, 2007 and drab gray is out, right? And now that IE6/7 are firmly on the way out, I can do nice CSS 2/3 effects like rounded borders and shadows and the like. Yay. For better or worse I also added ShareThis buttons, but as they're a little heavy on the javascript I might have to remove them from the frontpage later. I'll see how it goes.


I'm sure there will still be some CSS bugs here and there, but I think I've covered most of them.

Today's steam deal : SpaceChem

This is just a small head's up (I intend to do a larger discussion later) about one of the most awesome and geeky indie-games available at the moment: SpaceChem by Zachatronics Industries.


The basic premise behind SpaceChem is chemical engineering: in each assignment, you get some input molecules and you have to turn them into the requested output molecules via bonding and unbonding their atoms, and the occasional nuclear fusion. A simple (and decidedly sub-optimal) example:


The chemistry part is just a front, though. What the game really is, is a programming simulator. You have a tiny board (10×8) board with input and output zones and two 'waldos' that trace a path on which you place and execute instructions: basically a tiny dual-threaded CPU with a select instruction set. I know it sounds simple, and that's exactly right: it sounds simple. However, working out a workable design hard, VERY hard. Especially when you try to optimize a design for least time or components.

There are in-game leaderboards, showing you how much a design that you have toiled away at for hours actually sucks sweaty donkey balls, and a more detailed scoreboard at spacechem.net. You can also upload your solutions to youtube. Here's one of mine for “Gas Works Park”, where you turn some random carbon strings (C3 / C4) and water (H2O) and turn them into methane (CH4) and carbondioxide (CO2). Solution details can be found in the video description.


If you like programming and games (which probably describes readers here pretty well), you need to give this a try.

The Netherlands – FUCK YEAH!

Normally, I don't really do this kind of stuff, but …



Matchwinners for the Dutch: Robben, Sneijder, van Bronckhorst.

Holy crap, that was a tight game. First a beautiful goal by van Bronckhorst. Then the equalizer by Forlán just before the break. Then a hideous goal by not-Sneijder, but he gets the point anyway, quickly followed by Robben's header. And then in overtime they still almost manage to blow it when Pereira makes it 2–3 and then drama in the rest of the overtime! OMFGWTFBBQ!!111!!ELEVENTYONE!!!


Netherlands – Germany finals incoming!