Conversation

Replying to
I was proud of the font rendering. I used freetype to trace vector outlines from truetype files, and render them as polygons in OpenGL. I thought maybe that was better than rotating and scaling textures. It was more fun, anyway.
"Hello world" rendered as vectors, showing the thickness of the letter strokes made by assembling triangle strips to form the complex shapes in a typeface.
A close up of the letters "hia" (in lowercase) with each triangle coloured differently. The triangles get denser for the curved parts of the letters. This particular font has a square for the dot above the letter "i", and so that's made from just two triangles.
1
52
I'm not sure why the beziers aren't placed correctly here, but it sure looks cool. This is why I don't make GUI stuff, see. I'm distracted with how interesting visual debugging is, and then never get to actually fixing the bugs.
Outlines of font rendering in 3D, showing visual debugging with control points for beziers. The control points are placed correctly, but the beziers all go down to the same location near the origin for each letter. The straight line segments are in the right places though. Good job, straight line segments.
2
65
Threads have state (indicated by colour); they're either pushing characters to their stack, or executing characters as instructions. Threads move in eight directions, bouncing off "mirrors". The "T" and "Y" instructions fork at 90° and 45° respectively. Here's a 2D Hello World.
Another isometric view, where we can see threads moving over the surface of a board, and growing and shrinking in height as their stacks change. Here there's a loop, and threads fork twice, giving a maximum of three concurrent threads for a moment, before they're gone. The program moves quickly; empty cells (serving as whitespace) are being skipped. It gives just the impression of activity without the specifics, in a vague "blinking lights" sort of way. But if we paused, we could probably figure out what this program does. (Well I can. 'cos I wrote it.)
GIF
1
49
The fun instructions are self-modifying, where a thread can write back out to the board, overwriting cells. Maybe you can see that happening here. You could write out code, and then go and execute it. It's very "code is data".
A progam with a thread running along horizontally. The thread grows in height at it reads "hello world" onto its stack, and then shrinks in height as the stack is popped incrementally and written out to adjacent cells. The thread turns a corner, runs back over the cells it just wrote to the board, and reads them back onto its stack. In the lower half of the screen, we see "hello world" output to stdout, directed to a terminal in a separate window.
GIF
2
39
As well as threads, some instructions move by themselves. These are automata; they move in the four cardinal directions, and bounce off instructions, pushing them along a square when they hit. Sort of like automated Sokoban.
1
28
So if you can imagine, you can use the self-modifying instructions to write automata to the board, and have those push instructions around to influence threads. I can't get automata working to show you with the rescued code right now, so you'll have to wait to see those, sorry.
1
27
The 3D debugger is fun to look at, but really quite impractical to use. I think you can better see what's going on with simple terminal output instead. Here's the same 2D hello world at before, but maybe this time you can see what's happening. Maybe.
A text rendering of the same 2D hello world we saw earlier, showing threads as cursors moving over characters in a terminal. Their stacks aren't visible here. They fork twice, read some data and output it; the output is visible at the bottom of the screen, reading "hello world". The program is of course more complicated than it needs to be, but it's awfully pretty.
GIF
2
56
Multi-dimensional languages like this are known as "funges", named after Befunge, which I think was the first. The Befunge FAQ says it has been described as "a cross between Forth and Lemmings."
2
46
My inspiration was a small block-pushing puzzle game called Kye, and that's also what I named my language. This is where the idea for the automata came from. Maybe you can see one moving vertically, incrementally pushing a yellow block upwards. It's a great game, go play it.
The first level of the puzzle game Kye. You're a small green ball in a world of pushable blocks, slow-moving monsters, and magnets. The objective is to collect all the diamonds, without trapping yourself in a corner. The only catch is that you can't push more than one block at a time.
GIF
7
61
Replying to
You're making me think back to github.com/aichallenge/ai now. Ants challenge was still the most fun I've had with programming. It was why I learned C++ to make far better use of the time they gave you. Multiplayer, simultaneous turn game where your code orders your ants around.
It would be pretty cool if someone revived this. It was super accessible to new programmers. It did some kind of ELO ranking / matchmaking. Pretty sad that it died off. Somewhat continued in spirit by stuff like the SC Brood War AI contests but was way more accessible than that.
1
1
Show replies