Drawfuck

From Esolang
Jump to: navigation, search

Yet another brainfuck derivative, by User:Actuallyallama.

Rather than outputting ASCII characters, it outputs a 256x256 image. By default, the image is a blank white canvas.

It also has a few extra values: R, G, B, X, and Y.

Most of the commands are the same as brainfuck, with a few additional commands.

Command Description
r Set R to the current memory cell value.
g Set G to the current memory cell value.
b Set B to the current memory cell value.
x Set X to the current memory cell value.
y Set Y to the current memory cell value.
. Set the pixel at X,Y in the image to a new colour R,G,B.
n Subtract 1 from Y. (North)
s Add 1 to Y. (South)
e Add 1 to X. (East)
w Subtract 1 from X. (West)

Example:

   +[+>+[+r<gb>y.]<x]

will produce this output:

DrawfuckExample1.png