Showing posts with label Program. Show all posts
Showing posts with label Program. Show all posts

Sunday, August 10, 2025

๐Ÿ–ฅ Ardi's Graph

A port and mod of a program shared by Ardi Ardi with the "BASIC Programming Language" Facebook group via this post.

This program seems to have some history, with other versions floating around (called "halftone2" ?) over the years.  For example, here's a SpecBAS version by ZXDunny.  The original version of this program may have been authored by Uwe Grelken.




Friday, July 18, 2025

๐Ÿ–ฅ Keijzer Graph

This program is a port and mod of a PC-BASIC program by Richard Keijzer shared with the "BASIC Programming Language" Facebook group.

Although the PC-BASIC program worked in BAM as-is, I made some additions/changes to suit my fondness for animated creation of graphs and for random colours.

Wednesday, July 16, 2025

๐Ÿ–ฅ Guillermo's Graph (Apple II BASIC to BAM port)

This program is a port (and very slight mod) of an Apple II program, shared by Guillermo Ibรกรฑez with the "BASIC Programming Language" Facebook group (๐Ÿ”— to post).

As always, these types of simple (yet very interesting) graphics from classic BASIC dialects are fun to get working with BAM for export as stand-alone programs that work in Web browsers.  What better way to give these old programs a new lease on life by making them easy to share with folk: people just need to have a modern Web browser.  The device doesn't matter, and the operating system does not matter, and no software (other than the web browser) is needed.



Sunday, July 13, 2025

๐Ÿ–ฅ Graphics to ASCII Graphics

This funny thought, from absolutely nowhere, grabbed me firmly by the jugular: how would I go about converting graphics created with graphics statements to ASCII graphics?

Here's how I decided to go about it:

Friday, July 4, 2025

๐Ÿ–ฅ Fireworks

This program is a port and mod of an Apple II program by Lee Fastenau as shared on the APPLE II PROGRAMS website.

I am a sucker for the "old-school" charm of graphics programs created with BASIC dialects of the 70's and 80's.

This APPLE II program is a gem: simple code that does something interesting.  I find it a whole bunch of fun to take this kind of program and tweak it with some easy enhancements, the kind I wish had been available back in the late 70's and early 80's on my home computers.

BASIC Anywhere Machine program:

Wednesday, July 2, 2025

๐Ÿ–ฅ Digital Clock

This program is a port and mod of Antoni Gual Via's program shared with the "BASIC, QBasic, GWBasic computer programming"' Facebook group.

Below:
  • About the program
  • How to set an LED colour preference
  • How to embed the clock in a Web page
  • How to download the clock to run locally or host it on your own website

About the program

Antoni Gual Via created with QBasic a "digital 7 segment clock using only DRAW."  I've made some  changes to placate my fussy nature and a little addition:

  • I've filled in the segments (using PAINT, because BAM's DRAW statement does not support the "p" (paint) command
  • I'm using screen mode 17 instead of screen mode 12 (for the LED: access to 63 predefined colors, instead of only 15 colors; black is reserved for the clock background colour)
    • I'm also using a custom screen resolution
  • I've also modified the program to check the URL for a "color" query string which can be used to customize the colour of the clock LED lights.


How to set an LED colour preference

