A 2D Strategy Game - Zoom In/Zoom Out Feature Possible?

Hi all,

I’m a professional app developer who’s gearing up to code his first Unity game, which will be a 2D strategy game. I envision the game to be played on a large rectangular grid, and now I’m going through the process of working out the game specs.

So I imagine my gameboard will be quite large, perhaps 50 x 50 squares. I have some memory concerns about that, but more importantly, I want to know: Will I be able to offer my players a Zoom In/Zoom Out feature in the finished game? I’ve been searching the online Unity manual, and this is unclear to me. Thanks!

Generally the answer to any “can you do X?” question is always “Yes.”

Without more details about what you are doing, nothing more can be said. The way you zoom a UI-based game versus a sprite game versus a 3D game is going to be completely different.

1 Like

You can zoom in/out a 2D camera by modifying the camera.orthographicSize Unity - Scripting API: Camera.orthographicSize
Whether that will cause performance issues or not depends on everything else in your game, naturally the more things you render the more expensive it becomes.
However in 2D you are much more likely to be limited by Unit Logic, Pathfinding, AI rather than Rendering.

1 Like

This is excellent advice, thank you so much!