About


Hey there! Welcome to my portfolio, my name is Luca and I'm a game programmer that loves to contribute to projects with flexible and clean code.
I like to create and modify mechanics with the game designer to get the best result in the 'feeling' of the game.

Projects @Orbit Studio

Haunted House

  • C#
  • Unity
  • Switch, PS4, PS5, Xbox one, Xbox Series and Steam

I'm currently participating in the development of Haunted House. I am responsible for implementing gameplay mechanics, enemies, UI, bug fixing and polishing the game. I'm also porting Haunted House to all of today's major platforms.

Projects @Qubyte Interactive

Knight's Retreat

  • C#
  • Unity
  • Switch, PS4 and Xbox one

Since Knight's Retreat was a multiplatform project, I've used the Factory method to manage all the platforms without creating a messy code, as it was recommended by the team.

This game had only mouse support, so I implemented a new in-game selector for the game to support controller.

And as in all the others projects, I had to adapt the Save&Load game system to work properly in the consoles.

Super Hiking League

  • GML
  • Game Maker
  • Switch, PS4 and Xbox one
  • Local multiplayer

In this project I had to manage multiplayer controller and user account behaviour on all platforms. I managed to handle it quite easily because I've done it before in others projects.

The most challenging part of this project was to handle the game save & load, as it was asynchronous and it saved the player's best time to display in a ghost.

I recreated one post processing shader effect that was not working properly in consoles.

Damn Dolls

  • Blueprint and C++
  • Unreal
  • Switch

Damn Dolls was my first Unreal Engine porting project. I've had to overcome a lot of challenges since it was my first experience porting a game using the Unreal Engine.

In this project I optimized the game to be pleasent to look at and to have good frame rate at the same time, to do that I turned realtime lightning into backed light, I've twicked some post processing values, such as anti-aliasing and screen percentage render, and I made an overall check on the blueprints ticks.

I have compiled the Engine from source to add the Nintendo Switch environment and plugins.

Others

  • GML
  • Game Maker
  • Switch, PS4 and Xbox one
  • Local multiplayer
  • C#
  • Unity
  • Switch
  • Motion control support
  • GML
  • Game Maker
  • Switch
  • GML
  • Game Maker
  • Switch
  • C#
  • Unity
  • Switch
  • C#
  • Unity
  • Switch
  • C#
  • Unity
  • Switch
  • C#
  • Unity
  • Switch
  • C#
  • Unity
  • Switch

Academic


Distress is a college project where I had the role of Lead Programmer, I've implemented most of the game's features, some of which I'll show here.

Finite State Machine

The character's mechanics changed a lot throughout the project, but one thing that did not change was the character's Finite State Machine due to its easy maintainability.

While searching for a good code structure to use in the character, I got inspired by this video and started from there.

Explaining briefly this State Pattern consists in one interface, one Mono Behaviour class and others classes for each state that derive from the interface. The Mono behaviour class is responsible for the state machine management and for the overall variables and values.

public interface IPlayerSkillState
{
    void OnStateEnter(PlayerBaseSkillState player);
    void UpdateState(PlayerBaseSkillState player);
    void OnStateExit(PlayerBaseSkillState player);
}
public class PlayerBaseSkillState : MonoBehaviour
{
    private IPlayerSkillState currentState;

    public PlayerIdleSkillState idleState     = new PlayerIdleSkillState();
    public ShardThrowState shardState         = new ShardThrowState();
	
    void Start()
    {
        //Set a default state at the start
        currentState = idleState;
        currentState.OnStateEnter(this);
    }
	
    void Update()
    {
        currentState.UpdateState(this);
    }
	
    public void ChangeCurrentState(IPlayerSkillState newState)
    {
        //First execute the exit state of the current state
        currentState.OnStateExit(this);

        //Then set the current state to the new state
        currentState = newState;

        //And execute the new state enter state
        currentState.OnStateEnter(this);
    }
}
public class PlayerIdleSkillState : IPlayerSkillState
{
    public void OnStateEnter(PlayerBaseSkillState player)
    {
        //Do stuff when it enters the state
    }

    public void UpdateState(PlayerBaseSkillState player)
    {
        //Do stuff when it updates the state
    }

    public void OnStateExit(PlayerBaseSkillState player)
    {
        //Do stuff when it leaves the state
    }
}

