Charts

Main Menu

Installation

System

Preferences

Applications

Demos

Development

Advanced

Charts

Chart draws an animated 3D starfield, letting you fly through space. It is an application which demonstrates the performance advantages of BDirectWindow, a graphics API for drawing directly to the screen.

Charts has a lot of controls, and can look intimidating, but once you know how to start it going, the rest is stuff you can figure out as you play with it!

1. Once Charts is running, you'll want to widen the window. Use the resize section of the bottom-right corner to widen it. This will let you see all of the various controls that line up along the top of the window.
2. To make something happening, you have to turn on animation, by choosing something from the Animation pop-up menu along the top, and you need to turn on drawing, by choosing something from the Display pop-up menu, right next to the Animation menu. To start with, choose "Slow rotation" and "DrawBitmap".
3. To make the starfield more interesting, increase the density of the stars, by clicking on the Star Density indicator, which is along the top of the window, and is a button with a "10" in it. Use the slider panel that pops up to increase the density to something interesting, like 60. Close the Star Density slider panel.
4. The starfield should now be rotating around, with decent animation, but probably not great. You can see the frames-per-second rate of the animation in the Status area, in the top-left corner, labeled "frames/s". This is using the ordinary DrawBitmap API calls to do the screen drawing. They're good, but not good enough. It's time to see the power of BDirectWindow!
5. From the Display pop-up menu, choose DirectWindow to change the way that Chart draws onto the screen. You should notice that the frames-per-second rate jumps quite a bit. And the smoothness of the animation should noticeably improve as well.

Play with the different controls to see what they do. Here are a few notes about some of the indicators and controls which might not be obvious when experimenting:

- The colored bar in the top-left corner is a performance indicator. Each "tick" (or chunk) on the bar indicated 12 frames-per-second for the animation speed. Red "ticks" indicated actual frames-per-second drawn, while green "ticks" indicated how many more frames-per-second could be drawn, if you wanted to.
- You control the actual vs. potential frames-per-second by adjusting the animation refresh rate, using the Refresh rate slider panel, which appears when you click its indicator button, which is a button on the top of the window with a "60" in it (for 60 frames/second desired animation rate).
- The "2 Threads" checkbox on the left side will tell Chart to use two drawing threads instead of one. If you have a dual-processor system, this will result in a significant improvement in performance, for any drawing method. If you have a single-processor system, it should remain about the same.
- Free motion animation in the Spiral galaxy is the coolest.
- Comets are cool, Novas are boring, and you'll have to harass the engineer who wrote Chart to write more code to get Battle to work. Right now it's just a teaser.

©2003-2004 by yellowTAB GmbH