youvsvirus / youvsvirus-unity

Unity version of the you vs virus game.
GNU General Public License v3.0
1 stars 1 forks source link

Moving Camera #54

Closed ghost closed 4 years ago

ghost commented 4 years ago

Placing map barriers on the edge of the viewport leads to problems as soon as the viewport aspect ratio is allowed to change during runtime. Especially, it will break when the player switches between full screen mode and windowed mode in the WebGL game. Trying to scale the map barriers along with a changing viewport is a non-robust, dirty solution.

Implement the camera to move along with the player smiley. This gives us a lot more freedom, also for different kinds of maps in the future.

Maybe also try to have camera movement blocked by a map barrier.

maccxs commented 4 years ago

My suggestion would be to not account for a moving camera at the moment. This might be something to tackle in the future but I think at the game lives from having one scene in front of you, where you see everything that happens. If the player could move out of the map there would be no benefit so far. But I am open for discussion. :-)

maccxs commented 4 years ago

I think I finally understood your problem here and we have not solved it. But I still do not think that a moving camera is the best solution since it is not what we are aiming for with the game at the moment. The implemented changing viewport solution is robust in that it detects screen changes and makes sure that the boundary is where we expect it to be. Maybe we have to live with that and account for that in the game. The other solution would be to fix the resolution to e.g. 16:9. This would mean that we would have some blank space around the game if the screen does not fix exactly to the wanted size.... mmh maybe.