Turtle Speed: Focus on Spaceland
In a recent post, I explained the difference between FPS and VMPS in StarLogo as well as how to monitor them by pressing the "H" key. I also showed you how to control the VMPS using the Speed Slider.
Unfortunately, there is no way to control the FPS directly. The number of frames per second that StarLogo can show you depends a lot on your computer's hardware, especially its graphics card and processor. Nevertheless, today's tip explains one way to boost Spaceland's FPS substantially.
Many 3D games take up the whole screen while they are running. They can run as fast as possible without worrying about whether it will slow down your ability to surf the web or compose an e-mail message, whereas StarLogo does not have that luxury. One of our design goals is that running a model in Spaceland, even at max speed, should not interfere with your ability to modify the blocks code or work with other pieces of software. Spaceland cannot greedily hog your computer's processor if you want to multitask.
In order to meet this goal, we designed Spaceland to automatically throttle the FPS when it is not the focused window. For example, when you push a Forever button in the Runtime workspace, Spaceland will not have focus, as shown for Mac OS X in the screenshot below, where you'll notice that the title and the three buttons on the left are grayed out:
Even at max speed, when Spaceland is not in focus, this Mac only gets about 34 frames per second and 33 virtual machine cycles per second. Now, if you click on the Spaceland window, the buttons light up red and green, and the title becomes bold:
Wow! The FPS shot up to 110 frames per second on this Mac, and all we had to do was click on the window. By giving focus to the window, we are literally telling StarLogo that we intend to give Spaceland our attention, and Spaceland speeds ahead. Then, when we want to control the model with blocks, as soon as we click on a block, Spaceland loses focus and slams on the brakes, giving the blocks a chance to move.
Unfortunately, there is no way to control the FPS directly. The number of frames per second that StarLogo can show you depends a lot on your computer's hardware, especially its graphics card and processor. Nevertheless, today's tip explains one way to boost Spaceland's FPS substantially.
Many 3D games take up the whole screen while they are running. They can run as fast as possible without worrying about whether it will slow down your ability to surf the web or compose an e-mail message, whereas StarLogo does not have that luxury. One of our design goals is that running a model in Spaceland, even at max speed, should not interfere with your ability to modify the blocks code or work with other pieces of software. Spaceland cannot greedily hog your computer's processor if you want to multitask.
In order to meet this goal, we designed Spaceland to automatically throttle the FPS when it is not the focused window. For example, when you push a Forever button in the Runtime workspace, Spaceland will not have focus, as shown for Mac OS X in the screenshot below, where you'll notice that the title and the three buttons on the left are grayed out:
Even at max speed, when Spaceland is not in focus, this Mac only gets about 34 frames per second and 33 virtual machine cycles per second. Now, if you click on the Spaceland window, the buttons light up red and green, and the title becomes bold:
Wow! The FPS shot up to 110 frames per second on this Mac, and all we had to do was click on the window. By giving focus to the window, we are literally telling StarLogo that we intend to give Spaceland our attention, and Spaceland speeds ahead. Then, when we want to control the model with blocks, as soon as we click on a block, Spaceland loses focus and slams on the brakes, giving the blocks a chance to move.
Labels: spaceland, turtle speed
0 Comments:
Post a Comment
<< Home