Skip to content

BeFunge 93 interpreter with grid visualisation, debugging tools and nyan cats animations

Notifications You must be signed in to change notification settings

Pasek108/BeFunge93Interpreter

Repository files navigation

Befunge93Interpreter - Readme

BeFunge93 interpreter with grid visualisation, debugging tools and nyan cats animations


Table of Contents


Overview ✨

About

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.


preview

Technologies

Languages:

  • HTML5
  • CSS3
  • JS ES2018

Libraries and frameworks:

Programs:

Features

  • 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

Setup

Ways to run this program:

  1. Use the live version
  2. Download this repository and run index.html file
  3. 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

Acknowledgements


Details 📜

User interface

Header section

header section 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.

header nyan cat

The Nyan cat menu has Nyan cat buttons that trigger the Nyan cat animation when clicked (check the Nyan cats section).

header information 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.

header instructions The Instructions button lists all commands used by the Befunge-93 language with brief descriptions.

Program grid

program grid The program grid includes:

  • 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.

program grid breakpoints Changing the settings has immediate effects.

Program data

program data 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.

Nyan cats

Selecting a Nyan cat from the menu triggers the animation. The grid lines are disabled for a clearer image.

nyan cat default Default Nyan cat.

nyan cat gameboy Gameboy Nyan cat.

nyan cat rasta Rasta Nyan cat.

nyan cat christmas Christmas Nyan cat.

nyan cat mexican Mexican Nyan cat.

Contact

contact Contact information is located in the footer. It contains details about me and possible ways to get in touch.

contact form 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

Project structure

  • 📁 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

Code organization

program diagram

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

About

BeFunge 93 interpreter with grid visualisation, debugging tools and nyan cats animations

Topics

Resources

Stars

Watchers

Forks