Dash collider

The game character has Dash as an unlockable mechanic in the skill tree.

When creating Dash, I implemented a check using the capsule raycast in the direction of Dash to prevent the character from passing through any obstacles.

Dash has a variation on the skill tree that allows the character to pass through enemies.
To do it, it is possible to set raycast to ignore some objects, so that they are crossable when using Dash, this was done using Unity's layer system.

private Vector3 GetDashPosition(PlayerBaseMovementState player)
{
    //Get the direction that the player is moving
    Vector3 direction = player.transform.forward * player.inputMoveDirection.y + player.transform.right * player.inputMoveDirection.x;
    
    //Get the radius of the character to simulate in the capsule raycast
    float radius = player.playerController.radius;
    
    //Set point 1 and 2 to create the capsule that will be used to simulate the player's capsule
    Vector3 point1 = player.transform.position + new Vector3(0.0f, radius, 0.0f);
    Vector3 point2 = player.transform.position + new Vector3(0.0f, player.playerController.height - radius, 0.0f);
    
    //Check if the skill is unlocked to ignore the enemies' layer
    LayerMask layersToIgnore = (player.playerStats.IsSkillUnlocked(PlayerSkills.SkillType.frictionDrive4)) ? player.layersToIgnore_BlinkDash : player.layersToIgnore_NormalDash;
    
    //Do the actual capsule raycast
    RaycastHit[] hits = Physics.CapsuleCastAll(point1, point2, radius, direction, player.dashDistance, ~layersToIgnore);
    
    //Get the closest collision if there was one
    float shortestDistance = 9999f;
    for (int i = 0; i < hits.Length; i++)
    {
        if (hits[i].distance < shortestDistance) shortestDistance = hits[i].distance;
    }
    
    //Check if there was a collision or not to set the dash distance
    dashTotalDistance = (hits.Length > 0) ? shortestDistance : player.dashDistance;
    
    //Add the Dash position to the player position
    Vector3 dashTargetPosition = direction * dashTotalDistance;
    dashTargetPosition += player.transform.position;
    
    return dashTargetPosition;
}

Procedural bullet animation

The base attack of the character is a magic projectile, so to give it a "magic" feeling the game designer asked for a random movement when traveling in the air.

To achieve that, I implemented a procedural animation to the projectile where the game designer can tweak the values to his preferable options.

As shown on the video, it is possible to change the projectile horizontal and vertical maximum offset, the frequency in which it changes the position, the path smoothness and the projectile velocity of course.

void Update()
{
    //Get the animation state
    bool finishedAnim = Vector3.Distance(transform.localPosition, randomizedPosition) <= 0.1f || timeToChange >= timeToChangePosition;

    //If the animation has finished, start a new random animation
    if (finishedAnim)
    {
        RandomizeMovement();
        return;
    }
    
    //Do the animation
    timeToChange += Time.deltaTime;
    transform.localPosition = Vector3.SmoothDamp(transform.localPosition, randomizedPosition, ref currentVelocity, smoothTimeDuration);
}

private void RandomizeMovement()
{
    //Create a new random X and Y value
    float verticalPoint = Random.Range(-verticalVariation, verticalVariation);
    float horizontalPoint = Random.Range(-horizontalVariation, horizontalVariation);

    randomizedPosition = new Vector3(horizontalPoint, verticalPoint, 0.0f);

    //Reset variables values
    timeToChange = 0.0f;
}

Others

  • C#
  • Unity
  • 3D
  • C#
  • Unity
  • 2D
  • Java
  • Processing
  • 2D

Personal

Endless Space

  • C#
  • Unity
  • Accelerometer & Gyroscope

Endless Space is an endless runner mobile game where the player have to use the smartphone gyroscope and accelerometer to control the spaceship to dodge the walls and enemies.

The game is available on Google Play to download for free.

Getulio Surfers

  • #C
  • Unity
  • Object pooling

Getulio Surfers is a game jam mobile game that was done in 48 hours. As it is an endless runner the scenario is created using object pooling.

The game is available on Google Play to download for free.

What am I currently working on?

Currently I am studying c++ and the Unreal Engine.
After that I am looking forward to revisit some OOP topics, learn data structure and as many game developer design patterns as I can, cause it helped me a lot in my most recent projects and I always want to improve my knowledge as a game programmer!

Contact