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 spatialisationSpatialisation! 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. 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. My project, my progressOctrees 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! 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:
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! Also I failed horribly when I started and it's hilarious so here it is.
0 Comments
|
LukasInterest in video games since forever and till I'll die Archives
April 2021
Categories
All
|