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

Dependency Trigger #6

Open
Tomatower opened this issue Feb 16, 2017 · 0 comments
Open

Dependency Trigger #6

Tomatower opened this issue Feb 16, 2017 · 0 comments

Comments

@Tomatower
Copy link
Owner

Usually values depend on a higher-level logic (for example position in t depends on speed, reflection in t depends on the walls position).
Especially Environment variables like walls and map boundaries are not always aware of all the effects that depend on those - and so they shall never need to manually trigger a recalculation.

The calculated values shall define, on which values they depend.

An Example:

In Pong, the position in t+n depends on

  • The speed of the ball
  • The position of the walls
  • The position of the paddels (may change history - or not)

So whenever such a value changes, the object has to know, that it has to double check, if it anyhow changed the future
Another example:

  • The size of the playground changes (i.e. user resized the window). So all Wall-colissions have to be recalculated.
  • The position (or trajectory, depends on implementation!) of the user paddle changed - so check if any update would have to be performed!
  • An upgrade (collectable/buyable... ) changes the speed of the ball. The trajectory itself is still correct, but the timings have to be corrected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant