Saturday, May 16, 2026

🖥 Stratagem Icons for Blitzkrieg! World War Two in 20 Minutes

I created this little program to show 16x16 pixel icons created with 2x2 groups of custom characters.




📚 Custom Characters Tool Use Case: 16x16 bit (or 2x2 character) graphics

I'm building some 16x16 bit icons for a program I'd like to create (a randomly generated stratagem chooser for the solo variant of "Blitkrieg! World War Two In 20 Minutes".

To keep things simple, I will be using the Custom Characters Tool to create, for each icon, the four character definitions (in a 2x2 grid of characters) to give me (when the four characters are PRINTed together, a 16x16 pixel icon.

From the board game's documentation, here is the "Big Guns" stratagem token:


Using the Custom Characters Tool, I created each of the 8x8 bit quadrants:





Using those "LETCHR$" snippets, I created the following program:

BigGuns1$ = ".......................................................X......XX"
BigGuns2$ = "............X......XXX....XXX....XXXX...XXXX....XXX.....XX......"
BigGuns3$ = ".....XXX......XX.....XXX.....XXX.XXXXXXX........................"
BigGuns4$ = "X.XXX....XXXXX...XXXXX...XXXXX..X.XXX..........................."
SCREEN _NEWIMAGE(100,80,14)
COLOR 63,60
LETCHR$( 1, BigGuns1$ ) : LETCHR$( 2, BigGuns2$ )
LETCHR$( 3, BigGuns3$ ) : LETCHR$( 4, BigGuns4$ )
PRINT CHR$(1) + CHR$(2) 
PRINT CHR$(3) + CHR$(4) 

And the 16 bit graphic looks like this:


This is a good enough 16-bit icon for my needs.  No fuss, no muss.  Rock'n roll !



 

Friday, May 15, 2026

🪲 Fixed: Custom Characters Tool

At some point, I did something that broke the Custom Characters Tool, and I only noticed the problem tonight a few hours after releasing a new version of BAM.

Seeing as I've fixed the problem, why would I wait to release the fix at any other date/time than now?

BAM provides the ability to assign new custom 8 x 8 characters (defined via simple strings) to ASCII codes.  You do this with a LETCHR$ statement.  For example:

LETCHR$ (1, "........" _
          + "........" _
          + "..XXXX.." _
          + ".XX  XX." _
          + ".XX  XX." _
          + "..XXXX.." _
          + "........" _
          + "........")
PRINT CHR$(1);



Use the "Custom Characters" tool to graphically design your custom characters.


Clicking on the menu item will open a "Custom Characters Manager" dialog.


You will see that I'm in the process of creating multiple characters.  I want to create some 16x16 bit icons, each icon using 2x2 characters.

Clicking an edit button will open the character editor in a brand new window.  (This allows you to edit any number of characters simultaneously, each character in its own character editor window.)


Click a square in the grid to toggle pixels on/off.

As you create your character, you will find templates for the equivalent LETCHR$ statement that creates the same character.  (one statement with a horizontal layout, and one statement with a vertical layout.)  You can then copy whichever statement you prefer into your program.  Just replace the "???" with an ASCII character code you don't mind changing.






🎉 New Version of BASIC Anywhere Machine

EDIT: ARG!  Shortly after releasing this new version of BAM, I discovered a problem with the Custom Characters Tool.  So I updated the released version of BAM below with the fix described in this follow-up post: 🪲 Fixed: Custom Characters Tool

Although the BAM IDE, as per the TiddlyWiki instance it is, always behaved on touch devices, running BAM programs never behaved correctly with touch devices.  (The same applied to programs running from BAM and to programs exported from BAM for running as stand-alone web pages.)

Today's new version of BAM should produce programs that behave well on touchscreen devices.

Well, all works well with my cheapo Android tablet running the Chrome web browser.

Time will tell if all works well on other devices and/or web browsers, and time will tell if anybody reports such problems?

Please note that BAM programs disable multi-touch and double-taps.

  • The new version of BASIC Anywhere Machine
  • The previous version of BASIC Anywhere Machine
Thank-you:
  • "issues37" for letting me know touch-handling was not working with BAM programs
  • "dbox" for giving me the javascript "preventDefault" tip

Saturday, May 2, 2026

🖥 Animated "100 Doors"

EDIT 2026-05-11: Something was causing this program to not work on mobile devices.  I'm guessing I had exported and uploaded the wrong version (an earlier non-working one) of this program.  A newly exported version now works (with my tablet, anyway.) (New test version)

This program is an animated version of the "100 Doors" programming task described on the Rosetta Code website.

Other than the tackling the task and enhancing it with some simple animation (to visualize the process), I also wanted to showcase a few features of BAM's BASIC implementation:

  • Using expressions in GOSUB statements
  • Using emojis to facilitate finding/noticing program sections and identifiers/labels 
  • Using the IFF function
  • Using the BETWEEN function
  • Pausing the program with help from the _MOUSEBUTTON function
My primary interest in this exercise (other than giving the old sponge a workout) revolved around the design of this loop and setting it up for multiple purposes:

FOR y% = 0 TO 4
  FOR x% = 1 TO 20
    GOSUB (DoorAction$)
    IF _MOUSEBUTTON THEN WHILE _MOUSEBUTTON : WEND
    SLEEP IFF(BETWEEN(pass%,1,30) AND (pass% < 5 OR pass% MOD 10 = 0), 0.025, 0.001)
  NEXT x%
NEXT y%

The program:



Thursday, April 30, 2026

📚 A BAM Use-Case: Giving a New Lease on Life to Old BASIC Programs

One BAM's top goals is to make it fairly easy to port old BASIC programs so that they can be shared via the web for running in any web browser.

Is there a better/easier way to keep old gems around for posterity?

Anyway, I just  discovered this website by Michael Coorlim via which he shares his refactors and adaptations of type-in listings from the 80's books and magazines.  Some of these programs (ones that are not machine-specific) were refactored and adapted for  BASIC Anywhere Machine in order to share the running programs.

The list of programs are in the link provided above, with mention of BASIC Anywhere Machine on the About page.

For folk like me who grew up in the age of the home computer revolution, Michael Coorlim's efforts are really cool.

Tuesday, April 28, 2026

🪲 PAINT issue fixed

It's funny how a little extra time can bring about a change of mind, especially when the solution materializes in one's sponge while having a hard time falling asleep...

The issue (and workaround) I described in my previous post, I decided to build that into PAINT's implementation, so it isn't anything we have to think about while programming whatever fun stuff in BASIC.

So, as per the following screenshot, the examples that were not working are now working just fine:



🖥 Geometric Mandalas

As a coding exercise, I wanted to make use of DRAW statements to get plot points for regular polygons repeated around an axis to create geom...