Any way to save snapshot to file with Node-Webkit?

Get help using Construct 2

Post » Thu Apr 24, 2014 12:41 pm

Hey all, just a quick question.

I've heard of a cool remote playtesting technique where, instead of forcing your players to record themselves, you just take a low-quality screenshot every second or so, then get them to send you those screenshots to look through.

I'd like to try that out with my node-webkit build, but I'm not sure how to actually save a canvas snapshot to a file. Any tips?

Thanks!
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Thu Apr 24, 2014 1:49 pm

sqiddster wrote:Hey all, just a quick question.

I've heard of a cool remote playtesting technique where, instead of forcing your players to record themselves, you just take a low-quality screenshot every second or so, then get them to send you those screenshots to look through.

I'd like to try that out with my node-webkit build, but I'm not sure how to actually save a canvas snapshot to a file. Any tips?

Thanks!


Not sure the download action would work in that case, if you have a way to change it to a png file before saving it, it would be great, if not, you could still write when the snapshot is ready, the base64 string corresponding to a new file, and since base64 strings can be viewed, should be enough to begin with.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Thu Apr 24, 2014 2:37 pm

Tried that, but it didn't work. It outputted the files fine, but Windows said they were corrupted/invalid.

I don't think I'm going to do this anyway since it seems that taking a snapshot hangs the game for a split second, obviously unacceptable to be doing during gameplay on a regular basis.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Thu Apr 24, 2014 2:42 pm

@sqiddster
I can't speak for the thousands of games out there. But for every game that I played which supported in game screen shots. Everyone had a split second pause. If I wanted a screen shot without the pause I always needed to use an exterior image capture program such as Bandicamp,Fraps....
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Thu Apr 24, 2014 2:47 pm

@jayderyu Oh, yeah, I'm not saying at all that this is a C2 weakness or anything! I totally agree with you.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Thu Apr 24, 2014 2:49 pm

I know. But I think if players feel the delay is too long. They can search for an alternative and if they don't mind they can use it :)
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Thu Apr 24, 2014 2:54 pm

sqiddster wrote:Tried that, but it didn't work. It outputted the files fine, but Windows said they were corrupted/invalid


That's weird, or maybe you tried to open it with the image viewer, I meant taking the text inside the file, and open this file inside a browser (maybe doing a web shortcut is possible too)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Thu Apr 24, 2014 3:03 pm

@jayderyu in an action game like this, any delay greater than 1/60th of a second is too long.
@Aphrodite yeah, I tried to write to a .png file. Are you suggesting saving the string, then opening it in a browser? It could work but I think that would be very painful when looking through hundreds of pictures.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Thu Apr 24, 2014 3:22 pm

Anytime you grab from the gpu it's going to take a tick.
Image ImageImage
B
172
S
50
G
183
Posts: 8,439
Reputation: 115,597

Post » Thu Apr 24, 2014 3:24 pm

sqiddster wrote:@jayderyu in an action game like this, any delay greater than 1/60th of a second is too long.
@Aphrodite yeah, I tried to write to a .png file. Are you suggesting saving the string, then opening it in a browser? It could work but I think that would be very painful when looking through hundreds of pictures.


I meant that (sort of), but yes, a png output would be far better, I agree.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], LunaticCat, WesleyDeveloper9 and 5 guests