I’m programming a parallel coordinates visualization tool (sure, it’s not a game by most people’s standards, but it is interactive and colorful), and I’m experiencing speed problems with large datasets (i.e., drawing many, many lines). Handling the data and doing calculations is not the bottleneck; the drawing is. An example of a parallel coordinates visualization in Java can be found here: http://home.subnet.at/flo/mv/parvis/ if you have never heard of “parallel coordinates”.
Of course, the poor performance is to be expected, because for each record in the dataset I am analyzing I need to check whether the user has highlighted the record, then for each record draw a line between each column on the visualization. Basically, with a dataset with about 2000 records, each with 7 dimensions, I’ll be drawing 6 * 2000 or 12,000 lines (if they are all selected). At times, the tool performs sluggishly, making it sometimes difficult for the user to be precise with selections. The tool has to be cross-platform, and I haven’t tested OpenGL acceleration since I only have onboard video on my machine. I have already optimized for() loops, etc., so is there any faster way to draw lines in Java than using drawLine onto BufferedImage objects?