BeFunge93 interpreter with grid visualisation, debugging tools and nyan cats animations
This project is a visual interpreter and debugger for the esoteric programming language Befunge93. While this interpreter is not the fastest, I believe it is easy to use for beginners. It also includes five built-in Nyan Cat animations as a fun stress-relief feature.
Check out the live version.
Languages:
- HTML5
- CSS3
- JS ES2018
Libraries and frameworks:
- LESS
- FontAwesome 6.4.0
- GoogleFonts
Programs:
- Interpretation of Befunge93 code programs
- Visualization of programs in a grid, stack, and interactive console
- Program controls:
- Load
- Execute
- Run
- Step
- Stop
- Breakpoints
- Settings:
- Speed
- Pointer and breakpoint colors
- Grid line visibility
- Information about the language and a table with instructions
- Support for multiple languages
- Example programs
- Nyan cat animations:
- Default Nyan Cat
- Gameboy Nyan Cat
- Rasta Nyan Cat
- Christmas Nyan Cat
- Mexican Nyan Cat
Note
Room for improvements:
- Instructions on how to use the webiste
- Editing the program directly on the grid
- Unlimited program grid size
- Zooming the grid in and out
- Moving the grid by mouse
- Highlighting the program path
- Skipping over empty cells
- Faster and parallel execution
- Challenges to help users learn the language
Ways to run this program:
- Use the live version
- Download this repository and run index.html file
- Download this repository and start live server (VSCode LiveServer Extension, Prepros preview etc.)
To edit this program:
- Download this repository
- Install Prepros
- Add this project in Prepros
- Start coding
- Befunge - esolangs wiki
- Befunge 93 documentation
- mikescher Project Euler with Befunge
- qiao visual befunge93 interpreter
- jsFunge IDE
- bedroomlan - befunge playground
The header section, from left to right, consists of:
- Title
- Language change button
- Nyan cat menu button
- Information button
- Instructions button
- Help button
Clicking on the language change button will toggle between Polish and English languages.
The Nyan cat menu has Nyan cat buttons that trigger the Nyan cat animation when clicked (check the Nyan cats section).
The Information button provides brief details about the Befunge language and example programs. Users can expand the examples to view the code and click the "copy code" button to copy it into the code textarea.
The Instructions button lists all commands used by the Befunge-93 language with brief descriptions.
- Settings at the top, where users can control colors, speed, and toggle the grid.
- A grid in the middle, where users can set breakpoints and track program execution.
- Control buttons at the bottom, where users can perform actions on the program.
Changing the settings has immediate effects.
The program data section contains:
- A code textarea where users write their code.
- A stack with real-time numbers representing values of the running program.
- A console where users can read output and provide input.
Selecting a Nyan cat from the menu triggers the animation. The grid lines are disabled for a clearer image.
Contact information is located in the footer. It contains details about me and possible ways to get in touch.
A contact form is provided as a Google Forms iframe because it’s the best free solution I could think of.
Users must provide:
- Purpose of contact
- Message
- Captcha code
Users can optionally provide:
- Rating of the project
- E-mail - in case a response is needed
- Name - to address them properly in case of a follow-up
- 📁 Befunge93Interpreter (project folder)
- 📄 github and prepros config files
- 📄 github readme file
- 📄 index.html and favicon.ico files
- 📁 _for_readme - 📄 files for readme
- 📁 js - 📄 scripts used in the project
- 📁 css
- 📄 css files compiled by prepros
- 📁 less - 📄 less files
- 📁 language
- 📁 en - 📄 files for english language
- 📁 pl - 📄 files for polish language
- 📁 nyan_cats
- 📄 nyan cat icon
- 📁 default - 📄 files for default nyan cat
- 📁 gameboy - 📄 files for gameboy nyan cat
- 📁 rasta - 📄 files for rasta nyan cat
- 📁 christmas - 📄 files for christmas nyan cat
- 📁 mexican - 📄 files for mexican nyan cat
Warning
Classes must be loaded from bottom to the top to avoid situation when class does not exist in the time of its objects creation