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 Classic Chat / [SOLVED] [Help] How can you schedule screen capture?

Author
Message
AliceSim1
5
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 2nd Sep 2019 01:03
Hi there!
A question, programming with AppGameKit, is it possible to capture the game screen and turn it into an image in memory, for example save it to disk?

The author of this post has marked a post as an answer.

Go to answer

TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 2nd Sep 2019 03:52
yes possible
StartScreenRecording( szFilename, microphone )
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 2nd Sep 2019 03:54 Edited at: 19th May 2022 06:43
This post has been marked by the post author as the answer.
Here's a function I've been using. Be sure to place it at the end of your gameloop to make sure everything is up to date & rendered for the screenshot.

*Edit 2022-05-19*
I've just noticed a built-in command called GetImage() for dumping the BackBuffer to an image. Perhaps this is something new?
It's much easier to work with, also it doesn't have issues with Draw() commands being upside-down.

New Version:


Old Version:
AliceSim1
5
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 2nd Sep 2019 11:38
Nieb
Thank you!!! I just learned something new and important to be able to capture the game screen!
This function ... should be called before SYNC () or after?

TamBam wrote: "yes possible
StartScreenRecording( szFilename, microphone )
"

It's not what I need, thanks anyway.
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 2nd Sep 2019 22:21
Happy to help. I put it right before Sync().
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 3rd Sep 2019 00:18 Edited at: 3rd Sep 2019 00:27
Quote: "It's not what I need, thanks anyway."


Render()
GetImage( imageID, x, y, width, height )
ClearScreen()
SaveImage( iImageIndex, filename )
DeleteImage( iImageIndex )

Perhaps?

Check out the HOME>COMMANDS>IMAGE section of the documentation for more details.


Edit
OOPS, didn't see the solution post, sorry.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
AliceSim1
5
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 3rd Sep 2019 10:06
Nieb wrote: "Feliz de ayudar. Lo puse justo antes de Sync ()."

Perfect! It works great!

Login to post a reply

Server time is: 2024-04-26 09:00:19
Your offset time is: 2024-04-26 09:00:19