Home / StartPage / Non Combat Systems Design / Camera and Tether System

Camera and Tether System


The Camera system in Kaiju Combat is essentially identical to the system used in Godzilla: Unleashed, which was designed to flow smoothly for 1 - 4 players.  Much of the camera system is defined by a series of text values in a camera_settings.txt file, which is tuned by designers.  Tuning these values needs to happen before significant detail work is done in the environments.

2-Player Parameters
  • Cameras have an xyz position, and an xyz target (or look-at-point).
  • If there are only two monsters on the screen, we calculate a point exactly half-way between their centers in the XY plane - this gives the X and Y target coordinates for the camera.  The Z target coordinate is an adjustable parameter in the camera_settings text file.
  • Calculating the position of the camera is slightly more complex.  The camera is always on the YZ plane orthogonal to the line defined between the monsters, and containing the midpoint between them.  To find the camera's Z coordinate We define a minimum and maximum range for the monsters, and a minimum and maximum height for the camera.  When the monsters are at the minimum range (or below) the camera remains at the minimum height.  Once the monsters exceed the minimum distance, and move toward the maximum monster separation, the camera moves smoothly between its defined minimum and maximum height.
  • To find the camera's XY coordinate (which we can think of as simply Y, if we think of the line between the monsters as the X-axis) we simply slide along at our given Z until we can see both monsters plus some amount of "overhang" on either side of the monsters.  The overhang is defined in the camera_settings file.
3&4-Player Parameters
  • With more monsters, our calculation to find the camera XY target is more complex - but once that is done all other parameters should function similarly.
  • We consider each monster to be a 2D circle (with radius equal to the "camera overhang" parameter) and then find the smallest bounding circle which includes all monsters.  The center of that circle is the camera XY target, and the radius of that circle is the "monster distance" parameter.
  • The other significant change is that, rather than allowing the camera to rotate (by creating a YZ plane relative to monster positions) we simply always place the camera due south of the camera target.  This keeps screen-relative information consistent for all players.  The optimal viewing direction should probably be defined per-environment, for aesthetic reasons.
Monster Tether
  • Inside the camera parameters we defined a "maximum range" for monsters on-screen.  To ensure that this parameter is respected (and thus the camera won't need to freak out when it is exceeded) we put all monsters on an invisible "tether" which prevents them from moving further away from the camera XY target than the value defined as their "maximum range".  This is done with a simple "if X > value then X = value" statement, which is evaluated every frame.
  • The Tether is defined in terms of Camera XY target - so the camera systems needs to be functional before the tether can be properly implemented.



    Guest  15 Dec 2012 
    I agree with the forums that, as much as it "worked" in the other games, the tether system in multi-player was still a little... limiting. Sure it kept you forced in a fight but it also didn't feel like you were a giant monster doing whatever you wanted. If there's a possible way to change this, that'd be awesome. Maybe in an Online set up, you could make a camera for each individual monster for the respective player. sort of make it a third person brawl rather than an omnipotent "everyone sees everything" sort of deal. I understand that wouldn't be possible for a "One system with you buddies" multi-player unless the dreaded split-screen were involved, but that's all I have to say. I don't HATE the tether system, I'm just not the biggest fan of it.
    DaikaijuFan (Guest)  17 Dec 2012 
    Difficulties in managing the camera are probably one of the reasons we don't get to see more 4 player 3D fighting games. The setup in Godzilla: Unleashed was certainly sufficient if not perfect (but what is?) so using a similar system is a good idea. Considering what a large impact the camera can have on gameplay it's good to see whoever writes these things seems to have such a good understanding of the system.

    Something that was mentioned on the forums was using a lower camera angle to give the game more of a cinematic feel and really make the kaiju look huge. If I'm understanding things correctly this is what's being described in the second bullet of the 2-player parameters? If the minimum and maximum heights of the camera can be easily changed in a .txt file, finding a good low angle for close ups when the monsters are near each other could both make the gameplay feel more dynamic and set up some great screenshots for advertisements.
    Post a comment

    Your Name or E-mail ID (mandatory)

     

    Note: Your comment will be published after approval of the owner.




     RSS of this page