New Features in 2.0 |
StarLogo README We've been working hard for quite a while on lots of new features and bug fixes for StarLogo. The biggest news is that StarLogo is now fully native for PowerPC's. No more wierd extensions or memory limitations. Here's a list of the all of the new features since 1.5:
This lets you control: the screen size (1x1 - 251x251), the size of of the patches (2x2, 4x4, 8x8, 16x16), the maximum number of turtles, the number of turtle variables, the number of patch variables, and the turtle stack size. Changes are made when you click OK from the dialog box. Changing any of these parameters erases all turtles and patches.
We now include the ability to paint on the StarLogo window. You can paint with patch color or with turtles. There are 10 different paint tools: pencil, eraser, line, rectangle, oval, filled rectangle, filled oval, polygon, paint bucket, and eye dropper. There is also a color palette where you can pick from any one of the 140 basic StarLogo colors.
In 8x8 and 16x16 mode, turtles have shapes. There are 240 shapes. Shape 0 is the turtle shape and Shape 1 is the original StarLogo square turtle. Shapes 2-239 are customizable, though StarLogo will come with a library about 100-150 shapes. There is a shapes palette where you can choose shapes and edit them. If you edit a shape, a dialog will pop up with the paint tools. You can then edit the 8x8 and 16x16 versions of the shape. In addition, the color palette includes an extra transparent color, so you can have the background of the patches show through. If you have selected a shape from the shapes palette, you can run the mouse over the turtles on the screen and change their shape. There are several new primitives for shapes: shape, shape-of, shape-at, setshape, setshape-of, setshape-at, psetshape, psetshape-of, psetshape-at, osetshape-of, osetshape-at
If you double-click on a turtle in the StarLogo graphics window, a turtle monitor will pop up. You can view the state variables of the turtles and edit them from the turtle monitor. If the turtle dies while the monitor is open, it will go black and say that the turtle is dead. If the turtle is reborn (the same who) the window will open up again. Turtle monitors update every 0.5 seconds while anything is running.
In order to make things like gravity and bird flocking easier to program, we've introduced turtle and patch iterators to allow you to ask a turtle or patch to iterate over their fellow turtles and patches and either sum, max, min, who-max or who-min their values. There are several new commands: Summing: These return the total value of the lists when evaluated for every turtle. If there is no turtle that satisfies the condition, it returns 0. sum-of-turtles [color], sum-of-turtles-with [color = red] [xcor] Minimizing: These return the minimum value of the lists when evaluated for every turtle. If there is no turtle that satisfies the condition, it returns maxnum. min-of-turtles [color], min-of-turtles-with [color = red] [xcor]
(This one is useful for doing gravity: Note: inside all of these instruction lists, you may use the variable "myself" to refer to the turtle who called min-of-turtles, etc... Maximizing: These return the maximum value of the lists when evaluated for every turtle. If there is no turtle that satisfies the condition, it returns minnum. max-of-turtles [color], max-of-turtles-with [color = red] [xcor] Minimizing: These return the turtle with the minimum value of the lists when evaluated for every turtle. If there is no turtle that satisfies the condition, it returns -1. who-min-of-turtles [color], who-min-of-turtles-with [color = red] [xcor] Maximizing: These return the turtle with the maximum value of the lists when evaluated for every turtle. If there is no turtle that satisfies the condition, it returns -1. who-max-of-turtles [color], who-max-of-turtles-with [color = red] [xcor] Counting: These return the number of turtles that satisfy the condition. count-turtles, count-turtles-here, count-turtles-at, count-turtles-with [color = red] Picking a Turtle: These return a turtle id that meets the condition. one-of-turtles, one-of-turtles-with [color = red], one-of-turtles-here, one-of-turtles-at Patch Commands: These commands also exist for patches. sum-of-patches [pc], sum-of-patches-with [pc = blue] [count-turtles-here], min-of-patches [pc], min-of-patches-with [pc = blue] [count-turtles-here], max-of-patches [pc], max-of-patches-with [pc = blue] [count-turtles-here],
Turtles can now have breeds, which you can use to distinguish groups of turtles from one another. You declare the breeds in a breeds [rats mice] line similar to turtles-own and patches-own, and get quite a few "new" functions. create-rats, ask-rats [fd 1], breed, breed-of, breed-at, setbreed, setbreed-of, setbreed-at, osetbreed-of, osetbreed-at, sum-of-rats [color], sum-of-rats-with [color = red] [xcor], count-rats, count-rats-here, count-rats-at, count-rats-with [color = red], one-of-rats, one-of-rats-with [color = red], min-of-rats [color], max-of-rats [color], who-min-of-rats [color], who-max-of-rats [color], min-of-rats-with [color = red] [xcor], max-of-rats-with [color = red] [ycor], who-min-of-rats-with [color = red] [xcor], who-max-of-rats-with [color = red] [ycor] Example: breeds [frogs birds]
to breeds-example
We've renamed a few commands, as you can see. All of the old names will still work, but you should switch to the new names:
Thanks to the help of Bjarne Tveskov, we have new icons for the toolbars and a look for the interface widgets.
Example: if pc = blue [sprout [stamp black fd 5]]
You can now assign a state value to a variable, ie. hot or cold, instead of 1 or 2. Here's the syntax:
globals [foo [high low]]
ie. setparticle dust
We've modified StarLogo to save all information into a project file when you save your work. This means that when you open a project, all of the state that existed when you saved will be loaded in. (ie. patch colors, the turtles and their variable values, patch variables, etc...) There are new commands for importing and exporting pieces of a project if you want to do development with different backgrounds or different sets of turtles, etc... You can import turtles, patches, turtles and patches, a picture (color pictures too!), code, and the info window. You can export turtles, patches, turtles and patches, a picture, code, the info window, the plot window and the output window.
We've added quite a few sample projects and modified the old ones to use the new features of StarLogo 2.0.
You can now do:
to recurse :x
|
|||||||||||||||||||||||
Projects | Documentation | Download | Users | Mailing Lists | Information |
|||||||||||||||||||||||
Last Modified: 2/5/97 |
|