Back of envelope game logic
Having drafted counting sensors I think we can just finish up game logic with a typecase basically. I have a little bit of time after planning for Kent Pitman’s interview tomorrow (where he will read an unpublished essay live and share finding out about Ted Nelson /after/ writing his own Cross Referencing Editor Facility in England).
Here is my back-of-the-envelope draft of the game mechanic to implement.
Basic mechanic
- Call action on grid
- randomly choose an entity from the grid’s entityfile
- Update that entity
- Plant has some chance to propagate
- Checks sensors for plants
- Propagates away from plants
- Insect tries to eat plants
- Checks sensors for plants
- spawns = moves towards plants
- (Or has some probability of dying)
- Bird needs to eat and sleep
- tries to eat an insect iff insect
- spawns (‘moves’ towards insects)
- low chance /not/ to remove the current position
- i.e. the bird who moved away left an egg=new bird
- else spawns (moves) towards plant
- no chance of leaving an egg iff -plant