PixelNote uses its own, unique, built-in programming language. It's not much like any other language, although it takes influences from several.
PixelNote programs are made up of commands; each command either does something, like paint on the screen, or controls the commands after it, like making them loop. Commands are combined with “:” characters, and can be grouped with “(” and “)”. For example:
This runs the cls command (to clear the screen) and then the txt command (to draw some text), in that order.
This creates a small animation. The anim command is a control command; it collects the commands after it and controls them. In this case, it repeats them forever, using the variable n to hold the count (1, 2, 3, etc.), and animating the result. The disk command draws a filled-in circle; here, it takes the remainder of n divided by 40, so the circles expand from 1 to 39 then back to 0.
This runs the cls command to clear the screen, then runs a 10-step animated loop (from 1 to 10, inclusive), the clears the screen again (once).
Since the anim command is in parentheses, it doesn't apply to the second cls command, which is outside of them.
Variable and command names and separators
Command, variable, and function names are always alphabetic, using the English alphabet. PixelNote does not require spaces between letters, numbers, and symbols if it's clear what you mean. For example,
may be written as
without any change of meaning, since the only necessary spaces are those which separate letters.
Program names and comments
The way to name your programs in PixelNote is to end them with a # followed by the program's name. For example, the Touch Paint program in the included examples ends with #Touch Paint.
Other than using it as a name in the History listing, though, PixelNote ignores the # and everything after it. You can therefore also use this as a way to insert explanatory comments in your program, or to just "chop off" the last few commands while experimenting.
The screen, pixels, and colors
PixelNote presents you with a 101×101 square pixel "screen". Each pixel has an integer "pixel color" value ranging from 0 through 255. (You'll find a Color Numbers page in this reference guide.) You can set each pixel independently with the pix command; you can read the current value of each pixel with the corresponding pix(x,y) function, and you can draw shapes, lines, and text with various dedicated commands. You can even import pixelated versions of your photos, and apply effects to them.
Each pixel has an X and Y coordinate. Location (0,0) is the center of the screen; increasing X goes to the right and increasing Y goes up. (This is how coordinates work in math class, but if you're a programmer already, you may notice that it's not how it usually works in programming.) So the top left is at (-50,50), and the bottom right is at (50,-50).
If you'd like to use words instead of numbers, the symbols xmin, xmax, ymin, and ymax are defined, and are equal to -50, 50, -50, and 50, respectively.