BASIC 10-Liner Contest 2024: Atari Entries Rise as Eric Carr Takes Two Wins

Fly Hunter 10L: a green frog leaping beneath a tree branch with a spider on it, over a pond, score 1

At the start of February 2024, AtariAge opened its thread for the 2024 BASIC 10-Liner Contest, run as every year through Gunnar Kanold's homeputerium site. The deadline was Saturday 16 March 2024, 18:00 CET, and the awards ceremony was set for Saturday 6 April 2024. As always, entries are games of at most ten lines in a line-oriented BASIC on an 8-bit machine. PUR-80 requires the built-in BASIC, while PUR-120 and EXTREM-256 allow any dialect.

A workshop in the thread

Before the deadline, the thread turned into a collection of size and speed tips, mostly for FastBasic:

  • Order matters. Writing a=(b=c)+a instead of a=a+(b=c) saved about 12% of loop time in a timing test. FastBasic's author dmsc explained that a = expression + b is generally faster than a = b + expression. His cross-compiler optimiser works by replacing token patterns, so X*2 becomes a shift but 2*X doesn't.
  • Bit tricks. A challenge to double every bit of a byte into a 16-bit word, for merging character and Player/Missile graphics, drew a 16-entry lookup-table answer from vitoco. Dmsc then produced a table-free version built from shifts and masks (n=x/16+x&15*256:n=n!(n*4)&13107:n=n!(n*2)&21845*3), which ended up even shorter.
  • Recursion. FastBasic PROC parameters aren't local. Dmsc showed a recursive QuickSort that keeps its state in arrays used as a stack, and a 10-liner-compressed version of it.
  • For floating-point-heavy code, he suggested replacing the OS maths routines with a faster mathpack such as Altirra's.

The entries

On 19 March 2024 ZeroPage Homebrew played the Atari entries live. Vitoco's statistics counted 53 entries in total, down from 88 in 2023. The Atari side grew, though: 11 games for the Atari 800XL plus two multi-system titles. The Atari games were:

  • Victor "vitoco" Parada: Chase Me! (EXTREM-256, FastBasic), Endless Road Runner (PUR-80, Atari BASIC), Fly Hunter 10L (PUR-120, FastBasic)
  • Eric Carr: Magic Carpet Ride (PUR-80, Atari BASIC), Gunner (PUR-120, FastBasic), Tetris (EXTREM-256, FastBasic)
  • D. Scott Williamson: Jacks or Better Video Poker (EXTREM-256, Atari BASIC), plus two Atari BASIC ray-tracing programs in SCHAU
  • Marco "spotlessmind1975" Spedaletti: ACME, Inc. and Falling Balls (EXTREM-256, multi-platform ugBASIC)
  • Noah Burney: Bonk'em (PUR-120, Atari BASIC)
  • Kim Slawson: Doons (EXTREM-256, Turbo-Basic XL)

Results

The results went up on the homeputerium site in early April, and the Atari did very well. Eric Carr won two categories. He told the thread his scores were very close to vitoco's and credited FastBasic for keeping the Atari at the top. A separate Public's Choice award was decided by downloads and views on the contest's itch.io page.

Getting the games

Vitoco's NOMAM2024.atr collects all 11 Atari game entries (the SCHAU programs are left out) behind a BASIC menu. It needs a double-density MyDOS disk because the ugBASIC runtimes are large. Boot it with BASIC enabled (don't hold OPTION on real hardware) and plug in a joystick. The menu is MyDOS-specific: it loads binaries with a MyDOS XIO call, so copying the files to a DOS 2.5 disk breaks .XEX loading unless you use the DOS 2.5 menu from the 2023 disk.

Credits