Mexican Standoff - Game-a-Week #5 (7DFPS)
About
Mouse: Look around
Scroll: Change FOV
IdeaMy fifth weekly prototype happened to be in the same week as 7DFPS. So I decided last minute to create a fps prototype. After some thinking I came up with some way to spread your (dual-wielding) guns like a Mexican standoff.
Split viewMy first approach was making the player able to split the screen in half so that there was one screen for each eye. When the player pressed RMB and dragged the mouse to the right, they would ‘tear’ the screen apart and create the split view.
This came with its fair share of problems. I couldn’t figure out to get this to work when the player was turned around. Because the ‘tearing’ of the screen and rotating the player both used the Unity Mouse axis. So decided to take another approach which in my opinion also makes a little more sense.
FOVThat brought me to the second and final approach. This way all the information is still in your screen (nothing is out of frame because of the narrow FOV of the split screens) and some nice cinematic black bars appear. Which I am actually pretty proud of. How it works is that when the player scrolls: the field of view changes, the camera rect gets shorter and the camera rect is moved up to stay in the center of the screen (if you don’t do this the top of the camera rect just moves down. I found out that the formula to achieve this effect was: screen y position (Y) = (1 - screen height) / 2.
Because unfortunately I can’t work full-time on games yet, this prototype isn’t as fleshed out as I’d like but I hope you get the idea I want to get across.