Other Java 3D Approaches


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 512x512 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.

The results for PointParticles and LineParticles are improved if point size and line size are unchanged and anti-aliasing isn't switched on.


The number of points for each column must be divided by two to obtain the number of lines in the LineParticles row by four to get the number of quads in QuadParticles.

When an FPS speed of about 15 is employed, the particle systems are capable of dealing with many thousands of pointsabout 15,000 points in the PointParticles system, about 15,000 lines (30,000 points) in LineParticles, and 1,000 quads (4,000 points) in QuadParticles.



Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net