top | item 12337619

(no title)

obarthel | 9 years ago

The program was written mainly in 'C' (some 830 lines of main program, with about 300 lines for the sound code). A small assembly language snippet provided the sine/cosine calculation code (about 100 lines, most of which contain the sine/cosine lookup table).

The setup for the animation and the background is quite clever and compact. The background is rendered first by drawing lines. Then the ball image (it's referred to as the "globe" in the code) is rendered, segment by segment, and for each segment, each facet of the ball is rendered as 8 strips. These are used for colour-cycling, giving the appearance that the ball is rotating.

The demo automatically adapts to PAL or NTSC, changing the aspect ratio for the background pattern and the ball. The sound effect of the ball hitting the correctly pans right and left as the ball moves around.

All setup and rendering operations are performed using operating system functions only.

discuss

order

No comments yet.