Here's a statistical breakdown of the source code for Lander. Click on the table headers to sort by that statistic. For more information, see the notes after the table.
Category | Instructions | Subroutines | Variables | Data (bytes) |
---|---|---|---|---|
3D objects | 236 (9.6%) | 9 (8.4%) | 16 (28.1%) | 3868 (13.1%) |
Copy protection | 9 (0.4%) | 2 (1.9%) | 4 (7.0%) | 12 (0.0%) |
Drawing lines | 43 (1.8%) | 2 (1.9%) | 1 (1.8%) | 72 (0.2%) |
Drawing the screen | 35 (1.4%) | 1 (0.9%) | 6 (10.5%) | 100 (0.3%) |
Drawing triangles | 460 (18.8%) | 15 (14.0%) | 0 (0.0%) | 0 (0.0%) |
Graphics buffers | 22 (0.9%) | 2 (1.9%) | 6 (10.5%) | 104 (0.4%) |
Landscape | 195 (8.0%) | 7 (6.5%) | 4 (7.0%) | 28 (0.1%) |
Main loop | 103 (4.2%) | 6 (5.6%) | 0 (0.0%) | 78 (0.3%) |
Maths (Arithmetic) | 11 (0.4%) | 1 (0.9%) | 6 (10.5%) | 20496 (69.3%) |
Maths (Geometry) | 505 (20.6%) | 12 (11.2%) | 4 (7.0%) | 4616 (15.6%) |
Particles | 431 (17.6%) | 33 (30.8%) | 0 (0.0%) | 0 (0.0%) |
Player | 229 (9.3%) | 8 (7.5%) | 2 (3.5%) | 9 (0.0%) |
Score bar | 109 (4.4%) | 5 (4.7%) | 4 (7.0%) | 16 (0.1%) |
Start and end | 62 (2.5%) | 4 (3.7%) | 4 (7.0%) | 196 (0.7%) |
Totals | 2450 | 107 | 57 | 29595 |
Some notes on the above:
- The instruction count does not include EQUB, EQUW, EQUD, EQUS or SKIP operatives; these are counted as data.
- Each part of a multi-part subroutine counts as an individual subroutine.
- The statistics are produced by a relatively simple static analysis of the source code. They are not 100% accurate, though they are pretty close.