
The Amiga Boing Ball Explained - doener
http://amiga.lychesis.net/artist/DaleLuck/Boing.html
======
Luc
A bitplane is a region of memory rendered as pixels. The Amiga hardware
allowed you to (basically) define a width and height for the region, as well
as a x,y offset. So by e.g. increasing the x-offset you could scroll
horizontally through a bitplane with a width larger than the screen's.

The ball is in the middle of a large empty bitplane. By simply changing the
offset values it bounces around the screen. The graphics hardware does the
heavy lifting. No pixels need to be erased, no polygons rendered. You're just
looking at the same ball, but the window through which you look has moved.

Colour cycling can be used with palettes. Lets say you have 32 colours in your
palette. Draw a row of 32 pixels, each in a different colour. Now change the
palette so all colours are white, except for the first, which is red. Your
pixels still refer to their respective colours in the palette. A frame later,
make color 1 white and color 2 red, etc. This way you get animation without
redrawing pixels (expensive), but simply by resetting the palette (cheap).

Anything else?

~~~
anexprogrammer
It's worth mentioning the reveal, which the page omits entirely, and was the
astonishing bit of the CES demo at the time.

In the original demo they were showing the normal desktop screen, showing
window dragging, resizing, showing text editors, clocks, shell and what not.
Running 640x480 4 colour. The whole time you could _hear_ the bang bang of the
boing ball bouncing, but see nothing.

At some point a viewer asks "what the heck's that noise?" and the demoer pulls
down the desktop screen to smoothly, and without glitching, reveal a 320x240
32 colour screen running the Boing demo behind it. In its day, that was almost
unbelievable. PCs had just got 16 colour EGA and switching res resulted in a
couple of seconds of monitor blanking or losing sync as it switched.

I can't remember if they also had a 4096 colour HAM image (Hold and Modify - a
way of cheating with palettes and getting a LOT more colours) behind that.

The Amiga had virtual screens that operated a little differently to a modern
approach - they could be massive with a monitor sized viewport onto it. They
could have multiple resolutions and bit depths. They could be brought forward
and sent back, and dragged (only up and down) to reveal multiple screens at a
time. Visualise having a full size browser window, and dragging the whole
window down to reveal the desktop, but switching resolution and colours as you
go.

People left speechless.

The copper (display co-processor) allowed switching of palette and resolution,
with 0 cpu use, on a particular scan line every frame.

It seriously took 10 years or more before a Windows desktop could move stuff
around the screen as smoothly, mainly as the Amiga didn't actually move a lot
of stuff a PC did. PCs were upping colour depth as they aged rather than
chasing more speed though. Virtual screens were a shadow of their Amiga
implementation.

~~~
bluedino
Windows let each application (or even window, it's been a long time I don't
remember the specifics) define its own palette in 256-color (8-bit) mode. You
had reserved colors to make sure the gui looked the same but you'd get all
kinds of strange artifacts when you switched to an application that had a
custom palette but you could still see other applications windows.

It was years where you had to make the trade off of color depth and related
display quirkiness at the expense of speed and performance

~~~
anexprogrammer
The fun days of switching your new £300 graphics card to 16 or 24 bit mode,
moving a window, and watching Windows redraw every line and icon. Step. By.
Painful. Step.

------
aidenn0
Obligatory link any time palette cycling images are mentioned:

