XaiJu
Speiger
Speiger

patreon


UI/Engine Reworks Part 2

So another two weeks happen and I wondered where the time went.

It is interesting how much stuff needs to be done before I can even think of actual gameplay elements.
Which is something that kinda annoys me but also I find "Good" which isn't a good word to describe it, but it is a learning experience.

So what happend in the last 2 weeks in regards to the plans.

As planned I cleaned up the rest of the UI Engine and added a couple UI animations with it.
It improves the look a tiny bit and isn't to slow nor to fast.

So after all that was basically done and I thought I could upgrade to OpenGL4.0 or newer without any worries. So I did. What was the first thing that happend? Ever UI Element except for a couple custom Shapes did disappear.

Why was that a thing? Because OpenGL3.2 or newer doesn't support "Quad" render commands anymore. It took me a good time to find out that that was a issue.
So back to OpenGL3.0 for now until I have that adjusted. It is only a Easy but time taking fix.

When that confusion was finally solved I also started implementing the memory control systems further to ensure that garbage Collection isn't effecting the performance of the Game. 

Which sounds reasonable was first somewhat easy to implement. At least in the beginning. Then bugs started to show up. Where features were depending on garbage creation or at least "None Shared" Objects to be provided. Which is now changed and that caused issues ofcourse.
Which most of them are either fixed, or they create duplicated objects because there is no other way to do it.
The main source of trouble are right now the "Placement Handlers" and PathFinding creating a lot of Garbage because I haven't found yet a solution to improve it. It is a bit complicated.

Also another issue with that occurred is that the Base Entity that everything basis of (Trees included) got a good memory usage buff to this optimization. At least 116 bytes more per Entity. That is 116MB more on a 1024 TileMap and 1.6GB on a 4096 TileMap.

For most Bigger then 1x1 Entity that isn't much of an issue since they are not intended to be placed 1 Million Times. But Environment Entities like Trees or Grass which are intended to be there in "Masses" and I expect at least 1 Million to be present at any given time maybe even more depending on the case. Which isn't good at all. So that needs to be fixed soon too.

On the other hand is that I can not focus on 1 thing all the time and ultra optimize the game more then is actually reasonable. In the end it is a game that I want to make. 

This what I am describing right now seems "Super" Bad, and it isn't good. But the largest map that I am planning to build right now is going to be 2048x2048 Tiles and according to my calculations that will be even with that many Entities around 3-5GB of Ram. I do not know how much optimizing will bring but this is like edge case scenario Optimization that is here.

So this is something I need to improve but also can leave right now as it is, since the game is still in pre pre pre alpha.

As said at the start. It is interesting how much stuff still needs to be done.

But now for some good news. I actually found a very easy way to increase performance & Memory usage quite a bit. (Performance was not noticeable)

How did I achieve that? Remember that my game has a "TileGrid"? I removed it.
That was first of all unnecessary & also the Tiles were only supporting 16 Tiles instead of the full 256 Tiles that the GPU already Supports.

Why did I do that? I mean "Tiles" are still visible right? And yes
After the Optimizations for the GPU that were applied and moved away from the full 24Bit Color down to 8Bit Color Table that has each 24Bit Colors it wasn't necessary anymore to keep the TileGrid since the Terrain Texture was already keeping track of the data.

TL:DR I just got rid of Duplicated data that appeared after a optimization.


Outside of that I am using my own Model format because when I started making this game I haven't found a "Vertex Color" Model Format, so I made my own. The software that I wrote for that basically converts know formats that I use into my own format that is adjusted to what is needed for my Game.

This software had a lot of issues too and so since I thought I could add a lot more Models so upgrading that tool made sense for me too now. 

So now I am able to move, center, rotate, scale, merge Models as I wish and adjust other tiny Details as needed.

That took a bit since I rewrote this thing from scratch and after a couple bugs that appeared it got finished.


Well this is everything I got for this week. Next one will be within the next 2-3 weeks depending on if something big comes in the way and I can not catch the Weekend spot anymore.

Anyway. Thanks for reading. Speiger

UI/Engine Reworks Part 2

More Creators