Browsed by
Category: Programming

Analyzing telemetry

Analyzing telemetry

I previously covered how to connect your Unity client to a Google Drive spreadsheet and upload your telemetry data. Which is cool but not very useful if we can’t retrieve that data. One solution is to go into your Drive and download the spreadsheet manually, but that’s not really awesome. What we want is a client which not only downloads the data directly, but formats it and does cool telemetry-analytical-things to it! Downloading the data: Luckily, accessing the data stored…

Read More Read More

Collecting telemetry

Collecting telemetry

I recently wrote about Subnautica’s development process, and how they handled player telemetry to streamline the development process. So I figured now would be the perfect time to show you how easy it is to actually send and store data – in this case object positioning – somewhere in a remote database. “But Dave, I don’t have a private database for hosting this kind of information!” – Fear not, for I have the perfect solution for you. We are going…

Read More Read More

Vertex and fragment shaders

Vertex and fragment shaders

Through my previous articles on shaders, I have worked exclusively with Surface functions to handle the shader logic. However, this function only handles certain aspects of rendering. What happens when you run your compiler, is that the surface function gets turned into what are called Vertex– and “per-pixel (or Fragment)”-functions. Compiling is basically like having a whole burger, then dropping it on the ground, witnessing its transformation into buns and patties before your very eyes. But what does vertex and…

Read More Read More

Shaders and lighting models

Shaders and lighting models

As I covered in the previous article about shader anatomy, there are a few different lighting models to choose from, if you are not creating your own. Depending on the model, you will have access to different properties in your surface function. But what exactly is a lighting model, and how can we use them for cool stuff? Because that’s really what we’re here for, all the cool beans. A lighting model is really just an algorithm, which looks at…

Read More Read More

Introduction to shaders

Introduction to shaders

In a previous article, I talked about cel shaders and how to make your own. In this article I will walk you through the basics for shaders in general, for those of you who want a deeper understanding and explore the subject on your own. However, the focus of the article will be on understanding shaders, more so than writing them ourselves. The writing part will be covered in later articles. Anatomy: The best place to start is with the…

Read More Read More

Weight-based randomization

Weight-based randomization

What do games using loot drops and games using AI driven by behavioural parameters such as sleep, hunger and happiness have in common? At first glance, not much. But it is very likely that both of them deploy the same algorithm. Let’s start by example: There’s plenty of games using loot drops today. It’s an easy way to implement a form of replayability in a game, where character progression is tied to the gear they are wearing. By not guaranteeing…

Read More Read More

AI sight and memory – finished!

AI sight and memory – finished!

It took longer than anticipated, but the prototype described in the previous post has been coded and documented! There were a few changes and additions along the way, but that just goes to show how nothing is ever really final, until you sit down and produce it. Most notably was the addition of a new class called TagClass, which is used to verify if an observed object should be memorized, and how the memory should be flagged. Before I outline…

Read More Read More

Developing AI sight and memory

Developing AI sight and memory

This post is going to be a little bit different than what I have written so far, as the project presented here is a work in progress. However, it is for that reason exactly, that I thought it would be interesting to write about. Instead of presenting a fully functioning prototype, I will submit what I have done in the process so far, and update the post as work comes along. This will hopefully give you an idea of how…

Read More Read More

Cel shading basics

Cel shading basics

In this article I will go through the shader I wrote for our Ecosystem student project, to implement cel shading. If you are unfamiliar with the concept, this rendering method gives a black outline to everything, giving it a cartoony look. Before I go any further, you should be aware that I assume baseline familiarity with technical rendering terms and shader basics. If you want to explore shader programming from the complete basics, I highly recommend giving this course a…

Read More Read More

Finite state-machine example

Finite state-machine example

Working on our Ecosystem student project, I deemed it appropriate to use a finite state-machine to dictate the logic of our animals. An implementation of the theory can be found here, although it makes little sense without the explanations from this article. Download the Unity Package file here A finite state-machine (FSM) is a way to graph and control AI behavior. While it is less commonly used in game development vs behavior trees (which facilitate more complex behaviors with longer…

Read More Read More