Loading...

Christian Martínez de la Rosa

Yes, Honey

About Me

I am Christian Martínez and I participated in Code Team in this project.

I have worked mainly with C++ for three years, but I am interested in other languages like C#, Python, Javascript and Lua. The most I like is to create tools to make work easier for others.

Contribution


Project overview

I have worked mainly in Gameplay, but in a few occasions I moved to Engine Programming.

I have worked on the camera and level/environment programming on almost all the time. At the first time I worked with Ivan Ropero setting the Wwise environment. Next I moved to Gameplay programmer, and on one occasion I moved again to Engine to make some Maths utility for camera shake and modifying the Component Curve to set normals and fix path iteration.

Camera

Overview

The camera is highly important in a video game and we had to be careful with it. The fact that our game has two players cooperative increase the difficulty. The camera has to be comfortable and safely for game logic. In addition, the camera has to provide a very good feeling. I worked in Camera System with Ivan Ropero.

Pivot

First of all, the game will have different angle cameras for every part of a map. So, I developed a visualizer in order to let the designers know where the camera will be respected the midpoint between the two players.

Pivot move

The Pivot moves with midpoint in players.

Pivot edit

The pivot can edit with 2 angles and a distance.

Pivot info

The data that the designer can manipulate.

Pivot play

In play, the camera will set its position on the point.

Asymptotic Average

In order to have a smooth movement and a good feeling I implemented the Asymptotic Average. It consists in move the camera almost to the position it has to be. The result is a smooth movement. We can see the difference here:

Hard Follow

Smooth Sollow

Data

Static

The camera has some types: Dynamic, Static, One Axis and Cinematic. The default is the Dynamic camera and will follow the mid point. I also create the static camera that will not move and will track always the players.

static camera

Block movement

The players must not move out of bounds of the camera. There was a problem that, even if there is a gap that the player could move, that movement will leave the other player out of the camera, so we have to solve that. Then we create the Free camera, that allow free movement, although it has not space.

Limiter Camera

In some cases, we do not want the camera overstep a line, so I implemented a small system of a camera limiter.

It consists in set two positions as limiters, it will draw an infinite imaginary line from one point to another and set a direction. When the camera exceeds the line, it will clamp the position.

Camera Transitions

The game has multiple cameras in each scenario, so we need to transition the camera smoothly and comfortable for the players. For transitions we created a Prefab with a system to transition the camera.

The systems are conformed from three colliders that controls the direction of the movement and some visual information to know the future camera position and the previous camera. We have some information that the designer can set.

    Level Programming

    Breakable Props

    I have made a Script that allows an object explode when players hit it. It is multipurpose, and only needs the original object and the same object with a broken mesh.

    static camera static camera

    It is also used in the Door on the tutorial.

    Rocks

    On the first level there is a part of rocks falling downhill. I have made a system of three points where two of them are used for calculating the range of the spawn of rocks and the other to calculate the direction of the climb. It also has variables in the inspector to modify the random time of spawn, the damage of the rocks and the velocity.

    rocks

    Helping in rotations

    I also helped in some rotations like the balance, making use of quaternions and the math library the engine has.

    balance

    Bezier curve

    Fix iterate path

    I continued the work that Oriol Capdevila made creating the component curve. The problem was that the objects were not following the path at a constant speed and makes the level of the minecarts so tricky.

    Normals

    Once the component curve was created, I complement the component with the normals. Each control point has a normal and in all segments it makes an interpolation.