Open benloh opened 3 years ago
marked the checklist item Add agent.alpha
as completed
marked the checklist item Add dobj.alpha
as completed
marked the checklist item Set visual alpha as completed
marked the checklist item Add agent.inert
property as completed
marked the checklist item "Touches" ignores inert agents as completed
marked the checklist item Fish do not glow when touching dead algae as completed
Implemented with !64
What happens when an agent dies?
This is complicated and can vary according to agent, and the degree to which we want students to manage death via scripting vs automating it for them.
Death State
Visibility
ghost -- For agents under input control, they should remain visible so that input controller (student) knows that they are still connected and controlling an agent.
hidden -- Some agents need to be removed altogether. e.g. dead Algae, eaten Moths.
visible -- Some agents need to remain visible and interactive. The costume might change to indicate the agent is dead, but other agents still need to interact with the dead agent. e.g. Dead decomposing rabbit that worms eat.
Interactivity
inert -- Some agents should no longer interact with the environment and other agents when they are dead. This is usually true of hidden agents and ghost agents, but not necessarily true for visible agents. e.g. dead Algae cannot be eaten by fish, and should not gain energy from lightbeams, but dead rabbits can be eaten by worms. How do we implement this?
Do we make students explicitly script the handling of dead agents? Or do we automate that? e.g. if an agent is inert do we skip any
when ... touches ...
oronEvent Tick
updates? If students are to do any script handling of agents after they die, then it should not be handled automatically. e.g. the fish floating up after they die is handled in aonEvent Tick
condition.There is no instruction pointer management so we can't easily introduce a keyword like
break
to skip code blocks.If agents have an
inert
property, we could potentially use it within the automated parts of the system, e.g. the "touches" condition can ignore agents that are inert.Population
Implementation
How should this be implemented?
GFeature Death?
We could add a "Death" feature. The feature would add a property
isDead
to agents. It would be nice if we could set aninert
feature property and have the scripts automatically handle updates accordingly but it gets complex quickly: e.g. if an agent is inert can we update x/y or not? Other than adding a property, the feature can't do much, so this probably not the way to go?Custom Agent Property?
Or should we let students define the property themselves? e.g.
addProp isDead Boolean false
It doesn't make sense to add it as a built-in property to GAgent because handling that property will vary according to the script? And being dead is relevant to dobject apart from the visual values?
On the other hand, it is common enough that many agents would use it?
GAgent
agent.alpha
class-display-object
dobj.alpha
Use Cases
Corey's use case:
To Do
agent.alpha
dobj.alpha
agent.inert
property