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

Check not deterministic chores (one using Random) #13

Closed
zuev93 opened this issue Feb 22, 2023 · 1 comment
Closed

Check not deterministic chores (one using Random) #13

zuev93 opened this issue Feb 22, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@zuev93
Copy link
Member

zuev93 commented Feb 22, 2023

Example of such chores:
IdleChore, MoveToSafetyChore, etc...

@zuev93 zuev93 added this to the Dupes are synced milestone Feb 22, 2023
@zuev93 zuev93 changed the title [Placeholder] Check not deterministic chores (one using Random) Check not deterministic chores (one using Random) Feb 22, 2023
@Ceron257
Copy link

Here are chores that use Unity.Random:

  • AggressiveChore
    • Used to flip a coin to decide whether a stressed out dupe destroys walls or buildings
  • BansheeChore
    • determines the maximum pathfinding cost of
      • where to wander in the wandering state
      • where to go when no other dupe to wail at is found
  • FoodFightChore used to determine
    • what other dupe to attack
    • whether to flee or cringe when being hit
  • IdleChore
    • Used to determine the timespan after which the state transitions from onfloor to idleMove or from onladder to idleMove
  • MingleChore
    • determines the time the dupe is in the onfloor state before the chore succeeds

@zuev93 zuev93 added the enhancement New feature or request label Jun 28, 2023
@zuev93 zuev93 self-assigned this Dec 7, 2023
zuev93 added a commit that referenced this issue Dec 7, 2023
This PR is a part of enabling sync of dynamic chores.
zuev93 added a commit that referenced this issue Dec 9, 2023
… creation chore sync for one using global providers. Improve Unit tests.
zuev93 added a commit that referenced this issue Dec 9, 2023
… creation chore sync for one using global providers. Improve Unit tests.
zuev93 added a commit that referenced this issue Dec 9, 2023
It has lambda as one of arguments. However this lambda might be evaluated and sent to clients as result instead.
zuev93 added a commit that referenced this issue Dec 10, 2023
… creation chore sync for one using global providers. Improve Unit tests.
zuev93 added a commit that referenced this issue Dec 10, 2023
It has lambda as one of arguments. However this lambda might be evaluated and sent to clients as result instead.
zuev93 added a commit that referenced this issue Dec 10, 2023
… creation chore sync for one using global providers. Improve Unit tests.
zuev93 added a commit that referenced this issue Dec 10, 2023
It has lambda as one of arguments. However this lambda might be evaluated and sent to clients as result instead.
zuev93 added a commit that referenced this issue Dec 10, 2023
It has lambda as one of arguments. However this lambda might be evaluated and sent to clients as result instead.
zuev93 added a commit that referenced this issue Dec 12, 2023
zuev93 added a commit that referenced this issue Dec 12, 2023
The event is part of chore stat sync. This sync will be used for dynamic chores to properly sync their argument changes upon state transition. It might be not enough to cover all cases of parameter changes but this will cover some of cases for sure.
The event already enabled for some chores (3 of them) where this approach will work for sure.
zuev93 added a commit that referenced this issue Dec 13, 2023
zuev93 added a commit that referenced this issue Dec 16, 2023
zuev93 added a commit that referenced this issue Dec 16, 2023
#13 Introduce ChoreStateEvents.cs

