Tears are made of camera zoom

The size of the camera can be used to set the mood for the player. Look at this picture:

close-space-man
Guy in space

And then this picture:

far-space-man
Lonely guy in space. Don’t you feel bad for him?

Note the emotional impact! Now that you understand the great value of controlling camera zoom, let’s talk about how I implemented it in our game.

We want our level designers to have the tools to control camera zoom for different areas, like in the image below.

camera
A zoomed-out area and a more narrow section with a zoomed-in camera.

To accomplish this I created a node prefab that holds the target zoom and a trigger collider. This is what they look like in the editor:

editor.png

The player has a script which keeps track of the latest node that it collided with, and slowly moves the zoom of the camera towards the target zoom.

Generic is good

music zones.png
What if Pokémon had the same song for the entire game?

To set the mood for the game we have a spooky ambience looping in the background. But listening to the same song for the entire game will distract the player and force them to buy our OST. This means we want to switch ambience for different areas. But doesn’t the camera nodes sound similar to what we want to do here?

Turns out there are a bunch of stuff that could use the same system as the camera, including checkpoints and events (Like playing a sound or activating a fish).

Node controller UML diagram.png

I refactored the camera node and controller to two abstract classes, which can be derived into the specific functionalities. The node controllers only reacts to the nodes with the same tag as the searchTag member, so a camera controller doesn’t try to use a music node.

Most of the logic should happen in the Node, but if required, the controller can override Update() for example. This is kind of dangerous though, because overriding the function could destroy the implementation if it doesn’t call the base function. To make this safer we could provide abstract functions for the derived classes (like OnSwitch()) and make the important logic private. The searchTag member should also be refactored into something that enforces the user to provide the specific tag.

By using this interface I’ve mass produced node systems for different uses. Let’s end this post by looking at the beautiful result!

all nodes.png
All the checkpoints and music/camera/event nodes

5 reaktioner till “Tears are made of camera zoom”

  1. Hi, it is I. The Designer of time, ready to help you to fix your game.

    I’ve seen your game and it is okay, but it isn’t great. But that’s where I can help you.

    As your game is now, you can’t really call it a game. I mean, it is pretty, even gorgeous at moments. But there is missing one very important part to make it a game. The thing you are missing is some gameplay.

    So my idea is to add gameplay. With gameplay you can call it a game for real, and it would be great.

    So please contact me and I will help you implement som game play. You can trust me. If you for some reason don’t, you can read my blog and see for yourself that I’m a really amazing designer.

    / Yours truly the Designer of time.

    Gilla

  2. I really like your post, it’s very cohesive and explains the why how and what very well. You have a good way with words and I like your use of pictures to convey your thoughts. I do have one thing to say about your beautiful result though. Maybe the nodes should have different colours depending on whether they’re about sound / camera zoom / events, right now I can’t tell which nodes are which and it could help make everything clearer.
    I am unsure how that would be done though, so if it is not possible then it isn’t the end of the world really.

    It’s nice to see a post about something I have never thought about, now I won’t have to think about how to implement a camera zoom in the future, so thanks!

    Looking forward to seeing your game develop some more, it’s looking really good so far. I wish you luck with the beta.

    Gilla

  3. This excellent blogpost has enriched my mind with a deepened understanding of the human psyche, and how we – as people – can be made to feel oh so lonely, or not, depending simply on the context that we put ourselves in.
    As a whole, your *top* blogpost really activated my almonds, many thanks.

    Gillad av 1 person

  4. Tjo Erik

    In a design perspective this is an interesting feature for the game, changing the camera in relationship to the area lets the player see what is relevant for him in the room.

    I think that it is a great idea for the game to use different camera angles so that the game so that the game feels bigger and that lets the player feel that sense of grandness.

    What i wonder is the relation between the player and the bigger room, if the camera would expand to see the entirety of the room would it be a problem then to locate the player throughout the area?

    This post is great if i would be the designer and i want to focus on something in the game, then i can put one of the collider and focus on said object.

    i would like to see how the feature is implicated to the game and tested out

    Gilla

  5. Tjo Erik

    In a design perspective this is an interesting feature for the game, changing the camera in relationship to the area lets the player see what is relevant for him in the room.

    I think that it is a great idea for the game to use different camera angles so that the game so that the game feels bigger and that lets the player feel that sense of grandness.

    What i wonder is the relation between the player and the bigger room, if the camera would expand to see the entirety of the room would it be a problem then to locate the player throughout the area?

    This post is great if i would be the designer in the team, and i want to understand how the camera works, like if i want to focus on a key item or something in the game, then i can put one of the collider and focus on said object.

    i would like to see how the feature is implicated to the game and tested out.

    Ignore the post above, because that one did not include all the words necessary for the assignment.

    Gilla

Lämna en kommentar