-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
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
AnimatedTextures do not pause when tree is paused #44625
Comments
I'm not sure if this can be fixed since AnimatedTexture is a resource, not a node that obeys a specific pause mode. After all, you may want specific AnimatedTextures to still be animated if the game is paused. |
If you have a sprite in animation or an animated sprite and pause then they pause, but if your sprite is an animated texture then it doesn't. That doesn't make any sense. Also, animated textures are literally the only means of supporting tilemap animation so because of this limitation, anyone with a tilemap cannot have a proper pause game. I get what you're saying, but technical points aside, when you use paused=true you want the game to stop and freeze, ignoring animated textures makes this feature redundant and having a pause screen near impossible... I guess more of a direct question, why can't animated textures be updated as part of some base level process code, is it because opengl supports these kinds of textures on the gpu? |
Have found a quick fix for this. var alltiles =tile_set.get_tiles_ids() for i in alltiles: Do not know it's performance, works well on a tileset with around 200 tiles, but haven't tried it on a low-spec machine. |
For Godot 4.0 you can do something like this to pause animations for each tile set.
Would have to restore the frame duration from somewhere though... I have read through the documentation but doesn't appear to be an easier way to do this! https://docs.godotengine.org/en/latest/classes/class_tilesetatlassource.html |
In Godot 4 it's a lot harder to implement our own pause function unless there's some other workaround I don't know about. I think This issue is marked as a discussion but there hasn't been any comment against it since it was created. It isn't exactly a regression but something that was reasonably easy to do is now harder. Pausing a game is a very common action and pausing means stopping everything. What can be done to progress in this issue? Would a PR help? |
Godot version:
3.2.3
OS/device including version:
Linux mint 19.1
Issue description:
Animated Textures (tres) do not pause when game is paused via get_tree().paused=true
Observe the gif below, when the first dialog appears (this is set to process so does not pause) the tilemap and game pauses ok. Now, wait for the next screen and when the second dialog appears you will notice the blue graphics (animated texture in a tilemap) are still spinning.
It is irrelevant whether the tres is part of a tilemap or a texture to a sprite, the same thing happens. Note, particles pause just fine so it is not linked to #41582 that I raised a while ago regarding particles/tres not stopping during debug. This is a more serious bug as it affects gameplay.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: