Saturday, February 15, 2025

🖥 "Spirographed" ellipses to create colorful circles

This sample program shows how to use DRAW to create ellipses (I like to call this a "spirographing" approach.

The program generates (in an animated way) a new circle every 2 seconds with a new random color palette of between 2 and 62 colors.









Friday, February 7, 2025

🖥 Geometric Thingy

This program is inspired by a little programming challenge by ZXDunny.

I wasn't in the mood to deal with math formulas, which would have made my program much more compact.  So I stuck with simple/mindless programming.

The program displays the image with new random colors every four seconds or so, and uses a little bit of very simple animation as the colors get changed.









🖥 Boogie Bots

This small program, based on an MSX program by VampierMSX (found 🔗 here on YouTube) demonstrates very simplistic character-based graphics animation.



Saturday, January 18, 2025

🖥 Fractals in Focus : A classic BASIC program with some new twists

This program is a port and mod of Steve Justice's program presented in the "Fractals in Focus" article found in the May 1985 issue of 80micro magazine.  (Available via  🔗 this Internet Archive link.)

Find all links for the BAM program after this foreword blurb.

One of my primary goals for BASIC Anywhere Machine: the ability to, without too much effort and too many headaches, bring to life some old BASIC programs from the 70's and 80's.

What's the point in being able to run those programs if you can't share them easily?  And there is another primary goal for BASIC Anywhere Machine: the ability to share such programs in a single and small HTML file, fully self-contained (I.e. no dependencies) and with a sole requirement of a modern Web browser (operating system agnostic, device agnostic) that doesn't even need to be connected to the web once that HTML file is on some local storage device.

I am a "tweaker" at heart (with BASIC programs the same as with food recipes.)  One of the things I really like about BASIC Anywhere Machine versus running these classic BASIC programs on old hardware or emulators of old hardware: I can easily get one of these old programs working in BAM (all of the smart original code left as-is!  GOTO's and all !), and then easily intertwingle the original code with some modern code that gives the old programs some snazzy new twists.

I've made the following modifications to Steve's program:

  • I've removed the code related to printing a fractal graphic; to copy or save an image, right-click on the image, and access your browser's copy/save functionality via the context menu
  • I've added a "C" option for inverted graphs:  "Y" will invert a graph, "C" will combine the non-inverted and inverted graphs, and any other value will (as per the original program) creates a non-inverted graph
  • I've limited the number of sides for a graph within the inclusive range of 3 to 20 sides
  • I've limited the number of levels for a graph within the inclusive range of 1 to 6 levels
  • Every graph will be, randomly, either a single random colors, or multi-color (a number of random colors equal to the number of levels)
  • I've setup an "auto-pilot" mode so the program behaves like a screen-saver; simply add a parameter to the program's URL:  ?autopilot=Y
  • I've setup the program to use screen mode 15 ( 64 colors, minus black which is the program's background color)
The BAM program :



















Saturday, January 11, 2025

📚 Common Programming Constructs / Concepts / Elements

For some reason, a direct link to the documentation page does not work when shared on some forums/dites (Facebook, for example), so access that documentation via this 🔗 this link which seems to work fine in Blogger.

I suspect some forums/sites do not shared links that have certain characters in URL query parameters.

The link will show the following in a new tab/window:


Wednesday, January 8, 2025

⚗ "Code Block" toolbar button to insert code blocks

Try it out the feature in the development version of BAM.


The buttons will wrap currently selected code with lines of code related to the code block.

If there isn't any code selected, then the current line (where the text cursor is located) will be wrapped by the lines of code related to the code block. 

Nothing fancy, just functional.









Tuesday, January 7, 2025

🖥 DRAW to generate the points for regular polygons

Drawing regular polygons is pretty easy when using DRAW to generate the points of the polygon, using specified coordinates for the center of the polygon and using a specified number of points for the polygon.

This program also demonstrates simple animation by rotating the polygon around the center, and loops endlessly (in increments of 1) from 3-point to 15-point polygons, increasing the number of points every loop of 360 degrees.



🖥 "Spirographed" ellipses to create colorful circles

This sample program shows how to use DRAW to create ellipses (I like to call this a "spirographing" approach. The program generate...