Josep Casanovas Vidal (Josef21296)


Programmer

Who I am?

My name is Josep Casanovas (AKA Josef21296) and I am currently studying a Game design and development degree at CITM(UPC) in Terrassa(Barcelona).
I am focused on the programming side of game development with knowledge of C++, Unity3D(C#), OpenGL, GLSL. I also have some knowledge on UnrealEngine4, Python and JavaScript.

My participation in Njoy Games

I have been part of the Njoy Games team as a programmer. During the development of the game I have moved through some areas:

  • I started on the graphics team taking care of first game vision and lighting approaches.
  • Then I moved to the stage scrum as part of the barrel puzzle team doing its firsts iterations.
  • At the end part of the project I moved back to the graphics side taking care of directional light shadows.
  • Also worked on some bug fixing as all my teammates.

In detail

    Barrel Puzzle

I participated on the first iterations of the barrel puzzle programming C# scripts for the game.


First of all I created the random path the puzzle have and the player must memorize. Our designer created a pool of possible paths, those were hardcoded into the script to store the walkability map of the path. Once the game starts a random one from the pull is selected puzzle, when orientation is selected the walkability information is rotated to match with it. On the first iteration some meshes were spawned on walkable tiles to let the player the path. This way the path walkability information is correctly stored to be used later for the barrels and the movement system.



On first iterations of the puzzle, the player had to hit the correct barrels to make them fall. Once a barrel fell, the global walkability map used by the player movement was updated using the previous path walkability information. This way the player could move to the path's walkable tiles/barrels to complete the puzzle.



Once the puzzle was activated the lever had to play an animation, that was easy achieved playing the animation from scripting.
Also the liquid had to move until covering the meshes showing the path. This movement was done by code simply moving the plane object up a defined distance.

    Graphics

I started on the graphics team for the first vertical slice, then I was moved to the puzzle team since most work needed was no longer in the graphics side. Later, on the final stages of the project I returned to this team.




My first work on the project was to create a shader for hand painted textures affected by lights. Two of the members were separately working on it and his version was finally implemented.


In order to manage all the lights in the world a full module was created. This way we could control every light component that was created or destroyed. We could also order them according to the distance to the active camera, this way we could get a definite number of the closest one and use them to illuminate the scene using only the necessary ones.

When I moved back to the graphics team PBR materials were done on one hand and simple directional lights shadows on the other. So the first I did was joining both to have a PBR material affected by shadows cast from directional lights. Once I had this, shadows were improved fixing the shadow acne, solving the Peter panning, etc.

At this point we still had a problem since our shadows were only located at a fixed area so when the player exited it no shadows were cast, actually all the geometry was considered to be in "shadow". So I started fixing that.
Since we only had directional lights that have no position I didn't know from where the shadow map had to be rendered. The final solution was to move the shadow map render point to the active camera position and orbiting it by the light direction so the shadow map faces the active camera location.


Then I added some parameters that could be edited from the engine in order to offset the shadow map render origin and look at, the size of the area rendered for the shadow map and the depth of the shadow map.


This way we got shadows from directional lights and we were calculating them only in the needed area.

    Miscellaneous

We had a problem with the sprite used for the damage feedback since we usually loaded it directly from assets instead of the library folder where all assets should be imported by the engine. So I fixed this to make use that sprite as a resource like all other images, models, scripts, etc. in the game and let select it from the engine if it was modified.