Spotlight › Gorillas
Gorillas in 8086 assembly
GORILLA.BAS gameplay with fixed-point trajectories, incremental redraw and an optional computer opponent.
- Players
- 1-2
- Executable
- 16,206 bytes
- Adapters
- VGA / CGA / Hercules
01 / Adaptation and controls
Adaptation and controls
The implementation follows Microsoft's GORILLA.BAS rules and trajectory formula; the reference listing is retained in the source repository. It adds a computer opponent and selectable match length while keeping same-keyboard two-player play.
Angles and speeds are integers. Enter advances fields and throws; Tab switches fields; P pauses and F toggles full-screen. Gravity and wind feed the trajectory calculation. This is native code, not a BASIC runtime.
02 / Game sequence
Game sequence
03 / Physics and dirty rectangles
Physics and dirty rectangles
Fixed-point arithmetic and a sine table replace the BASIC floating-point trajectory. The comparison test permits 0.75 pixel deviation from the reference formula. Sprite save/restore limits a flight update to its affected rectangle; gorilla collision uses the visible pixels.
The recorded XT city-redraw times are below. Input repaint was reduced from an 881 ms first-digit update to 5.6 ms on VGA by redrawing only the edited field. These are measurements of that renderer and test configuration.
The computer player searches candidate velocities incrementally at a fixed 55-degree angle, then applies bounded error. Original tunes use the speaker; optional FM match music is separate.
| card | in a window | full screen |
|---|---|---|
| VGA | 1.24 s | 1.45 s |
| CGA | 0.37 s | 0.33 s |
| Hercules | 0.47 s | 0.52 s |
04 / Differences from BASIC
Differences from BASIC
Whole-number angles and velocities only. Physics and timer quantisation are not bit-identical to QBasic output. Two human players share a keyboard; there is no link mode. CGA colour is available full-screen, while the desktop window is monochrome.
05 / Run Gorillas
Run Gorillas
Launch GORILLAS.O88 from GAMES. The 360KB distribution places it on games360.img; the larger software images, live media and The Wire also carry it.