Game Freezes and Red Title Appears After Screenshot in Firefox
When running Ancient Beast in the browser using webpack-dev-server, taking a screenshot with the shortcut Shift + Impécr (Print Screen) causes the game to freeze. The screen becomes completely non-interactive, and a large red "Ancient Beast" title suddenly appears on screen, even though it was not visible during normal gameplay.
To Reproduce:
Steps to reproduce the behavior:
1- Launch the game using:
npm run build:dev
npm run start:dev
2- Open the game in Firefox at http://localhost:8080/.
3- Start a match and wait for the battlefield to load.
4-Press Shift + Impécr to take a screenshot.
Observe:
The red "Ancient Beast" title appears at the top.
The game freezes and does not respond to input.
Expected behavior:
The game should continue functioning normally after taking a screenshot. No visual glitches should occur, and the user should retain full interactivity.
Screenshots:
Below are two screenshots showing the freeze state immediately after the screenshot was taken:
(Both showcase the red title and frozen game screen.)
Desktop :
OS: Arch Linux
Browser: Firefox
Version: 137.0
Smartphone :
Not applicable — issue occurs on desktop.
Additional context:
This issue may be related to canvas context loss or a suspended game loop triggered by Firefox's screenshot behavior.
The appearance of the red "Ancient Beast" title may indicate an unintended fallback render state.
No error message is shown on screen, and a refresh is required to recover the session.
@turkiasma I can't replicate this. However, holding Shift should show all hex grid coordinates + that logo to inform about branding while at it, standard behavior, though I don't see the hex grid coordinates in your screenies... Maybe somebody else can try to replicate this as well or you figure our the issue for this happening to you. Perhaps try pressing "Shift" key once more and see if the game resumes? 🐻
If anyone else on Linux or Firefox can try reproducing this using Shift + Print Screen, that would be helpful too!
Thanks again! 🐻
@DreadKnight I have the same problem as @turkiasma Im using Arch Linux. When I take a screenshot, the game does not function correctly afterward
@emna9 Thanks for confirming this!
@turkiasma and @emna9 do you have same issue with any of the following as well? https://play.ancientbeast.com ("stable" version) https://beta.ancientbeast.com
@DreadKnight I tried the first link https://play.ancientbeast.com/ ; selected a unit plus ability,it works fine after i did a screenshot but it messed up some features , though when I used the second link https://beta.ancientbeast.com/ the same problem happens after making a screenshot
Thanks! I just tested both links:
https://play.ancientbeast.com(stable): works fine :no freeze after taking a screenshot withShift + Print Screen.https://beta.ancientbeast.com: also works fine : no issue there either. So it looks like the freeze only happens when running the game locally usingnpm run start:dev. Let me know if you'd like me to test anything else! 🐻
If it's okay with you, I'm taking this on. I'll need to ask some questions about intended function though.
@missingno999 Alright, assigned you to it. 2 weeks soft deadline 🐻
So: When you press shift, the pauses, and then the EXACT moment you release shift is when it unpauses. The game doesn't check if shift is being held or not, it only checks for when the key is released. The game can only see if a key is released while it is the focus, and focus shifts away from the game when you do things such as screen shots. The hex overlay, however, does check whether shift is held or not, hence why the overlay might disappear, but the game remains paused. Pressing shift again should unpause. Also, the game is only paused while the logo is on screen. If you hide the logo, the game can be played with the overlay up. This is why the beta release works, but the logo doesn't seem to appear on that.
What would you like the expected behavior to be?
@missingno999 Makes sense. Well, there's no real pause in-game, but the text logo should be showing while holding shift, allong with coordinates being displayed and such.
Should player be able to make moves while the overlay is up? Or should they be locked in place till the overlay goes down?
Should player be able to make moves while the overlay is up? Or should they be locked in place till the overlay goes down?
@missingno999 While idea wasn't quite to make moves, seems in stable version it was working like that; I do miss being able to move that spinning cursor around the field. Seems there was a regression when the text logo was added. You can see the old behavior here -> https://play.ancientbeast.com
@missingno999 An issue with this stuff might be because the logo was probably added using html overlay, when it should have been a canvas element added with the game engine, Phaser.
Seconded, that's what I thought too while thinking today. I can try to figure out how to add it myself, or you could try it out.
Seconded, that's what I thought too while thinking today. I can try to figure out how to add it myself, or you could try it out.
@missingno999 I got plenty other stuff I'm working on, so feel free to poke at it. This could help: https://phaserjs.github.io/phaser-ce/index.html
@emna9 @turkiasma I've merged a supposed fix by @missingno999 Feel free to test again and confirm if it still happens or not 🐻