Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Save Fullscreen Screenshots - Demo + Code

Author
Message
Amalien
4
Years of Service
User Offline
Joined: 30th Nov 2019
Location: Somewhere in outer space.
Posted: 5th Jul 2020 03:13 Edited at: 8th Jul 2020 13:28
Hi all!

Trying to get fullscreen screenshots for my AppGameKit projects has been an issue for a while now; on my Win 7 the PrtScr button only seems to capture the screen render from the first time through the loop, which is pretty much useless.
I've noticed some other people having similar issues, so I tried my hand at making some code to save high res, fullscreen screenshots from an AppGameKit app.

I used GetMaxDeviceWidth/Height() for everything, but you should be able to change that (within the screenshot section) to just GetDeviceWidth/Height() or whatever variables you're using for screen/virtual resolution without any problems. If there are any issues with the resolution or text scaling, just let me know.

I've attached the screenshot code as a code snippet along with some example screenshots and a small demo (with code) that will hopefully be able to help out anybody who's having the same issues with PrtScr.
It seems to work just fine on my computer, but I'd like to get feedback from you guys as well; let me know how it works on your computers or if there's any problems that you run into so I can try to patch them up.
The demo is physics based with pretty standard first-person controls, and the other controls are all being printed on screen.

Hopefully this is helpful to someone,
Ciao!

PS. All media found in this demo was made by myself and is free to use for everyone.





Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 5th Jul 2020 03:32
Thanks Amalien, I can now take shots on my win 8 lappy. Excellent.
Never play leap frog with a unicorn.
Amalien
4
Years of Service
User Offline
Joined: 30th Nov 2019
Location: Somewhere in outer space.
Posted: 5th Jul 2020 03:35
Dude that looks awesome! I'm glad it works for you, and thanks for trying it out!
Amalien
4
Years of Service
User Offline
Joined: 30th Nov 2019
Location: Somewhere in outer space.
Posted: 8th Jul 2020 13:29 Edited at: 8th Jul 2020 13:29
Update:
Tweaked the code a bit so now the images are saved into a screenshots folder which is created in the same folder as the exe rather than tucked away in AppData/Local/etc.
Code snippet and download updated in first post.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 9th Jul 2020 04:59 Edited at: 9th Jul 2020 04:59
Just a thought why.not use

Render to Image
Then SaveImage ?

Would it be faster ?
Cause get image is a bit old fashioned.



This way , you can save screenShots in a mil second.

Since GetImage is really tough on the system. Even if not noticed on PC or Mac , on a mobile device it will.lag and if you want to take like 20 screenshots one after another with a timer or something it will totally lag the device, extreme FPS drop.
Nadav "Haliop" Rosenberg
Lets make the world great forever.

Login to post a reply

Server time is: 2024-03-28 19:30:41
Your offset time is: 2024-03-28 19:30:41