-
Notifications
You must be signed in to change notification settings - Fork 329
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
Vector based sprites #2184
Comments
Can I ask why the request for reverting aspect of #2021? I agree |
Technically you are 100% right that scale is a vec2. However, after looking at a lot of code I'm not entirely convinced this is the right path. Likely in 99% of cases users want uniform scale. The sprite initializer also take a float scale so we already have an inconsistency. Looking at existing libraries out there we can see that scale appears as both float and vec2. There isn't really a right or wrong solution here. Even pyglet sprites are using float scale. However.. if we fix all the issues with vec2, use it consistently and the performance testing is promising it might be the way to go. There is a lot of work that needs to go in there to ensure that we have a future proof api. Also remember that sprite properties are the hottest path in the arcade code base. They can be called hundreds of thousands of times per second. Almost every system interacts with them. Right now I don't see that we have the time to attack this problem. We already have way too much on our plate and need to get this release out as soon as possible. If we can take our time and design some new sprites in I would suggest making a new issue for starting this experimentation. Introducing new sprite types and see how they play out is a much safer option. |
Put 10+ hours into fixing up pyglet vectors with complete unit tests |
@pushfoo Created this branch Vecifying sprites fully. Is someone is able to performance test that vs the current sprites with good results it's possible we can get that in for 3.0. The work just needs to be done. https://github.com/pythonarcade/arcade/tree/scary-vecs-and-nice-sprites @DigiDuncan Is likely interested in this. |
Feel free to make optimizing PRs into #2219. It passes tests, but it does not try to be as fast as possible. |
Likely it's simpler to keep the old float scale for now because most users rely only on uniform scale. We can get more fancy about these properties in the future, but only when we have vectors sorted out. Only scale being a vec2 doesn't really make sense right now.
New issue should be created for sorting out vectors.
The text was updated successfully, but these errors were encountered: