Camera zoom in and out.

D

DeveloperElias

Guest
Hello. I'm making a 2-4 player fighting game. I've got the camera to follow two of the characters, but I need the camera to zoom out when one of the characters runs off the screen so that they both are constantly in view, but then zoom in as they come closer together. I have already tried this but I always get the same result, doesn't work. So how I would do it?
 
D

DeveloperElias

Guest
Thanks for the help. I downloaded the free asset and saw that the both are created in game maker studio 1.4 what has completely different view system. I don't say it didn't help, but it still left me many question. I know how the view works in game maker studio 1.4, but I'm kinda new in game maker studio 2 view system. But still thanks for the help!
 

samspade

Member
Thanks for the help. I downloaded the free asset and saw that the both are created in game maker studio 1.4 what has completely different view system. I don't say it didn't help, but it still left me many question. I know how the view works in game maker studio 1.4, but I'm kinda new in game maker studio 2 view system. But still thanks for the help!
Yes, that's my fault. I should have noticed that. The systems are similar though. And my guess is the actually important code (the portion that calculates zoom etc) is roughly the exact same. It might work it you import it, but its different enough that it might not.

Unfortunately, I don't have any code for this particular issue.

Pixelatedpope has a variety of videos on aspect ratio along with one video (linked below) that talks about GMS2 camera's system in relation to the old view system. It might help.
 
D

DeveloperElias

Guest
Well thanks for the help still :). The video helped me understand more about game maker studio 2 cameras.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
YoYo Games also have a Camera tutorial in the IDE. On start up, go to the Tutorials section and install it. :)
 
G

GrandFree

Guest
YoYo Games also have a Camera tutorial in the IDE. On start up, go to the Tutorials section and install it. :)
I've managed to keep using legacy view code in GMS2. I'm able to set the xview, yview, wview, hview, xport, etc. without using cameras.

Is there anything wrong with what I'm doing? I prefer this style over the new camera system, but are there any features the camera system does better or is it really just preference?
 
Top