LUKAS TAMAYO
  • Home
  • GameDev
  • Application and Research
  • Logs
  • About
  • Contact

Dev logs
​(My everyday trials as a developer)

About school

1/14/2021

0 Comments

 

RSS Feed

Just so you know this is going to be a small article, this post is just a little update about my work.

I have to do a project about spatialisation

Spatialisation! Have you heard of it? It's amazing. It is basically EPIC OPTIMIZATION!
The name seems to suggest that it only applies about objects in space and while it might be true. It can also simply apply to abstract and hard to understand when you don't work with it data.
Usually, when you search for data. The easiest and most common way when you are searching through all the data of your application. Like let's say in a video game, all the enemies on screen. You might want to check their health and you want like this big skynet IA to tell each of them what to do based on that health. 
PictureLot of IA in one screen - Killing Floor Biohazard

​

So them IAs, they right now don't need to act because of position but because of health. And to be sure you have to check each and every one of them every frame and honestly it sucks. Well there are methods to make it quicker and basically it all come to one thing: sort them.

Sorting is the new black (not really but let's pretend)

So these IA's, instead of going through all of them. Let's say we sort them and we sort them only when they get damaged, like we put them at the beginning of the list. Then once we find one of them that is full health, we just stop. Because we know there is no more wounded IA's that needs to be checked.

I know there are better ways to handle things like that than my made up example, but let's go with an HOORAY for now. I have a lot less tests to do, my thousands of AI are way less computed. Stuff is cool.

Now what did school ask me to do about that ?

Octrees...

Octrees is a way of testing things between them based on proximity. And my job is to prove that it is way easier to compute things between them using an octree instead of an array or other sorting methods.
Picture
Octree representation

My project, my progress

Octrees works way better with space so I'm going to do a little project about that on... UE4 (for no real reason, I just wanted to and experiment with the engine, and since it's a school project well...)

​So anyway here is an amazing photograph of my thoughts drawn poorly on paper!
Picture
The incredible practice of putting things down on paper
Don't pay too much mind into my amazing programmer's notebook but on the drawings and maybe what's written.
I'm going to use UE4's colliders and compute them inside the tick/the function executed every frame to detect if object are overlapping each others instead of using unreal inbuilt system. 
I'll do that using a simple array vs an octree.
I'll do a static project first and then a dynamic one with moving elements inside the limit of a box
.
Static project will have:
  • Differently sized objects
  • Stacked up objects
  • Sparse objects
  • Iteration system to do a number of tests
  • Same tests with an array
  • Stats
And the dynamic one will have the same but the objects will be moving wich means the octree will change and I will need to figure out how to dynamically update it without it being too costly.

So far I have just done a basic debugging environment but I feel pretty good about what I did. There's not much visual about what I did but here's a sample!
Picture
Also I failed horribly when I started and it's hilarious so here it is.
Picture
0 Comments



Leave a Reply.

    Lukas

    Interest in video games since forever and till I'll die

    Archives

    April 2021
    March 2021
    February 2021
    January 2021
    November 2020

    Categories

    All
    Algorithm
    C++
    City Of Love
    Design
    Jam
    Opinion
    Organization
    School
    Shaders
    Slice Of Life
    Source Control
    Theory
    UE4
    Unity
    Virtual Photography

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • GameDev
  • Application and Research
  • Logs
  • About
  • Contact