Zoom In/Zoom Out

BlitzPlus Forums/BlitzPlus Beginners Area/Zoom In/Zoom Out

InvincibleWall(Posted 2010) [#1]
I'm making a 2D side scroll shooter and was wondering what the best way to create a Zoom In/Zoom Out function. The only way I could think of doing it was drawing everything to an image before it goes to the buffer and then scaling the image to Zoom In/Zoom Out

just wondering if this is an acceptable way to Zoom In/Zoom Out or if there is a better/faster way to do it

Thank You for any help you can give


Sauer(Posted 2010) [#2]
That's not a bad idea, but you're going to get a distorted image the more you zoom. Also, you would definitely want to check the code archives for a realtime scale function, as the built in ScaleImage is not fast enough.

Another way to do it would be to pre-render all of your tiles to larger sizes, and drawing a smaller portion of your map. It would give the illusion of a zooming in. To do a "smooth zoom" you would definitely want to check the code archives for a realtime zoom.