Sunday, January 03, 2016

Brainfuck tutorial

'' The idea behind brainfuck is memory manipulation. Basically you are given an array of 30,000 1byte memory blocks. The array size is actually dependent upon the implementation used in the compiler or interpretor, but standard brainfuck states 30,000. Within this array, you can increase the memory pointer, increase the value at the memory pointer, etc. Let me first present to you the 8 operators available to us. '' [source]

An interpreter in javascript.

And an interpreter for Android.

More variants of Brainfuck here.

A game in brainfuck (created via a version of Basic that compiles to brainfuck): here.
" The Lost Kingdom
(C) Jon Ripley 2004, 2005
BrainFuck Edition v0.11

Lost Kingdom is a conversion into Brainfuck of my game 'Lost Kingdom'
which won the First Annual Classic 2k Text Adventure Competition in 2004.
The original game was written in highly optimised BBC BASIC and was only
2.74Kb in size; this Brainfuck edition is significantly larger at 2.08Mb. "

And now for the big question:
- is there a version of Brainfuck that can be used to create interactive programs that are NOT turn-based? 
- or, if you like: is there a way to implement Conio-style kbhit in Brainfuck or one of its variants? Plus some simple text-graphics??

No comments:

Post a Comment