The event is part of chore stat sync. This sync will be used for dynamic chores to properly sync their argument changes upon state transition. It might be not enough to cover all cases of parameter changes but this will cover some of cases for sure.
The event already enabled for some chores (3 of them) where this approach will work for sure.
zuev93 added a commit that referenced this issue Dec 16, 2023
…re providers sync. (#312)

#13 Enable chore creation sync for all chores. Added setting for future providers sync.
zuev93 added a commit that referenced this issue Dec 21, 2023
Actual state transition logic will be implemented separate in a follow up PR.
zuev93 added a commit that referenced this issue Dec 21, 2023
Actual state transition logic will be implemented separate in a follow up PR.
zuev93 added a commit that referenced this issue Dec 21, 2023
Actual state transition logic will be implemented separate in a follow up PR.
zuev93 added a commit that referenced this issue Dec 21, 2023
StatesManager will be implemented in a follow up PR.
zuev93 added a commit that referenced this issue Dec 22, 2023
Actual state transition logic will be implemented separate in a follow up PR.
zuev93 added a commit that referenced this issue Dec 22, 2023
#13 Create client patch to disable chore transition.

StatesManager will be implemented in a follow up PR.
zuev93 added a commit that referenced this issue Jan 21, 2024
Added SetStateArguments.cs command used by both transitions.
Disable event handlers for Event transitions.
zuev93 added a commit that referenced this issue Jan 21, 2024
Added SetStateArguments.cs command used by both transitions.
Disable event handlers for Event transitions.
zuev93 added a commit that referenced this issue Jan 27, 2024
In order to avoid cycle loops (enter -> wait -> command -> enter -> wait -> ....) introduced new state `ContinuationState` which is a copy of original enter state. Now the flow looks like: enter -> wait -> command -> continuation
zuev93 added a commit that referenced this issue Jan 27, 2024
In order to avoid cycle loops (enter -> wait -> command -> enter -> wait -> ....) introduced new state `ContinuationState` which is a copy of original enter state. Now the flow looks like: enter -> wait -> command -> continuation
polycone pushed a commit that referenced this issue Jan 27, 2024
In order to avoid cycle loops (enter -> wait -> command -> enter -> wait -> ....) introduced new state `ContinuationState` which is a copy of original enter state. Now the flow looks like: enter -> wait -> command -> continuation
zuev93 added a commit that referenced this issue Jan 28, 2024
Syncing sensors themself won't guarantee state machine consistencies. So sync transitions results from cell sensor (Exit, Move).

Introduced new `transition` transition type. Basically it is similar to OnExit but will prevent undesired chore transition upon default conditions.
zuev93 added a commit that referenced this issue Jan 28, 2024
Also merge Patches tuning state machine state transitions in one.
zuev93 added a commit that referenced this issue Jan 28, 2024
Syncing sensors themself won't guarantee state machine consistencies. So sync transitions results from cell sensor (Exit, Move).

Introduced new `transition` transition type. Basically it is similar to OnExit but will prevent undesired chore transition upon default conditions.
zuev93 added a commit that referenced this issue Jan 28, 2024
Also merge Patches tuning state machine state transitions in one.
zuev93 added a commit that referenced this issue Jan 28, 2024
Also merge Patches tuning state machine state transitions in one.
zuev93 added a commit that referenced this issue Jan 28, 2024
Removes EventTransition handlers.
Removes Enter handlers.
Removes update handlers.
zuev93 added a commit that referenced this issue Jan 28, 2024
Removes EventTransition handlers.
Removes Enter handlers.
Removes update handlers.
zuev93 added a commit that referenced this issue Jan 29, 2024
Move start and move update is quite different in comparision to regular state enter / update, because they does not change state machine they do manipulate with Navigator instead.
zuev93 added a commit that referenced this issue Jan 29, 2024
Move start and move update is quite different in comparision to regular state enter / update, because they does not change state machine they do manipulate with Navigator instead.
zuev93 added a commit that referenced this issue Jan 29, 2024
Also connect all move related events to corresponding commands.
zuev93 added a commit that referenced this issue Jan 29, 2024
…ansitToState.cs

Old TransitChoreToState was based on assumption that stateMachine has WaitHostState, however it is not the case for move syncs and transition syncs. For those there is no waitHostState and therefore no waiting.
polycone pushed a commit that referenced this issue Jan 30, 2024
Move start and move update is quite different in comparision to regular state enter / update, because they does not change state machine they do manipulate with Navigator instead.
polycone pushed a commit that referenced this issue Jan 30, 2024
…ansitToState.cs

Old TransitChoreToState was based on assumption that stateMachine has WaitHostState, however it is not the case for move syncs and transition syncs. For those there is no waitHostState and therefore no waiting.
polycone pushed a commit that referenced this issue Jan 30, 2024
Also connect all move related events to corresponding commands.
zuev93 added a commit that referenced this issue Jan 31, 2024
Problem was undiscovered due to faulty tests which we successfully passing. Which has been resulted due to using exposed libraries while in game runtime libraries are not exposed.

Fixed by copying original libraries to test output directory. As result 69 tests has failed.

Applied fixes for those tests.
zuev93 added a commit that referenced this issue Jan 31, 2024
Problem was undiscovered due to faulty tests which we successfully passing. Which has been resulted due to using exposed libraries while in game runtime libraries are not exposed.

Fixed by copying original libraries to test output directory. As result 69 tests has failed.

Applied fixes for those tests.
@zuev93 zuev93 closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants