Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimenters can define autonomous transitions: 5 points #271

Open
nataliavelez opened this issue Oct 10, 2023 · 4 comments
Open

Experimenters can define autonomous transitions: 5 points #271

nataliavelez opened this issue Oct 10, 2023 · 4 comments

Comments

@nataliavelez
Copy link

nataliavelez commented Oct 10, 2023

As an experimenter, I can define transitions that occur autonomously (without player input) after a given delay (in seconds). This feature would replace existing food_maturation functionality in the game.

Example: Given the following transition structure:

transitions:
  - actor_start: bread_dough
    actor_end: null
    target_start: oven
    target_end: oven_baking_bread

  - actor_start: null
    actor_end: null
    target_start: oven_baking_bread
    target_end: oven_with_bread
    autonomous: true
    delay: 5 
  
   - actor_start: null
    actor_end: bread
    target_start: oven_with_bread
    target_end: oven

Players should be able to place bread dough in an oven, wait 5s for it to bake, and then take baked bread out of the oven.

@nataliavelez
Copy link
Author

Just to follow up on a question @alecpm had during the planning meeting: If possible, I think it would be nice if players could interact with objects before an autonomous transition completes. In the oven example above, players wouldn't be able to interact with oven_baking_bread until it's transformed to oven_with_bread because there are simply no other transitions involving oven_baking_bread. But since this functionality is pretty general, it would be nice if the same feature could also be used to support, e.g., picking plants at different stages of maturity.

For example, the transition structure below defines a game where sunflowers pass through life stages (budding, blooming, dried) in 5s intervals. When sunflowers are blooming (sunflower_bloom), players can interact with them to get flowers. Conversely, when sunflowers are dried out (sunflower_dried), players can interact with them to harvest seeds.

transitions:
  - actor_start: null
    actor_end: null
    target_start: sunflower_sprout
    target_end: sunflower_bud
    autonomous: true
    delay: 5 

  - actor_start: null
    actor_end: null
    target_start: sunflower_bud
    target_end: sunflower_bloom
    autonomous: true
    delay: 5 

  - actor_start: null
    actor_end: null
    target_start: sunflower_bloom
    target_end: sunflower_dried
    autonomous: true
    delay: 5 

  - actor_start: null
    actor_end: sunflower
    target_start: sunflower_bloom
    target_end: null

  - actor_start: null
    actor_end: sunflower_seeds
    target_start: sunflower_dried
    target_end: null

Would something like this be feasible?

@alecpm
Copy link
Contributor

alecpm commented Oct 10, 2023

I think this sounds very workable and only the timer part is a significant deviation from the current setup. However, I think we may want something like autonomous_transition: $id as a property of the item to avoid needing to search for autonomous transitions for every object on the grid, and also avoid the ambiguity that would result from multiple autonomous transitions with the same target_start. We'll also need to make sure to skip any autonomous transitions when looking up the transitions available for a user action.

@nataliavelez
Copy link
Author

That makes sense - I'm happy to make it an item property instead!

@silviot silviot self-assigned this Oct 11, 2023
@silviot
Copy link

silviot commented Oct 13, 2023

@nataliavelez This work is now merged and testable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Client Review
Development

No branches or pull requests

4 participants