Delegates, Lambda Expressions & Closures in C#

If you are familiar with programming, you might have heard of a specific paradigm called functional programming. Most modern languages, such as Java and C#, have integrated some functional elements over time. Other, like Scala and Haskell, were built around that very idea of functional programming.

This online course will look at some of the functional features available in C# 3.0, including the concept of anonymous functions, delegates and lambda expressions. But before doing that, we need to understand what functional programming actually means.

If you are interested, keep reading, and we will explore the following topics:

  • Anonymous functions
  • Delegates
  • Anonymous delegates
  • Multicast delegates
  • Lambda expressions
  • Lambda statements
  • Expression-body members
  • Expression trees
  • Local functions
  • Closures
Continue reading

Inverse Kinematics in 3D

This tutorial will teach you how to master inverse kinematics in 3D: the technique that solves the problem of moving a robotic arm to reach for a specific target.

You can read the rest of this online course here:

A link to download the entire Unity package can be found at the end of this tutorial.

Continue reading

Improving Floating-Point Precision in C#

This tutorial continues the journey to understand floating-point arithmetic, and how to improve the precision of modern programming language types.

At the end of this article, you will find a link to download a simple C# library that provides a new type which improves the precision of traditional float and double variables.

Continue reading

Tentacle Suckers Shader

Following the unexpected success of the tutorial on Inverse Kinematics for Tentacles, I have decided to share the shader that I used to make them so realistic.

If you are not familiar with shaders, fear not. This tutorial will be target at beginners, and you’ll only need a basic understanding of how Unity works.

  • Introduction
  • Part 1. Creating a new Shader
  • Part 2. Refitting the Shader
  • Part 3. Normal Extrusion
  • Part 4. Sucker Waves
  • Part 5. Selective Extrusion
  • Conclusion & Download

A link to download the full Unity package for this tutorial is provided at the end.

Continue reading