Skip to content

Releases: nfinit/2089

2089 1.0.0

Choose a tag to compare

@nfinit nfinit released this 23 Oct 05:41

2089 1.0.0 brings 2089 to the X Window System: two new frontends, x2089 for plain Xlib and xm2089 for Motif with CDE integration, alongside the curses and line-mode terminal frontends of 0.1.0.

New

  • x2089 (frontend/x11/xlib): a window of its own with nothing but Xlib. Color or black and white, resizable, the usual X options and resources.
  • xm2089 (frontend/x11/motif): a Motif-native application (Motif 2.0 or later) that runs under any window manager. It has menus, beveled tiles, optional arrow buttons, and dialogs to start a game of any size or by its number, open and save games as files, copy and paste save strings, and see or clear best scores. Options > Save Options writes ~/.xm2089.
  • On the CDE desktop (make install-cde): an action and icons, so 2089 appears in Application Manager (Games) and *.2089 files open from File Manager; a help volume for Help > Overview; tiles in the desktop palette (-colors desktop); the game in progress saved and restored with the session.
  • Tiles past 2048 in greens, as in the later mobile versions, then blues and violets (Options > Extended Colors; +extended for the original's single color).
  • Manual pages: 2089(6), x2089(6) and xm2089(6), installed by make install.
  • AIX binary distribution (make bindist): see below.

Fixed and changed since 0.1.0

  • Line mode says "top tile", not "best".
  • curses: after a ^L that finds no room, only q works until there is room again; c lays the board out again; a winning move that also ends the game says both; score files with CRLF line endings are read correctly; the terminal is restored on ^.
  • Escape sequences are skipped whole (ECMA-48), not just their digits.
  • Goals past 2^31 are shown as 2^32 and so on, not 0; an empty board's top tile is shown as -.
  • Best scores live in shared frontend code (common.c), used by every full-screen frontend through the same ~/.2089.
  • American spelling throughout ("color").

Save strings, game numbers and ~/.2089 are unchanged from 0.1.0 and will stay compatible through 1.x.

AIX binary distribution

2089-1.0.0-aix4.3.3-ppc.tar.Z holds 2089, x2089 and xm2089, built with XL C for AIX 4.3.3 on PowerPC, with their manual pages and the CDE files. They need only the base system: libc, curses, X11, Xt and Motif.

zcat 2089-1.0.0-aix4.3.3-ppc.tar.Z | tar -xf -
cd 2089-1.0.0-aix4.3.3-ppc
./install.sh -c             # to /usr/local, and onto the CDE desktop

-p DIR installs somewhere else (-p $HOME without root, with -c going to ~/.dt); -n shows what would be done. On other systems, build from source (see the README).

SHA-256: bc557b832acb9f8473144b2d08eea5d1dfc41e802263e6dcb3beab70bbb79d58

Tested

  • Linux (gcc, ncurses): 533,661 core checks and 701 frontend checks; strict builds of the core and of both X11 frontends; 1,000 random games replayed against an independent Python model of the rules with no mismatches.
  • AIX 4.3.3: the same checks with XL C and with gcc 2.95.3, plus both X11 frontends built with each compiler.
  • X11 frontends: run on AIX 4.3.3 under CDE and under plain mwm.
  • Terminals: Ericom PowerTerm 525.

2089 0.1.0

Choose a tag to compare

@nfinit nfinit released this 20 Oct 06:50

The first release: 2048 in standard C89, with a freestanding core and a program that plays on any terminal, from a teletype to xterm-256color.

  • Core (2089.c, rng89.c): no C library, no static data, 16-bit-int safe, EBCDIC-safe, external names unique in 6 characters. Deterministic: the same seed and moves give the same game everywhere. Games save to a short canonical string ([0-9a-z.], 25-46 characters for 4x4, usually 32-35).
  • Line mode (frontend/text/2089): the C89 library only. One turn per line, arrow keys understood (ANSI, VT100 in either cursor key mode, VT52, 8-bit CSI/SS3), a compact display for slow lines and paper (-k), resume from a save string (-l).
  • Full screen (frontend/curses/2089, built when make finds a curses): X/Open curses through terminfo, with line mode as the fallback. Colour after the original game's palette in 256, 16 or 8 colours; mono; and plain, chosen by itself for terminals whose attributes take a screen cell (Wyse 50). Compact cells on slow lines, boards from 2x2 to 8x8, high scores in ~/.2089.
  • Optional one-level undo (-u), seeded games (-r), board size (-s).

Developed and tested on Linux (gcc, ncurses) and AIX 4.3.3 (XL C and gcc 2.95.3, AIX curses). Legacy terminals tested with Ericom PowerTerm 525 on Windows NT (VT52, VT220, VT420 and Wyse 50 emulations, and at 9600 baud on a serial console); colour tested in xterm-compatible terminals with 8, 16 and 256 colours.

Tests: 533,661 unit and property checks with golden hashes, and 1,000 random games replayed against an independent Python model of the rules.