Skip to content

fix-created-objects#33

Merged
SCratORS merged 1 commit intomainfrom
fix-created-objects
Feb 12, 2024
Merged

fix-created-objects#33
SCratORS merged 1 commit intomainfrom
fix-created-objects

Conversation

@SCratORS
Copy link
Copy Markdown
Owner

  1. When we increase FPS, the MAX_FRAMES variable is also incremented 2 times faster. It is mainly needed to control the speed of creating new animation objects. Therefore, its value must be increased by 2 times, otherwise there will be too many objects.
  2. I also returned ForceUpdateCalendar when the screen is turned on, after all, it gives a result with frequent time changes (as an option during testing)
  3. In some animations, I changed the way I skip texture changes. like in Texture change for 40 FPS #30

P.S. While there are still questions with Fairy (there are complex animations), FireWork and Eye - 20 FPS (When switching to them from 40 FPS, they work faster than necessary for a while)

1. When we increase FPS, the MAX_FRAMES variable is also incremented 2 times faster. It is mainly needed to control the speed of creating new animation objects. Therefore, its value must be increased by 2 times, otherwise there will be too many objects.
2. I also returned ForceUpdateCalendar when the screen is turned on, after all, it gives a result with frequent time changes (as an option during testing)
3. In some animations, I changed the way I skip texture changes. like in #30

P.S. While there are still questions with Fairy (there are complex animations), FireWork and Eye - 20 FPS (When switching to them from 40 FPS, they work faster than necessary for a while)
@SCratORS SCratORS merged commit e24ed41 into main Feb 12, 2024
};

private static final int MAX_FRAMES = 33;
private static final int MAX_FRAMES = 66;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I increased for some but forgot to increase for others. Sorry for that.

object.setViewPosition(_x, _y * ratio);
object.frameCounter = 0;
object.animCounter = 0;
object.animCounterSkip = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to replace this by counter 👍

@Doctoror
Copy link
Copy Markdown
Contributor

Doctoror commented Feb 12, 2024

FireWork and Eye - 20 FPS (When switching to them from 40 FPS, they work faster than necessary for a while)

Yes, I know that. I decided that we can have this as is, because animation change is probably rarely noticed by the user, and fireworks and eyes don't look too bad at 40 fps for a short period. Ideally, of course, we don't want that happening. We could increase them to 40 fps and skip frames but then it means we get unnecessary CPU/GPU load. Another way we can go around is to pass current FPS to Eyes and Fireworks, and if it's 40 then skip frames, otherwise run normally.

While there are still questions with Fairy (there are complex animations)

Yes, for some reason Fairy looks faster but I don't understand why is that happening.
Even though I did not increase number of frames for Fairy I added frame counter skip which should have kept it at the same speed. For Fly in Fairy, I generated new matrix transforms which should have also kept the same speed but they look faster too. I decided to merge as is because they still look good and the benefit of 40 fps outweigh the downside of a little speed increase.

@SCratORS
Copy link
Copy Markdown
Owner Author

Yes, for some reason Fairy looks faster but I don't understand why is that happening.

I'll deal with her. And we need to finish this animation a little bit.

@SCratORS SCratORS deleted the fix-created-objects branch February 13, 2024 06:30
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