Polaroid picture

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Onishion
Veteran
Posts: 295
Joined: Mon Apr 20, 2015 10:36 am
Contact:

Polaroid picture

#1 Post by Onishion »

I've been thinking about something I wanted to try, but I'm not sure if it's something Renpy could do. I know that there's a standard screen shot, but would it be possible to take a screen shot in game, have the game do some automatic edits to that screen shot, and then call up that screenshot as an asset?

Like basically I was thinking of the ability to use a camera or phone to take like a Polaroid picture or a cellphone shot of a given scene, which would involve taking a full screen screenshot, then cropping that image (either before or after saving it), then displaying that image along with a "framing" image like a Polaroid edge or the edge of the smartphone. Is any of that possible, or would I just have to fake it by pre-rendering the shot and saving it in advance? The latter method would work for a static scene, but would not adapt to a dynamic scene unless you covered a ton of bases. You could also "fake" the photo by just displaying a smaller version of the scene in real time within the frame, but then if you called it up it would need to save the variable states of all the elements in the scene, which would be a lot of variables to keep having around somewhere for each photo.

Anyways, thoughts?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Polaroid picture

#2 Post by xela »

Onishion wrote:I've been thinking about something I wanted to try, but I'm not sure if it's something Renpy could do. I know that there's a standard screen shot, but would it be possible to take a screen shot in game, have the game do some automatic edits to that screen shot, and then call up that screenshot as an asset?

Like basically I was thinking of the ability to use a camera or phone to take like a Polaroid picture or a cellphone shot of a given scene, which would involve taking a full screen screenshot, then cropping that image (either before or after saving it), then displaying that image along with a "framing" image like a Polaroid edge or the edge of the smartphone. Is any of that possible, or would I just have to fake it by pre-rendering the shot and saving it in advance? The latter method would work for a static scene, but would not adapt to a dynamic scene unless you covered a ton of bases. You could also "fake" the photo by just displaying a smaller version of the scene in real time within the frame, but then if you called it up it would need to save the variable states of all the elements in the scene, which would be a lot of variables to keep having around somewhere for each photo.
So basically you're asking if Ren'Py can do documented, basic functionality... the answer is yes.
Onishion wrote:Anyways, thoughts?
You should be able to do it without taking screenshots, just by working with layers/capturing entire screen. I can't say that I've tried it myself but it cannot (*shouldn't) be more than a couple lines of code.
Like what we're doing? Support us at:
Image

User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Polaroid picture

#3 Post by Alera »

Aaaages ago I asked a similar question and this is the thread with the answers I received back then: http://lemmasoft.renai.us/forums/viewto ... =8&t=11813 But that's back from 2011, there might be better ways of doing things like that now.

I never got around to coding something like this myself, so I'm not sure how useful it'll be for you, but I hope it helps at least a little!
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

Onishion
Veteran
Posts: 295
Joined: Mon Apr 20, 2015 10:36 am
Contact:

Re: Polaroid picture

#4 Post by Onishion »

So basically you're asking if Ren'Py can do documented, basic functionality... the answer is yes.
Thanks for the help? In wasn't able to find much documentation on screenshots beyond the ability to change whether the save function automatically takes the or not.
You should be able to do it without taking screenshots, just by working with layers/capturing entire screen. I can't say that I've tried it myself but it cannot (*shouldn't) be more than a couple lines of code.
Well, like I said, you could fake it, but I would think that would get complicated. Like say you have two characters on a background. The background is dynamic, so it could be one of several variations of several base backgrounds. Each character is dynamic, so they would be in any of dozens of outfit combinations, dozens of facial feature combinations, etc. So yes, you could theoretically take a "snapshot" of all those variables and store them for later, and then whenever the player accesses that photo it would recreate that entire screen and crop/alter it as necessary, but it would involve storing a lot of data each time.
I never got around to coding something like this myself, so I'm not sure how useful it'll be for you, but I hope it helps at least a little!
Thanks, it looks a little complex but I think I got the gist of it, and it could work for what I wanted to do.

Post Reply

Who is online

Users browsing this forum: Google [Bot], tim640