Brainfuck interpreter written in SAR's Config+ language for Portal 2.
To run a brainfuck program:
- Place
bf-interpreter.cfg
inPortal 2/portal2/cfg
. (or the equivalent folder for mods/p2common) - Ensure SAR is loaded. (
plugin_load sar
) - Initialise the interpreter with
exec bf-interpreter
ingame. - Run the program with
bf_exec <program>
. Note that user input syntax,
is not yet supported and will be skipped over in execution. Also note that programs greater than 247 characters long will be truncated, or 504 if thebf_exec
is inside a.cfg
that isexec
'd. This is unavoidable with current technology.
You can modify the speed at which the program is executed by running svar_set __bf_delay <ticks>
where each tick is 1/60 of a second.
A delay of 0 will run the entire program immediately.
Hello World:
bf_exec ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.