How to make this zoom animation (like a magnifying glass on the image)?

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
zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

How to make this zoom animation (like a magnifying glass on the image)?

#1 Post by zeroTheHero »

I want a part of my image to be magnified, and the magnified portion can be moved, kinda like if you have a magnifying glass moving over the image. I'm new to ATL, I tried making a smaller transparent screen with 2x zoom and moving it over my image, but it didn't really work. How can I get this effect?
Thanks!

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: How to make this zoom animation (like a magnifying glass on the image)?

#2 Post by zeroTheHero »

ummm some help please?... I'm pretty stumped here

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: How to make this zoom animation (like a magnifying glass on the image)?

#3 Post by rames44 »

Patience, grasshopper. LOL

You say “the magnified portion can be moved.” Do you mean that it moves by itself according to some pre-coded rules, or that the user can move it arbitrarily? Makes a significant difference on the implementation.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How to make this zoom animation (like a magnifying glass on the image)?

#4 Post by trooper6 »

There is some code from a while back about turning your cursor into a flashlight that will illuminate a dark image where the cursor goes. I image that could be adapted for this idea. I’m on my phone so I can’t search for it, but I bet it is in the Cookbook somewhere.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: How to make this zoom animation (like a magnifying glass on the image)?

#5 Post by zeroTheHero »

rames44 wrote: Wed Dec 12, 2018 1:46 pm Patience, grasshopper. LOL

You say “the magnified portion can be moved.” Do you mean that it moves by itself according to some pre-coded rules, or that the user can move it arbitrarily? Makes a significant difference on the implementation.
The original idea was to have it move around randomly, so it moves by itself according to some pre-coded rules. That being said, I'm also interested in knowing how the user can make it move arbitrarily. More knowledge never hurts :D

Also, I'd like to change the size of the zoomed in area. Can we have another pre-coded rule for this?
Thanks for your time!
Last edited by zeroTheHero on Wed Dec 12, 2018 11:06 pm, edited 2 times in total.

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: How to make this zoom animation (like a magnifying glass on the image)?

#6 Post by zeroTheHero »

trooper6 wrote: Wed Dec 12, 2018 4:58 pm There is some code from a while back about turning your cursor into a flashlight that will illuminate a dark image where the cursor goes. I image that could be adapted for this idea. I’m on my phone so I can’t search for it, but I bet it is in the Cookbook somewhere.
Thanks for the tip! I did manage to find this viewtopic.php?f=51&t=20872

This is really cool, but not quite what I was looking for. Will try to learn more about this from the docs and apricotorange's post, and see if I can change it to suit my needs.

Just a couple things I want to clarify- I want the zoom to move along a pre coded path. Also, it would be ideal if I could have the size of the zoomed in area change. This would also be pre-coded.

Any thoughts? Thanks for your time!

Post Reply

Who is online

Users browsing this forum: Alex