Attribute Clash: Clash of the Bright / Dim’s

Attribute Clash


Attribute Clash / Colour Clash

Something incredibly charming yet at times annoying which occurred in some (most?) ZX Spectrum games, that the avid speccy gamer would notice (like an itch), but usually accept with no qualms or complaints, was Attribute Clash.  Although this would now be looked on as a major glitch and totally unacceptable; this was something that Spectrum gamers found familiar and comfortable.  It was not the end of the world if colours were clashing all over the place on a newly purchased game.  It would not be returned to the shop and no refunds would be asked for. No patches to download or recalls from the publisher.  It was not broken, it was just a Spectrum game.

Everyone's a Wally

“Everyone’s a Wally”… what a clashic.

Imagine the scene; your red and black character is walking across the screen in the foreground, and fast approaching is an amount of long green grass in the background. Nothing much would happen if a sprite was to walk by some background imagery of grass, surely. Of course it wouldn’t, it’s not like the grass is poisonous (not in this game anyway), it’s not an enemy sprite, or some blazing fire or spikes.  The grass is not deadly, it is just grass and it’s not going to affect the character in any way!  So the character walks along and the grass is passing by in the background, and .. what on earth has happened?!  The usually red character is, strangely, now green!  What’s going on?  Am I losing energy?  Am I gaining points?  None of the above.  There’s nothing to see here, move along!  Your character jump’s to a platform, and it’s correct colour has now returned as soon as it has left the grass.  This is the infamous “attribute clash” in action.  Although it seemed like the game was trying to communicate that something was happening to the grass or the character, it was nothing more than a graphic response due to the limitations of the good old Speccy.  An unavoidable glitch.

Zx Spectrum colour palette

The Zx Spectrum’s 15 colour palette
7 Bright, 7 Dim, and Black (present in each half of the palette)

Ok get ready for some numbers and stats (and this is without delving in to the intricacies of it all).  Displaying the ZX Spectrum’s colour palette of 15 colours (a set of 7 bright colours, a set of 7 Dim colours, plus 1 colour of black which was present in both sets, making 15 colour’s total) was dependent on 32 rows and 24 columns, of 8 x 8 pixel boxes, known as Attribute Blocks.  This invisible grid presented a problem to game artists and coders alike – as each menacing square only allowed 2 colours to be displayed in each (1 foreground colour known as “INK” and 1 background colour known as “PAPER”).  To add to this problem; only colours from the same set (either bright, or dim) were allowed to be together in each block.  Since both sets included black; both bright blocks and dim blocks could have black as one of it’s colours.  Are you following?


jack and the beanstalk

“Jack and the Beanstalk”
Jack, where are you? You seem to have turned in to a yellow blob thing

If a third colour was introduced in to an attribute block, e.g. if a 2 colour character had walked in to something else or stood in the foreground of a different coloured wall in the background; then attribute clash (more commonly known as “colour clash”) would occur.  The Spectrum would take the 3 colours inside that block and change the whole block back to 2.  To add even more problems; even if only a single pixel of a third colour touched the attribute block of two other colours, then it was the whole attribute block that would change colour. That’s a whole 8 x 8 (64) pixel region of a sprite or background colour changing just because it stood a little bit too close to something on the screen that was a different colour.  Still following? Sounds very messy doesn’t it.

attribute blocks

A mockup of the attribute blocks. Notice either bright or dim colours in each box, nothing shared.

So, what did it look like?  Careful game design could counter it or disguise it, but there were a lot of subtle examples of attribute clash in a lot of games.  Perhaps as a sprite walked in front of some red bricks it’s head (8 x 8 pixel regions of it) would change to red, which would even continue being red for a few frames of bypassing the bricks, as the sprite’s head’s attribute block still intersected it’s neighbouring red brick’s attribute block.  Maybe a bird sprite happened to swoop down at our pixel protagonist and he collided with its wing, then 8×8 pixels of the birds wing would change colour as long as they were colliding.
Subtle clashes were fine here and there, as mentioned in the opening paragraph it was completely acceptable and just another day for a Spectrum owner.  The major travesty and something completely unacceptable to the player not only morally (“I parted with my money and it looks like *this*??”) but also physically to their eyes; was the absolute disregard for attribute blocks and their rules, which resulted in shocking displays of colour clash in certain games.

Altered Beast

Altered Beast. A beast, which was somewhat altered.

This made games look messy and harsh on the eyes, and really brought down the playing experience.  There were a number of titles through the years that within the first few seconds of viewing the screen I had refused to continue playing, because of the nausea they caused. In later years with the arrival of computers such as the Amiga, and the dawning of an era of new games consoles with their vast colour palettes and no more colour clash issues, it really was a struggle for Spectrum programmers and designers to come up with ways to display credible incarnations of, for example, arcade conversions without colour clashing when 16bit machines were matching the visuals of their arcade big brother’s almost perfectly.
Spectrum owners knew there were better versions of their games out there. They were not greedy; they took what they were given and accepted the limitations of their little rubber keyed friend when playing their games.  They were (mostly) forgiving, and they accepted the following problems: “This is not the best game in the world… this is just Attribute.”

