ENGINE - SHADERS - ANIMATIONS - PHYSICS - AI
- Choose from a list of shaders: contains the ones created directly from the editor (custom) and the built-in ones.
- Assign values to the uniforms of the chosen shader.
- Default material (built-in): uses the default shader and the default texture.
- Create new layers by naming them.
- Assign a layer to a gameobject (custom or built-in).
- Default layer (built-in).
To achieve a style similar to the one from the manga Gunnm, we took the game The Legend of Zelda: Breath of the Wild as a reference. We were looking for a hand-drawn style, which the simple cartoon shading already provided.
Uniforms: albedo texture, mix color, and pct mix.
To add the final touch to the Cartoon Shader, with the game Borderlands as a reference, I mixed it with the Outline Shader. Even though Borderlands does not use cartoon shading, we thought that the mix of both shaders could add personality to our game.
Uniforms: line color, edge width, and pct extend.
A game like Torchlight II uses a lot of decals to illustrate from the casting of skills to the explosion of objects. We planned that we would need decals for blood splatters, ground decoration, and also skills and explosions for our game.
Uniforms: projected texture, pct alpha.
Instead of drawing the image onto the surface of a plane, which could cause the plain to not adapt correctly onto certain irregular surfaces, I followed the technique of projective texture mapping. Our map has lots of small elements laying on the ground.
→ The good: the image was applied to all the geometry as if it was a projection from an hypothetical “slide projector”.
→ The bad: the affected area could not be edited, resulting in the image being drawn onto all the surfaces of the geometry in a straight line in front of the projector.
When Guillem made the renderer deferred, he opened me the door to move to deferred decals, because we suddenly had access to the G-Buffer. Even though the result was visually the same, it had a better performance and was easier to maintain.
→ The good: it was not needed to render the whole scene for each decal, each geometry could have more than one decal drawn, and the affected area was inside a box.
→ The bad: I followed the article “A Deferred Decal Rendering Technique” from the book Game Engine Gems 1 and I stopped using the “slide projector”, having less control on the projection. Solution: combine both techniques.
It has been designed for the sewers level because of its verticality, which allows to fill with fog those areas that are further from the camera. The density value can be Linear, Exponential, or Exponential Squared.
Uniforms: color and density value.
Taking advantage of the Layers that I had already implemented, I used them in collision detection and scene queries. For collision detection, I drew a layer collision matrix to set which layers collide with each other.
Since physics are not core to our gameplay, we had the option to use them for cosmetic effects. From the moment I saw destructibles in the game Diablo III, I could not get the idea of adding destructibles in our game out of my head. I did the very first design an implementation in C++ of the breakable chest and further improved the implementation in C# by Alex. For more information, please take a look at the article I wrote about how I implemented them using pre-baked destruction Breaking Chests.
→ The good:
- If a waypoint is free (not occupied and not blocked), the enemy occupies it.
- If a waypoint is occupied by an enemy, the new enemy searches for another unoccupied waypoint. If all waypoints are occupied by enemies, the new enemy waits.
- If an occupied waypoint is suddenly blocked by an obstacle, the enemy leaves the waypoint.
→ The bad:
- Waypoints are constantly being blocked by the obstacles of the map and enemies turn crazy.
→ The good: unique positioning each time.
→ The bad: if there are too many enemies, enemies can block other enemies and prevent them from positioning. Solution: leave avoidance Steering Behaviors activated while attacking and hitting and use a Battle Circle to limit the number of enemies.
- To a position
- Towards a direction
Uses the inverse square law strength.
Also handles parallel collisions.
- Look Where You're Going
- Face
→ The good: the hit point with the wall is used to turn the agent (recalculate the direction of the movement).
→ The bad: every obstacle needs a collider.
→ The good: agents only need the navmesh to move and always stick correctly to it.
→ The bad: it is harder to detect when an agent is trying to leave the navmesh in order to turn the agent (recalculate the direction of the movement). Solution: project one point in front of the enemy to detect when the point is out of the navmesh. In this case, project a point to each side of the enemy to detect in which direction the agent has to turn.
- StartPosition: if too far away from the spawn position, go back home.
- LastKnownPosition: where the target has been seen.
- DangerDistance
- AttackDistance
- Flank
- Backtrack
- Basic
- Strafe
- Basic
- Force