top of page

Children of Tyr

Created in UE4

children of Tyr.jpg

Game Pitch

Children of Tyr is a side scrolling platformer made as part of a game jam. Our game takes place during Ragnarok, when Fenrir the wolf eats the sun. As a Valkyrie, you must retrieve fragments of the sun to prevent the apocalyptic events of Ragnarok.

My Role

My main tasks involved helping with some of the basic functionality and creating shaders in Unreal's blueprints system. 

​

For the sun fragments UI element I created a shader material to improve the overall aesthetic of the UI element and add a layer of fluidity removing the restraints of a set number of collectables.

​

​

​

​

The idea was that the sun spikes would light up as the player collected the sun fragments. To achieve the effect I wanted,  I utilised a few different mathematical formulas to dictate which pixels should light up.

​

How it's made

Link to the pastebin: blueprintue.com/blueprint/fo4s451h/

This material is made based on the idea of checking if an expression is true or false, 1 or 0 and multiplying that by the texture image to achieve the desired effect.

First I do a calculation that checks what coordinates are inside a cone. This is done by having an input angle that is converted into radians, then the bisected angle is converted into a directional vector, which is then dot product against a vector of tex coords from a centre point.

To ensure only the spokes are effected I use the expression that defines a circle in coordinate space to check coordinates that are outside a circle with a radius and inside another radius. The expression for checking if coordinates are inside a circle with a set radius is: radius >= x^2 + y^2. The max of the two circle values are returned then the min value with the angle from earlier. 

In hindsight, the ring only needed to check for outside of a given radius. 

Adding a fade to the centre circle was pretty easy. Adding the squares of the coordinates returns circular fade from a point, which is multiplied by a strength. This value is what's returned for any pixels within the circle radius.

Add the ring and circle together, multiple by the image, and sun fragment UI element is complete!

bottom of page