Which game’s do you remember having particularly bad Attribute Clash? Which games do you think did it well? Feel free to comment below

  • Trap Door and Dark Sceptre handled colour clash particularly well.

  • It looks like Altered Beast was one of the worst Clashers. I had to look it up right now, never seen it running on the Speccy before. I can only remember the Mega Drive version: terrible game play from and the rather imppresive “wise fwom youw gwave” sample.

  • dpla

    Hi, Dave Hughes and all Speccy lovers!

    Good article; focused exclusively on the issue.

    There may exist a handful of WORKAROUNDS on the regular ZX Spectrum (no S/W cheating or H/W enhancement involved).

    Here are a few EXAMPLES. (They are all viewable on YouTube now, for comparison purpose; you can expand the list a lot b.t.w.)

    0. Everyone’s a Wally did not feature any solution in 1985. (The colourful and bright backgrounds aggravated their clashes, especially with accurately moving characters, i.e. without 8×8-pixel based positions.) Neither did Altered Beast in 1989. (Its backgrounds were generally fainter, which reduces indeed the clashes; but the characters were darker too, which is probably counterproductive.)

    1. Popeye & The Trap Door displayed huge ‘sprites’ in 1985-86. (The relative lack of inner detail always makes me think of a pseudo/Basic text mode, though.)

    2. Dark Sceptre seemed to have taken up this niche of large characters in 1987, adding a remarkable 8-pixel thick black contour (where the clashes cannot occur, as in inversed decals). (These ‘sprites’ were more detailed than in the latter titles, but with a single colour, and like definitely turning their back to the action games, because the bigger, the slower – unless emulated, so beware of nowadays faked videos.)

    3. Auf Wiedersehen Monty & Jack the Nipper II & Exolon had characters of a regular size in 1987 (allowing 8X more precise positions/scrollings than with the latter solutions, i.e. with a pixelwise accuracy and the expected swift action), but they employed welcome foregrounds. (The attribute clash could not occur when the controlled ‘sprite’ disappears behind a predefined setting, like walls and plants.)

    4. Dan Dare III showcased large and rigorously designed multicoloured ‘sprites’ in 1990. (Most of its graphics are based on a large grid of 8×8 pixels characters, which adds to the colours; the positions follow, which prevent most clashes, though the background is essentially black ; the ‘sprites’ are small enough to allow a decent action pace – helped by 5 years since the release of Popeye, maybe.)

    Now a few possible IMPROVEMENTS to the aforementioned titles (pertaining to the colour clash, that is).

    – Everyone’s a Wally might have benefited from:
    a. coarser moves of characters (e.g. 4×4 pixels),
    b. larger characters (greater grid surface), (and)
    c. much thicker black outlines of characters (e.g. 4 pixels, plain or/and dithered),
    d. darker backgrounds (especially at the bottom, where the characters walk in general),
    e. classic monochrome characters (else passively dim white; with an extra 8×8-positioned color sign/pointer if it’s not too superfluous/annoying, or more classically with the current face in the menu next to the name; the background clash would be carried over to the characters, less noticeably hopefully).
    REM: The second sequel, titled Three Weeks in Paradise, featured a couple of solutions the year after: less/blank (plain black) or darker (even dithered) backgrounds, foreground items and setting. But the characters were still coloured (not ‘transparent’) and they moved too acurately to help the Speccy’s restrictive attributes.

    – Altered Beast, as a port of an arcade game, is a difficult case: its graphics could not be greatly reshaped to circumvent the restrictions in question, I shall asssume. With this postulate, IMHO this compulsory colourful version might have benefitted mainly from:
    a. ‘transparent’ playable characters and foes all the same (the blocks of colour clash are often more visible in this game than the content of the ‘sprites’ itself anyway, ruining everything inside and a tad above),
    b. if not too CPU-intensive: more black to the characters (e.g. a shadow added on the ground, and a thicker outline), ditto to other ‘sprites’ (esp. when overlaid),
    c. if not too resource consuming: foregrounds (e.g. grass, intermittent b.t.w. to show the boots at times; the more FG, the less need of BG to fill the screen, supposedly or logically, if not artistically).
    REM: Building quite larger ‘sprites’ would impact the action too much, on these resource-limited machines, I guess.

    [Post tracking off.]

    Bye!

    • dpla

      Now just an addendum about Altered Beast.
      Bronx(*) was released in 1990, only one year after it.
      This solo beat-em-up featured very big ‘sprites’ (about half the height of the screen), fairly detailed in several colors.
      Moreover, this block/text-based technique used a system of foreground scenery.
      The overall color clash was thus quite minimized, at distance.
      But the game pace was inevitably impacted, again. So I wish the characters were smaller, so that one could jump, for instance.
      Besides, in this context of less blocks, I would feel curious to see a remake with __masked__ blocks. (The background and part of the foes could be preserved beneficially if an outline were added, IMHO.)
      Translucent foregrounds could be added too, more or less experimentally. (To get visual effects like realistic foliage/branches, stained glass, mashrabiya etc., even magnified and blurred textures via transparent-colored pre-dithering/-scattering, if the Z80 CPU can still provide a decent interaction.)
      I may post a mockup of these suggestions in the future, just as pixels, and if necessary more titles that dealt with the infamous attribute clashing sprites.
      Keep up making your delightful articles, Retro yak!

      * Bronx on YouTube:
      https://www.youtube.com/watch?v=En14rCBLrac

      • dpla

        + 1 title.

        Altered Beast could have looked like the beautiful AMC(*) in 1989.
        (The backgrounds of Everyone’s a Wally might have been stylized or edited in order to favor the non-clashing black attribute, a commonly preferred workaround.)

        * Astro Marine Corps on YouTube:
        https://www.youtube.com/watch?v=vE5jC9u5uDI

  • Pingback: Retro Hardware or Emulation? To me it's all down to SMELL!()