Loading...

Alex Morales Garcia

"Haru love, please, I'm programming :_)"

About me

I'm Alex and I've been engine and gameplay programmer.

In the first stage of the project I developed an Animation Tween system used in some cameras with Axel Alavedra and I implemented the UI Text. In the second one, I focused in enemies in game. The result has been different enemy types with subtypes, with different behaviours. And I made some assets too :)

Contribution


Overview

My work in this project has been engine programming:

  • UI base system implementation.
  • Component UI Text, text shader and Resource Font.
  • Animation Tween system.

Gameplay programming:

  • Enemy base class with different 4 (Nilfgaard Soldier, Ghoul, Drowned, Blocker Obstacle) types and subtypes.
  • Enemy spawner.
  • Battle circle and steering avoid.

And made some props:

  • Enemy Weapons: Bow, arrow, nilfgaard sword, slime ball and shield.
  • Tutorial dummie.
  • Pickable coin.
  • Wagon.

Engine

Resource Font

Resource Font Class

I created a font resource in Engine. It stores ResourceFontData (fontSize, maxCharHeigh, charactersMap, fontBuffer) and Character (texture Id, size, bearing and advance). The resource loads an external font and it transforms all the characters into red (character) and black (background) textures. The own format file stores the font size, characters texture buffer...

Text Shader

Then, when we print it on screen, the shader set the alpha value of the image according to the red value of the pixel. Then it adds the color to the font.

Generated char texture from font

Final char applying the shader with blue

Text Shader

Component Text

I implemented UI Text with an adptation of the OpenGL text shader. The text has different parameters that can be modified, as color, align, interlineal size, text width and font.

  • Align
  • Different fonts

Animation Tween

Axel Alavedra and I created a tween system which can be used for color, translate, rotation and scale GameObjects. It was also think to modify the properties of a UI element. There's different accelerations to calculate how the tween is done (Quadratic, Cubic, Elastic, Bounce...).

Color tween with different acceleration

Move tween with different acceleration

Enemies types

Alejandro París and I have been the main enemy Designer/Programmer for the enemies. There are 4 different types of enemies (Nilfgaard Soldier, Ghoul, Drowned and Blocker Obstacle). Nilfgaard and Ghouls have 3 different subtypes. I also implemented Battle Circle and Steering avoid enemies.

Nilfgaard Soldier

Nilfgaard soldiers types are:

  • Melee: This soldier attacks with the sword.
  • Range: This soldier attacks from distance and shoots an arrow. When the player approachs, the enemy flees.
  • Shield: This soldier deffends from the player. When its defense is broken or its attack from behind, it gets stunned and gets vulnerable.

Melee Soldier

Range Soldier

Range Soldier

Ghoul

Ghoul types are:

  • Original: This ghoul jumps torwards the player and when it lands makes an area attack. When it's close to the player, it slash the player.
  • Dodge: It's as the original but it can avoid the player attack.
  • Mini: This ghoul is a reduced version of the original, but it does not stun the players.

Original Ghoul

Dodge Ghoul

Mini Ghoul

Drowned

Drowned is an enemy who is hide under the ground. When the player is near, it gets off the ground and shoot a slime ball. He keeps shooting until the player is gone or it is too close it hides again.

Drowned get off, attacks and then hides

Blocker Obstacle

Blocker Obstacle is an enemy that stops the player path. It can be destroyed by attacking directly or by killing the enemies that protect it. As the life goes down, some roots vanish. The model was created in engine with some roots I modeled, When it is death, the player can continue.

Blocker obstacle vanish

Enemies Behaviour

Enemy Spawner

When the player enters in the spawn area, the Spawner Manager call the Instantiate function in its children, which has the enemy type and subtype. It can also add a time delay.

Spawner(*Gizmos don't correspond to reality)

Steering avoid

The steering avoid calculates if the other enemies are inside an area. When an enemy is inside, it adds to a vector the opposite directions vectors. Knowing the distance from the center, it also calculates the force of the avoid vector. The result is the direction that the player goes.

Once calculated, it adds the avoid vector and the velocity vector torwards the player, giving as a result the final velocity vector.

Move code

Steering avoid code

Steering Avoid

Battle circle

The battle circle limits the max enemies that can attack the player. When reaches the max, checks if the other player has enemies attacking, and if not, it attacks. In the other case, the enemies surround the player and wait their turn until they can attack. Once the enemy attacking is damaged, check for another candidate to attack.

Battle circle with 2 max enemies for each player

Props

I generated some props in order to help the art department. Here are the assets that I created: