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.
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.
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.
The Pivot moves with midpoint in players.
The pivot can edit with 2 angles and a distance.
The data that the designer can manipulate.
In play, the camera will set its position on the point.
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.
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.
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.
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.
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.
It is also used in the Door on the tutorial.
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.
I also helped in some rotations like the balance, making use of quaternions and the math library the engine has.
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.
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.