This program has been exported from BASIC Anywhere Machine as a "Stand-Alone" program.  It is a small HTML file that contains the source code "bound" to the BASIC-to-javascript transpiler (BAM's built-in fork of wwwBASIC.)  That HTML file can then exist anywhere: on a local storage device for running offline, on a static web server for running as a stand-alone Web Page, or on a Web server for inclusion (as a "gadget?") into any other Web page or Web site.

To use a colour other than the default, add a "color" parameter to the URL.

For example, using the program I have hosted on my Neocities site:
  • The URL for the program without specifying a colour preference
    • https://basicanywheremachine.neocities.org/sample_programs/DRAW%20DIGITAL%20CLOCK.prod.run
  • The URL for the program with a colour preference specified
    • https://basicanywheremachine.neocities.org/sample_programs/DRAW%20DIGITAL%20CLOCK.prod.run?color=15
See this documentation page to find the color codes for the pre-defined available colors for screen mode 17 (the "p256" colour mode found in the "colour modes" section after the list of screen modes.)

How to embed the clock in a Web page

(Creating BAM programs that can be embedded in Web pages, it is a fun way to give good old BASIC a useful purpose!)

To embed this BAM program in another Web Page or Web site, here's how to do that with an HTML iframe:

<iframe src="https://basicanywheremachine.neocities.org/sample_programs/DRAW%20DIGITAL%20CLOCK.prod.run" style="width:300px;height:100px;">
</iframe>

Here is a screenshot of the result in TiddlyWiki :

How to download the clock to run locally or host it on your own website

Somewhere in your browser's menus, find something like "Save Page as".



For my Web browser, I then choose to save the file as a "Webpage, HTML only".

Wherever you save that file locally, double-clicking on it should open the file in your Web browser, and the clock program should start running immediately.

Aside:  The Chrome web browser on my Chromebook allows setting up an HTML page as an "app", so that the HTML page appears as a stand-alone application, instead of a Web browser tab.  The Chromebook remembers the location and size of the clock program.  Neat !











Monday, June 16, 2025

๐Ÿ–ฅ Swirl of Orbs

This program is a port and mod of a Turbo Basic program shared by Shahid Altaf Qureshi with the BASIC Programming Language group on Facebook (๐Ÿ”— link to post).






















Saturday, June 7, 2025

๐Ÿ–ฅ "Schrafic" Fractals Generator

This program is a port and mod of a QB64 program created by Eric Schraf (and shared with the BASIC Programming Language group on Facebook: ๐Ÿ”— link to post ). 

NOTE: Although the program sleeps for about 3 seconds before drawing a new layer (either on top of existing layers or after, randomly, clearing the screen), you can pause the action by clicking/touching the screen.  Release the click/touch to resume the graphing process.








Friday, April 18, 2025

๐Ÿ–ฅ Dony Grapher

This program is a port and mod of a program shared by Antoni Gual Via with the "BASIC, QBasic, GWBasic computer programming" Facebook group.

From Antoni's post:

Some graphics from Mr Dony's book. It uses the "bugs in love" algorithm. The circle is divided into triangular sectors. At each vertex of one sector there is a bug that's attracted by tha bug in the vertex in front of him so it moves to reach it. At intervals a picture of the new triangle defined by the moving bugs is plotted. The order of the initial vertices is inverted in even and odd sectors to increase symmetry.




































Saturday, March 8, 2025

๐Ÿ–ฅ Hypnot

This program is a port (and very minor mod) of a QB64 program by bplus.  The program by bplus is a port and mod of a ZBASIC program.



Saturday, March 1, 2025

๐Ÿ–ฅ Isometric Bouncing Ball Sim

This program is a port and mod of a QB64 program by b+, that program being a port and mod of a BASIC program by "Claude."




Sunday, February 23, 2025

๐Ÿ–ฅ Rotating Icosahedron

Icosahedron: I cause a head-run ???  (Yup, that's this sponge's insta-thought...)

This BAM program is a port of a QBJS program created and shared by "vince" on the QB64 Phoenix Edition forums. (๐Ÿ”—link)

This program port was a little tricky because BAM does not have a "MapTriangle" function to create filled-in triangles.  I had to put a PAINT statement in an IF statement that checks to make sure the triangle is not so thin that PAINT does not work.



Friday, February 21, 2025

๐Ÿ–ฅ "Spirographed" ellipses to create a colorful (32-bit, gradiant) spherical shape

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

The program generates a series of ellipses (each ellipse having an increasingly brighter shade of blue) to create a spherical object with a black to blue gradient color.



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 :



















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.



Saturday, January 4, 2025

๐Ÿ–ฅ Bubbly Wonderment

This program is a port and mod of a "simple 3d sphere" QBJS program by issues37.

On older computers, this program might be a little bit demanding because it is drawing 4,000 circles.



๐Ÿ–ฅ Ardi's Graph

A port and mod of a program shared by Ardi Ardi with the "BASIC Programming Language" Facebook group via this post . This program ...