Looped sound and reloading world and:or additional frogs_solution

Discussion: First some background is in order. These two examples typify the most common mistake that beginning users of AgentCubes encounter: inadvertent layering of agents. This occurs because users incorrectly treat the world as a “canvas” instead of a construction, or layering platform. In a typical “paint” program, coloring over a section of the canvas essentially eliminates the original colored pixels and replaces them with pixels of the new color. In the AgentCubes world placing one agent on top of another simply adds the second agent; it does not remove the original agent. If the agent shapes use the full depiction size (i.e., 32x32 pixels for the default agent size) and no transparency, then the original agent will not be visible, at least until simulation begins. If the buried agents do not move around as part of their behavior, they will remain buried, but can still interact with the simulation. If the buried agents do move, they will appear to suddenly “pop up” from beneath their covering agents. Obviously, neither situation is desirable. In these examples, there is a frog agent buried beneath the road. When simulation begins, nothing happens immediately. But very quickly there is a honking sound and the simulation restarts. The reason is that the buried frog under the road can still “see” the oncoming truck to its left. Remember that conditions like “see” always refer to the top agent in a stack. Just as a frog on top of the road can see a truck to its left on top of the road, a frog that is buried under the road can still see a truck on top of the road to its left. The consequence of all this is that the buried frog sees the truck, makes a sound, changes its shape to the squashed frog, waits briefly, then reloads the world. As a consequence, the user can’t see the buried frog change its depiction. If you want to experiment with seeing what is going on, first use the erase tool on the world to remove the top layer of agents to find the buried frog. Doing so will yield the following world contents:
Data
Created:May 28, 2015
Played:108
Agent:11
Rules:28
Methods:13
false
Settings
New Project Name
Rename
Copy
Download
Show Project Report
Flag Project
Delete
Discussion: First some background is in order. These two examples typify the most common mistake that beginning users of AgentCubes encounter: inadvertent layering of agents. This occurs because users incorrectly treat the world as a “canvas” instead of a construction, or layering platform. In a typical “paint” program, coloring over a section of the canvas essentially eliminates the original colored pixels and replaces them with pixels of the new color. In the AgentCubes world placing one agent on top of another simply adds the second agent; it does not remove the original agent. If the agent shapes use the full depiction size (i.e., 32x32 pixels for the default agent size) and no transparency, then the original agent will not be visible, at least until simulation begins. If the buried agents do not move around as part of their behavior, they will remain buried, but can still interact with the simulation. If the buried agents do move, they will appear to suddenly “pop up” from beneath their covering agents. Obviously, neither situation is desirable. In these examples, there is a frog agent buried beneath the road. When simulation begins, nothing happens immediately. But very quickly there is a honking sound and the simulation restarts. The reason is that the buried frog under the road can still “see” the oncoming truck to its left. Remember that conditions like “see” always refer to the top agent in a stack. Just as a frog on top of the road can see a truck to its left on top of the road, a frog that is buried under the road can still see a truck on top of the road to its left. The consequence of all this is that the buried frog sees the truck, makes a sound, changes its shape to the squashed frog, waits briefly, then reloads the world. As a consequence, the user can’t see the buried frog change its depiction. If you want to experiment with seeing what is going on, first use the erase tool on the world to remove the top layer of agents to find the buried frog. Doing so will yield the following world contents:
Edit Description
Design