dk123 Posted February 18, 2016 Share Posted February 18, 2016 Hi, I've recently just started using Phaser - this is absolutely a pleasure to work with. I was just wondering though how I might go about creating a screenshot, where the screenshot contains only certain entities on the screen. I was looking for a draw function of some sort where I could loop through all the entities and have only a portion of them draw on the screenshot, but I haven't been able to find any functionality that might allow me to do this. Would anyone perhaps know how I should go about doing this? Link to comment Share on other sites More sharing options...
tips4design Posted February 18, 2016 Share Posted February 18, 2016 You can hide (set visible to false) all elements that you don't want to appear in the screenshots. After that you can just download the canvas image as an image file. Link to comment Share on other sites More sharing options...
dk123 Posted February 18, 2016 Author Share Posted February 18, 2016 Thanks tips4design - will that make the screen flicker though? I'd like to save the screenshot without affecting how the screen is displayed. Link to comment Share on other sites More sharing options...
tips4design Posted February 18, 2016 Share Posted February 18, 2016 Well, if it only happens for one frame the user shouldn't be able to see any flicker if the game runs at 60FPS. But, the best you could do is draw them on an off-screen canvas. Here is a message from rich explaining how you can create an off-screen canvas with Phaser. fillmoreb 1 Link to comment Share on other sites More sharing options...
Recommended Posts