Graphical Display of 100,000 objects
Yoshiki Ohshima
yoshiki at squeakland.org
Tue Mar 28 13:04:22 UTC 2006
Ron,
> Ok I'll give it a try and see. I see that it's a 100x100 display, so 10,000
> objects. Each object would be its own turtle, I suppose, and only the color
> needs to change, there is no movement. I'm thinking for what I'm trying to
> show that will probably be good.
The size is only the default value. You can change it (err) by
modifying the class method #defaultDimensions, and of course the
turtles can overlap with each other, so you can have as many turtles
as you like in 100x100 or any size of display.
If you create an eToys tile script that looks like:
turtle1 turtleCount <- 10000
Test turtle1 y < 50
Yes turtle1 color <- xxx
No turtle1 color <- yyy
you'll see that you can change the individual turtles' color.
Oh, and don't forget to have the plugin (shared library). In
practice, that is essential for practical performance. With the
plugin, you should get 10-20 fps with 100,000 turtles moving on a 1GHz
or such computer.
-- Yoshiki
More information about the Squeak-dev
mailing list
|