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

Use Fyne animation API instead of goroutine to run simulation #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dweymouth
Copy link

Switch to using fyne.NewAnimation to drive the evolution of the game. This means it will be automatically thread-safe under the upcoming threading model changes and also serves as an example of fyne.NewAnimation

@andydotxyz
Copy link
Member

Hmm, I see how this will be beneficial in the future from a threading point of view - but I'm not sure it's a great demo of the animation API, as it doesn't actually use the animation progress to drive any graphics update...

@dweymouth
Copy link
Author

Maybe we will need a new API like fyne.NewTicker once the new threading is in place, for things that should run on every frame but don't need the whole animation framework?

@andydotxyz
Copy link
Member

Maybe we will need a new API like fyne.NewTicker once the new threading is in place, for things that should run on every frame but don't need the whole animation framework?

Maybe. Maybe also the infinite animation you suggested would not pass in the parameter that we are ignoring here as you can't tell how close to the end it is...?

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

Successfully merging this pull request may close these issues.

2 participants