BooMfire: my entry to the 13th BASIC 10Liner Contest

This year I could not find the time to code a new game for the BASIC 10Liner Contest, so I revisited an old idea I already started working on some time ago: inspired by a 2022 entry by Roberto Capuano, I coded my own version of the DOOM Fire effect for the Sinclair ZX Spectrum. To obtain a fluid animation, I relied on the ugBASIC compiler by Marco Spedaletti.

I called the resulting program BooMfire and submitted it to the SCHAU category (10 lines, max. 256 characters per logical line, abbreviations are allowed; the program can be a demo, a tool, or an application).

I think the resulting effect is nice, as you can see in the following video:

Small video showing BooMfire running on the Fuse emulator

Although the program runs on a regular ZX Spectrum, in order to enjoy the music and sound effects, a model with the AY-3-8912 chip (128K, +2, Next, etc…) is required.

When the program starts, the BooM writing, which mimics a simplified version of the DOOM videogame logo, is displayed. In the meanwhile, the AY-3-8912 chip will play a music inspired by the DOOM theme.
The BooM logo drawing algorithm is similar to the one used on the Amiga to display the Kickstart floppy image. The flood fill routine is an implementation in ugBASIC of the recursive flood fill algorithm described in the A Fast Well-Behaved Pattern Flood Fill article by Alvin Albrecht. ugBASIC offers a nice flood fill routine by means of the PAINT statement; however, a custom subroutine has been implemented in order to play music while painting.

After the logo has been painted on screen, you’ll hear an explosion (powered by the aforementioned AY-3-8912) and then the fire will start to burn. The fire animation is my own implementation of the well-known DOOM Fire effect. Instead of plotting coloured pixels, the flame is drawn by updating the attributes of the character cells. You can change the fire effect by pressing one of the following keys: 1: fire above the BooM logo, 2: fire across the logo (for colour clash enthusiasts), 3: fire behind the logo, 0: extinguish fire.This was possible by appropriately choosing the colors of paper and ink in the three corresponding “palettes”.

You can try it online or download the project and documentation from the BooMfire page on itch.io or read more about BooMfire (technical details and source code included).

Animation showing the BooMfire effect
The BooMfire effect

Enjoy the SCHAU!

Leggi in Italiano

Leave a comment

Your email address will not be published. Required fields are marked *