- Home /
Pixel Perfect Camera Consistent World Size
Hi,
I've been working on a pixel-art based game called GRIDLOCKE which uses the Pixel Perfect camera component so that the game looks nice at a variety of resolutions. It works for the most part, but I ran into a bit of an issue regarding the amount of the world being displayed.
Basically, the game is a grid-based game in which players can move around the the overworld quickly. The number of tiles that the player can occupy during combat will change over the course of the game. Enemies will swarm the player from all sides, so I really need a way to ensure that the player always has a minimum world size visible, e.g. 7 tiles radius to move around in plus a few for headroom. I'd really prefer if it's always the exact same amount of tiles visible, regardless of resolution.
My current understanding of how the Pixel Perfect camera works is that it will change the orthographic size of the camera to a nice constant so that the pixels are always pixel-sized. However, I think that what I need per my description is a consistent orthographic size, which seems to conflict with each other. Here are my current settings for the component:
With all that being said, is there a way to allow the player to see a consistent amount of the world without turning everything into a blurry, pixely mess? It seems to work for the most part as long as the player is over the reference resolution, but part of the issue is that the player sees more of the world when running on a higher resolution, and I don't want to have to draw the outskirts of overworld way out of bounds if the player is running the game at, say, 4K.
Thanks for the help.