The Seeker Version 4: Dependency Properties and Animation

Live example:

I made a lot of changes to  The Seeker, but probably the most important technically is the addition of Dependency Properties and more specifically Dependency Properties to support Animation.

image image image

The Simulation

First I’ll describe the changes to what goes on in ooNaWorld, where everything and everybody is an ooNaThing, or will be when I’m done. At any rate, Seekers chase and eat prey. Seekers start out as blue, change to red when chasing, turquoise in close pursuit, and black when they pause to eat. When a Seeker has eaten a specified number of prey it reproduces. Prey start out as pale green, turn purple when being pursued, and dark green after they have escaped pursuit.

ooBer Control Panel

All things ooNa are under the control of ooBer, master of the ooNaverse.  You can communicate with ooBer through the ooBer Control Panel, which I’ll describe from left to right:

Left Mouse Button: Radio buttons determine whether left mouse click creates Prey or Seeker

Seekers/Prey: The panel just below Left Mouse Button shows number of current Seekers and Prey.

Seeker Reproduction: Determines whether Seekers reproduce and number of prey required to reproduce.

Eat Time: Number of seconds that Seeker will pause to eat.

Switch Prey: If clicked, Seeker will turn from current prey to chase one that is closer, otherwise it will chase current prey until caught.

Collision: Determine whether to do true hit-testing or declare a hit at a specified proximity. Proximity runs faster when there are a lot of players on the field.

Seekers: When Max is exceeded all Seekers are killed except the new-borne. Speed Min/Max sliders set speed range of newly created seekers.

Prey: If Max is exceeded,  Auto-Create Prey does not fire. Auto-Create Prey determines whether to periodically create new prey, how often, and how many.

Clear Seekers/Prey Buttons: Clear all Seekers or Clear All Prey.

from  Richard Waddell            more here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • MisterWong
  • Y!GG
  • Webnews
  • Digg
  • StumbleUpon
  • Reddit
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • XING

Leave a Reply

Your email address will not be published. Required fields are marked *