How do I let iphone users screengrab their game

Get help using Construct 2

Post » Tue May 13, 2014 5:20 pm

Hi, I'd like to let iPhone and android users grab screens of their game (pause then click a camera button) and then the screen-grab should save to the device, I guess in its default photos folder. Is this possible?

Thanks
Mike
B
49
S
9
G
4
Posts: 426
Reputation: 7,071

Post » Tue May 13, 2014 7:38 pm

It would have to be from what ever third party exporter you are using. C2 does not have access to a home folder, however you can:
A: Save the screenshot internally(webstorage, pretty limited)
B: Allow the user to download the screen shot(depends on the device)
C: Mail the screenshot(depends on the device)
D: Send the screenshot to a third party(php, cloud{dropbox,etc}, via ajax

Most of which will require the image be converted from base64 if you want to use the image in anything other than C2.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue May 13, 2014 8:41 pm

My clients hoping for an easy way to allow the player to take screen shots then send post them via instagram, all on the same device..
It doesn't sound like this is going to be easy...if possible at all...

any thoughts anyone?

thanks.
B
49
S
9
G
4
Posts: 426
Reputation: 7,071

Post » Tue May 13, 2014 8:55 pm

That would probably be a better idea than saving to a device folder, but you are going to need a plugin developer to do it.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue May 13, 2014 9:12 pm

iOS actually has a built in way to take screenshots and save them to the photos folder. Simply press the home button and the on/off button at the same time.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Tue May 13, 2014 10:24 pm

Isn't there a built in canvas snapshot option built in?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Tue May 13, 2014 11:19 pm

@Arima heh I do that all the time, just not on purpose.
@BluePhaze Yes, its everything in the viewport in a base64 string.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue May 13, 2014 11:37 pm

but then how to get the canvas snapshot into the right format and right place where the player can find it and easily send it off with instagram?

I don't want to have to tell the player to hold and press actual phone buttons to take screen shots, I want it to be a convenient in game feature that persuades more players to do so, who otherwise might never do it.
B
49
S
9
G
4
Posts: 426
Reputation: 7,071

Post » Wed May 14, 2014 1:10 am

Taking a screenshot with the buttons already puts it in the right format. I haven't used Instagram, but it assume it's like other apps where you can choose an image from the photos saved to the device (don't know how it works on android, but on iOS all images are saved to the same location so it would be easy to find). I don't know of any way to directly send an image to another app, and I'm not sure Instagram can even receive images in that manner either.

I don't understand why you don't like the solution for iOS - doesn't it do exactly what you described, save an screenshot of the game to a photos folder? Then the user could switch apps, select the image from their photos and post it? I'm not sure it gets more streamlined than that.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed May 14, 2014 1:32 am

What he's wanting is no different than what the Twitter plug does.
You push a button, an auth window comes up, and some data is sent to a server.
Well a little more complicated, and a bit more data.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Next

Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666 and 34 guests