Version française

TETRHEX, the Story

I wrote my first tetris in 1988 on an Apple II+, directly in machine language 6502 (I didn't have an assembler). There were very few bugs, so that I finished it in 3 days. Two years later, as I didn't have my Apple II any more, I wrote another tetris on my Atari Mega ST4, first in GFA-Basic, then in assembler 68000 a few days later.

A few months after having my Falcon 030, in 1993, I was strongly advised to write a game that would exploit the new possibilities of the Falcon (in particular the new graphic resolutions). I didn't have many ideas at the moment, and I didn't really want to write another tetris, especially as the Mega ST one ran perfectly (well, almost, what surprised me quite much) on the Falcon and in any resolution. A few days before, I had got a public domain columns (I didn't know this game yet), so I had the idea to write a tetris-like game, but quite different. Why not a hexagonal tetris? or a hexagonal columns?

On October 25, 1993, I launched into a hexagonal tetris in assembly 68030, starting coding the presentation so that I could think about the game itself at the same moment: definition of the rules... (at this moment, I didn't know hextris yet, even after reading an article in a magazine about different kinds of tetris, where no tetris with hexagonal pieces was mentioned). I wanted it to be able to develop quite easily, in particular I wanted to be able to change the rules to have a hexagonal columns, so I decided that the rules would be stored in a separate file. But first I wanted to concentrate on a particular rule: a hexagonal tetris, named Tetrhex (the pieces have 4 hexagons), which also gave the program its name: TETRHEX (in capital letters).

The rules are coded in a TETRHEX-specific language, named RUL, which constitutes the code part. There's also a definition part in which some parameters, like the piece shapes, the patterns on the hexagons... are defined. The board, composed of hexagonal cells, is hexagonal (contrary to hextris), and its size can be variable (it is fixed at the beginning of the game). The code part is composed of several phases: the initialization phase (called at the beginning of the game), the ending phase (called at the end of the game to determine the final score), the phase where the next piece is determined, the phase where one determines the hexagons that will be destroyed once the current piece arrives at the bottom, and the phase that may be regarded as the main phase since it's the most often called phase; this phase acts as a filter: a signal is given as the input, and the rule determines an action to be executed (number returned at the exit).

The possibility to define the rules is a first strong point of TETRHEX. But I wanted to go further in the evolutivity: I wanted TETRHEX to be able to use existing software and routines, for instance to send messages to a module player in order to play given musics at given moments; I also wanted the keyboard not to be the only means to play, but to be able to use the Jaguar's joypad, to make the computer play, or even to play with the voice (the Falcon has an audio input and a DSP). All these possibilities had to be able to be realized without needing to compile TETRHEX again and by anyone (having some knowledge in programming, in particular in assembly). So I had the idea of message files, which contain routines, communicating with TETRHEX using a given protocol (which was determined much later).

I wanted the minimum resolution to be quite high (at least 640 × 480), so I chose the 256-color modes: 16 colors are not sufficient, and in a True-Color mode (32768/65536 colors) the Falcon can't have a high enough resolution. The fact that the Falcon has no chunky mode (1 pixel = 1 byte) and that the planes are interlaced with 16-bit words, and the poverty of the operating system complicated the program very much, and I couldn't remain general (in order to have fast displays). A large part of the program would have to be modified to accept other graphic modes (i.e. chunky pixels or non-interlaced planes).

A few weeks later, I was advised to make TETRHEX MultiTOS compatible (the Atari pre-emptive multitasking operating system, which is still unfinished), i.e. to be able to run TETRHEX in a GEM window, instead of the whole screen. At this moment one could believe that MultiTOS would be the operating system of Atari computers (and that Atari might brought out the Falcon 040).

So I've decided that TETRHEX could run in two different modes: either on the whole screen (with a presentation at the beginning) or in a GEM window (without a presentation), the latter mode being almost mandatory under MultiTOS. The GEM window mode complicated the program very much because of the interlaced planes (the window can be moved).

Today TETRHEX is (almost) finished, the future improvements will mainly consist of new rules and new message files. It perfectly runs under MultiTOS, with a few limitations, and takes very little memory. Unfortunately the Falcon 030 is still quite slow (mainly in very high resolutions), the Falcon 040 hasn't been brought out and accelerator boards are delayed (and are quite expensive).

TETRHEX had to be marketed, but for several reasons (in particular the upgrades, the style of the software, and the delay), it became shareware; the first shareware version dates from November 27, 1994, the first version with new documentation dates from March 6, 1995, and the current version dates from May 6, 1995 (May 10 for the registered version).

Now I start thinking about the version 2 (but the version 1 will still be supported and will go on developing with rule and message files), which will be more modular. Contrary to the version 1, it will be aimed at several systems (first at Acorn Risc PC, but I also think of the Archimedes and the Atari clones), with the possibility to play through a network on different systems, and it will certainly have many other surprises; some of them will need much power. Despite few current registrations to the version 1, the version 2 should also be shareware.

But nothing is fixed, and for the moment I count very much upon new registrations to the version 1.

Vincent Lefèvre,

July 10, 1995 (one year after the first demo version, presented during FAUCONtact Annual General Meeting).



Powered By...?
Valid XHTML 1.0! Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0.
Last updated:
webmaster@vinc17.org