ImagePath

From Esolang
Jump to navigation Jump to search

ImagePath is an esoteric programming language created by Dominicentek for Truttle1's Visuals Esojam. It has a pointer that executes pixels in an image as instructions. Path is randomly chosen.

Path Choosing

When the pointer goes to another pixel, it chooses its direction and goes in that direction. It cannot go back where it came from. Black pixels act like walls, where the pointer cannot go. If there's no way to another pixel, it quits the program.

Instructions

Color Description
#00FF00 Acts as a starting point. If there are multiple, it chooses it's starting point randomly. If there's none, the program instantly quits.
#FF0000 Ending point. If the pointer reaches it, it quits the program.
#000000 A wall. The pointer cannot go there.
#0000XX Pushes a value of blue onto the stack
#FFFF00 Pops a value off the stack
#00F000 Reverses the stack
#000F00 Swaps top 2 values on the stack
#F0FF00 Outputs the top value of the stack as a number and pops it
#0FFF00 Outputs the top value of the stack as an ASCII character and pops it
#00FFFF Asks user for input
#7F7F7F Gateway. Once passed, it turns into a wall
#FF00FF If statement. If the top value is 0, it goes forward, otherwise it goes like normal. If blocked, the program quits. Value then gets popped.
#F0F000 Addition. Pops 2 values x and y, and pushes y + x
#F00F00 Subtraction. Pops 2 values x and y, and pushes y - x
#F000F0 Multiplication. Pops 2 values x and y, and pushes y * x
#F0000F Division. Pops 2 values x and y, and pushes y / x
#FF7FFF Pushes the amount of elements in the current stack to the stack.
#F000FF Oneway. Cannot go on it from top
#0F00FF Oneway. Cannot go on it from left
#00F0FF Oneway. Cannot go on it from bottom
#000FFF Oneway. Cannot go on it from right

Examples

Interpreter

  • None