Tip:
Highlight text to annotate it
X
Hi there
in this new video tutorial I'm going to show you how to implement
in this new video tutorial I'm going to show you how to implement
a zoom or scalling effect in Game Maker Studio
a zoom or scalling effect in Game Maker Studio
this is the effect I'm talking about
zooming in, zooming out
in a previous video I show you how to implement a camera rotation effect
in a previous video I show you how to implement a camera rotation effect
well, we're going to use basically the same approach
but this time for zoom or scalling effect
but this time for zoom or scalling effect
but this time for zoom or scalling effect
but this time for zoom or scalling effect
ok, now let's get back to the code
I put all the code in a single object
this is the object
this is the object
as you can see it has only two events
in this create event we just need to add this zoom_factor variable
in this create event we just need to add this zoom_factor variable
in this create event we just need to add this zoom_factor variable
in this create event we just need to add this zoom_factor variable
we need to initialize it with a value of '1'
and now let' see this 'Step' event more in detail
and now let' see this 'Step' event more in detail
and now let' see this 'Step' event more in detail
and now let' see this 'Step' event more in detail
here I'm decreasing the zoom_factor value each time I press the 'add' key
here I'm decreasing the zoom_factor value each time I press the 'add' key
here I'm decreasing the zoom_factor value each time I press the 'add' key
here I'm decreasing the zoom_factor value each time I press the 'add' key
and here I'm increasing the zoom_factor value each time I press the 'subtract' key
and here I'm increasing the zoom_factor value each time I press the 'subtract' key
and here I'm increasing the zoom_factor value each time I press the 'subtract' key
and here I'm increasing the zoom_factor value each time I press the 'subtract' key
and here I'm increasing the zoom_factor value each time I press the 'subtract' key
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
once the zoom_factor variable value is modified I need to multiply it by my room's width and height
and once the multiplication is performed I need to assign this value to the current view
and once the multiplication is performed I need to assign this value to the current view
and once the multiplication is performed I need to assign this value to the current view
and once the multiplication is performed I need to assign this value to the current view
and once the multiplication is performed I need to assign this value to the current view
remember in Game Make Studio the default view is 'o'
remember in Game Make Studio the default view is 'o'
so basically you want to replace this number here
this '960'
you want to replace this with your room's width
you want to replace this with your room's width
you also want to replace this number here
you also want to replace this number here
this '540'
you want to replace this number with your room's height
you want to replace this number with your room's height
you want to replace this number with your room's height
you want to replace this number with your room's height
and basically this is all what you need
and basically this is all what you need
and basically this is all what you need
to perform this scaling or zomming effect
to perform this scaling or zomming effect
as I said, is the same approach I use in the camera rotation effect
as I said, is the same approach I use in the camera rotation effect
as I said, is the same approach I use in the camera rotation effect
as I said, is the same approach I use in the camera rotation effect
basically modifying the view values you can obtain this effects
basically modifying the view values you can obtain this effects
basically modifying the view values you can obtain this effects
basically modifying the view values you can obtain this effects
basically modifying the view values you can obtain this effects
basically modifying the view values you can obtain this effects
this can be pretty useful for different purposes and for different type of games
this can be pretty useful for different purposes and for different type of games
this can be pretty useful for different purposes and for different type of games
this can be pretty useful for different purposes and for different type of games
okay, that's all
okay, that's all
I hope you find this video useful, see you.