Browsed by
Tag: Programming

Scene editing and ECS conversion

Scene editing and ECS conversion

When working with the DOTS framework and implementation of ECS, you’ll quickly realize that there is currently very little in the way of scene editing. Entities might render, but you can’t interact with them in the scene editor. The workaround for this problem allows for the conversion of a scene, into entities. However, any traditionally written code (using monobehaviour, that is) will be lost in translation. This article covers how you should write your code in ECS and attach it…

Read More Read More

Unity C# Job system and Burst Compiler/DOTS introduction

Unity C# Job system and Burst Compiler/DOTS introduction

The Jobs System in Unity allows for the execution of code across multiple cores at once, significantly speeding up heavy tasks such as pathfinding and similarly repetitive logic. Additionally, when something is set to run as a job, Unity supports use of the Burst Compiler, which will compile that bit of code into high-performance assembly code. Source material: https://www.youtube.com/watch?v=C56bbgtPr_w Reading instructions: This document is a follow-up to the previous article on ECS, as part of an introduction to working with…

Read More Read More

Unity ECS / DOTS introduction

Unity ECS / DOTS introduction

This article is an attempt to introduce Unity’s new Entity Component System (ECS) to those who are unaware of its existence. ECS is one part of DOTS – the Data Oriented Technology Stack, which also contains the C# Job System and the Burst Compiler. ECS can be described in two ways; ridiculous performance increase and/or compact size. It is a new way to code, utilizing all of the cores available. The other two components of DOTS allow for similar performance…

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

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

Vector-based cloud system

Vector-based cloud system

During my studies, I was tasked with making a cloud spawning system. It had to be easily modifiable (in case the designer wanted to make changes) and work with a vector to describe the direction of the wind, alongside a value to represent the speed of the wind. By creating a prototype for this, it was determined that the easiest way to illustrate where the clouds would appear, was to restrain them to a bounding box. A random coordinate would…

Read More Read More