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

Object movement #3

Closed
matrxs opened this issue Jan 14, 2020 · 2 comments
Closed

Object movement #3

matrxs opened this issue Jan 14, 2020 · 2 comments

Comments

@matrxs
Copy link
Owner

matrxs commented Jan 14, 2020

How should objects move in the new html frontend. This can be done in a number of methods:

  1. As is done now, update the position (e.g. absolute position x y value) of an object 60 times per second and moving it x pixels. Advantage is that existing code can be used, and that precise movements can be executed on screen. Disadvantage is that dom-interactions are costly, such that updating potentially hundreds of objects 60x per second is going to be slow (bu how slow?).
  2. Use CSS animations. This is much easier, as only the goal position has to be given, and a time on how long it should take to animate that change. Open issue with this again is the speed, how fast is this for hundreds of objects at high tick speeds?
@jwaa
Copy link
Collaborator

jwaa commented Jan 26, 2020

Not my expertise really, but I would say that we go for the 2nd. It may be some additional work, but simpler seems te be more maintainable. Also, native css animations sound more optimized than random code we copied from the internet... But could be wrong here :)

@thaije If you made a decision, please open a new issue for that solution, refer to it here in a comment and close this.

@thaije
Copy link
Collaborator

thaije commented Jan 30, 2020

Default front-end now uses css animations for movement of objects.

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

3 participants