Performance Results
Many of the techniques used in this chapter are aimed at increasing performance (balanced against realism and functionality). The obvious question is how fast are these particle systems? Table 21-1 gives average frames per second (FPS) for the PointParticles, LineParticles, and QuadParticles classes, initialized with increasing numbers of points.
Table 21-1. Average FPS for the particle system with varying numbers of points
|
Number of points | ||||||
|---|---|---|---|---|---|---|
|
1,000 |
5,000 |
10,000 |
20,000 |
50,000 |
100,000 | |
|
Point particles |
19 (50) |
19 (35) |
19 (24) |
12 (14) |
7 (7) |
4 (4) |
|
Line particles |
19 (50) |
19 (45) |
19 (35) |
19 (24) |
11 (11) |
6 (6) |
|
Quad particles |
19 (44) |
14 (17) |
9 (9) |
6 (6) |
2 (2) |
1 (1) |
These averages are for at least five runs of the application. The hardware used was a Pentium IV 1800 MHz, 256 MB RAM, and an old NVIDIA RIVA TNT 2 Model 64 display card. The window size was 512×512 pixels.
The first number in a cell is the FPS reported by FRAPS (a screenshot utility available at http://www.fraps.com) when the application was left to run for a minute or so. The number in parentheses is the reported FPS when the mouse was moved rapidly inside the application window. This shows the response rate of the application when it had to carry out some basic processing (responding to mouse movements) at the same time as updating the particle system.
Tip
The results for PointParticles and LineParticles are improved if point size and line size are unchanged and anti-aliasing isn't ...