[http://www.effectgames.com/demos/canvascycle/?sound=0](http://www.effectgames.com/demos/canvascycle/?sound=0)

All images there are completely static 256 color bitmaps with only the mapping
from color index to RGB value changed.

~~~
janeFondler
Would be hard to sleep in those houses with that waterfall crashing ad
infinitum...

~~~
rangibaby
We stayed in a mountain bungalow during summer vacation, there was a waterfall
close enough to hear (and be loud) but far enough away that it's noise sounded
like a pleasant version of TV static.

I had my best night's sleep in years. My theory was that it drowned out
ambient bumps and crashes that usually wake me up at night.

~~~
digi_owl
I recall camping at some relatives that had a waterfall near enough that you
heard it any time you were outside. After about the second day or so you
hardly even noticed.

------
Arjuna
Here's a short interview with Dale Luck, discussing the Boing Ball. I like how
they came up with the sound for it:

[https://www.youtube.com/watch?v=cJcO628yCcU](https://www.youtube.com/watch?v=cJcO628yCcU)

For readers following along at home, R.J. Mical [1] was a co-inventor of the
Atari Lynx [2]:

 _" Under the auspices of a game company called Epyx I was co-inventor of the
first color hand-held game system, the Lynx, which finally was acquired by
Atari.

I was co-designer of the Lynx hardware system, and I implemented an entire
software development suite including a run-time library of hardware interface
routines and a celebrated set of debugging, art and audio tools. We received
many patents for the Lynx.

In addition, we developed 6 games to be available at the launch of the system.
I produced these 6 titles, was co-designer of several of them, and managed the
programmers, artists and audio/music designers."_ [3]

[1]
[https://en.wikipedia.org/wiki/Robert_J._Mical](https://en.wikipedia.org/wiki/Robert_J._Mical)

[2]
[https://en.wikipedia.org/wiki/Atari_Lynx](https://en.wikipedia.org/wiki/Atari_Lynx)

[3] [http://www.mical.org/workhistory](http://www.mical.org/workhistory)

~~~
toufka
The bouncing sound: took a platic bat (used for working out 'disagreements')
and hit an alumimum garage door while digitizing the interior sound of the
garage with an apple II, and masaging the digital data to play on the Amiga.

~~~
megablast
That is odd. Why didn't they just go on the internet and download an mp3?

------
mnem
Maybe a better explanation (including source):
[http://amiga.filfre.net/?page_id=5](http://amiga.filfre.net/?page_id=5)

~~~
recursive
In this version, the ball actually bounces around. OP version doesn't seem to
do any actual bouncing. The "boing" name didn't make much sense. I have to
say, the bouncing version is a lot more impressive.

~~~
ekianjo
The original demo had a bouncing effect.

------
acqq
The video of the Boing Ball:

[https://www.youtube.com/watch?v=-ga41edXw3A&t=26s](https://www.youtube.com/watch?v=-ga41edXw3A&t=26s)

I remember what were the effective limits at these times and to me it still
looks impressive.

As an example, the observer would never get the idea that it's done by
changing "the beginning of the screen" as the grid background stays on the
same place all the time, and just the ball (with the shadow) moves.

Also note the change of the rotation direction as the ball hits the wall.

------
sundvor
I feel obligated to point out the Amiga documentary
[http://www.frombedroomstobillions.com/](http://www.frombedroomstobillions.com/)
, in case there are any veterans here who have been living in a cave etc. It
is an absolute _must see_ , great on so many levels, and also detailed the
last minute efforts done to get the launch right.

------
hinkley
Wait, that's how it worked? That's it? It was a trick?

That demo was my introduction to the Amiga. Whenever I met an Amiga fan later
in life I would picture that demo in my head.

Adult, programmer me knows all too well that demos are marketing material, aka
"lies you can't be sued for", but really faking 3D rendering is pretty low
even by marketing standards. I am extremely disappointed.

This kind of screws with the memories of some interactions I've had with old
fans over the years.

~~~
pkroll
My memory of the era is that no one would have thought they were actually 3d
rendering in real time: that was Just Not Possible.

I'll point out that once they finally, FINALLY made a memory card for the
Commodore 64, that plugged into the megabyte-per-second DMA port, there was a
similar bouncing ball demo done for the C-64. Purely by loading whole frames
into the memory card and blasting them onscreen as needed, like a page flip.

~~~
zubat
Yep. Every computer of the era ended up with a boing ball clone - it was just
that iconic. [0]

[0]
[https://www.youtube.com/watch?v=fSwwqt3ue2M](https://www.youtube.com/watch?v=fSwwqt3ue2M)

~~~
Doctor_Fegg
Here's one for the Amstrad CPC, where you can see the ball actually being
drawn in all its 16-colour palette glory:

[https://www.youtube.com/watch?v=m9Go8cwSDzQ](https://www.youtube.com/watch?v=m9Go8cwSDzQ)

------
tantalor
Not explained whatsoever.

~~~
Jaruzel
Ok, let me help. The Amiga has the ability to have bigger screens than the
monitor can show at once. It can also move those 'screens' in any direction,
and therefore show different bits of themselves on the monitor. Think of it
like moving a slide around on a microscope, you can't see the whole slide at
once through the eyepiece, so you move it around.

The Amiga can also overlay these screens on top of one-another, letting bits
of the lower screens show through the transparent bits of the upper screens.
For a real-world example, think of two clear plastic overhead projector
sheets, one on top of the other. The top one is just the ball, and the bottom
sheet is the grid. By moving the top sheet around, you create the effect that
the ball is bouncing around the grid.

To emulate the ball rotating, the Amiga used one of it's other graphical
tricks: palette cycling. The ball is actually made up of many thin strips of
colour. Think of these strips as Colour1 to Colour30, all of the colours are
painted white, except for a few evenly spaced red ones. To make the ball
'rotate' the colours assigned to Colour1 thru Colour30 are shifted one place
to left (or right) a few times a second. This created the illusion that the
ball is rotating, when in fact it's not.

All of this is done via hardware routines in the custom graphics chip, and
uses almost no CPU time at all. It may not have been done how people think it
was done, but it was still an impressive demo of the hardware regardless.

Basically, it's all smoke and mirrors, and please ignore the man behind the
curtain.

------
ekianjo
There is a better and longer explanation of this effect in The Future Was
There if you are interested.

~~~
doener
[https://mitpress.mit.edu/books/future-was-
here](https://mitpress.mit.edu/books/future-was-here)

------
amelius
The demo looks nice, but it doesn't extend to other shapes or more complicated
scenes very well.

To be honest, it makes me a little sad whenever people choose to use "smoke
and mirrors" to create an effect, rather than do the technical correct thing
(or admit the effect is impossible to achieve in general).

------
ehsan_akbari
In what language is this animation written?

~~~
vardump
I'd guess BCPL. Most early Amiga software was written in it.

~~~
spc476
Only the file system portion (dos.library) was written in BCPL (ported from
TRIPOS in two or three weeks). The kernel (exec.library) was in assembly, and
the GUI (intuition.library) was written in C.

~~~
vardump
Well, whatever it was, it just needed to compute ball velocity, set a few
values in a copper list and start audio DMA on collision.

Any compiled language would have been good enough.

