30-Mar-2024, 19:03
(This post was last modified: 30-Mar-2024, 19:12 by SweptThrone.)
Week of March 24, 2024
Quick Loading Prototype
A quick refresher on vocabulary:
This week, I sped up the process of loading panels. There is now no lag spike when entering a new panel.
This milestone has been a long time coming, and I'm overjoyed that I was finally able to reach it. This took several days of research as to why there was even a lag spike in the first place. My first bit of research seemed to imply that it had nothing to do with the number of things I was spawning per frame, as I read people mentioning that they could create hundreds of objects without any lag. As I kept looking, I saw someone have a eureka moment about the AddChild method introducing performance issues, but I couldn't just get rid of it. I tried multi-threading and using Godot's CallDeferred method, neither of which worked. Eventually I resorted to writing my own delayed world loader and that's where we are currently. As I kept thinking, I realized I was actually creating an average of 1'280 objects per frame which is a big difference from what others probably meant by "hundreds."
Obviously you can see that the rows load in like an image from the 90s. Thankfully this is just the initial prototype and will be improved greatly as the game continues to progress. If you look closely, you can also notice that the seams between tiles are gone. This was a texture filtering setting within Godot that really shouldn't be enabled by default.
Quick Loading Prototype
A quick refresher on vocabulary:
- Tile - One square of terrain. Current types are grass and path. Grass tiles can have a tree or a rock on them.
- Panel - 1024 squares of terrain arranged in a 32x32 grid. Worlds are saved panel-by-panel.
This week, I sped up the process of loading panels. There is now no lag spike when entering a new panel.
This milestone has been a long time coming, and I'm overjoyed that I was finally able to reach it. This took several days of research as to why there was even a lag spike in the first place. My first bit of research seemed to imply that it had nothing to do with the number of things I was spawning per frame, as I read people mentioning that they could create hundreds of objects without any lag. As I kept looking, I saw someone have a eureka moment about the AddChild method introducing performance issues, but I couldn't just get rid of it. I tried multi-threading and using Godot's CallDeferred method, neither of which worked. Eventually I resorted to writing my own delayed world loader and that's where we are currently. As I kept thinking, I realized I was actually creating an average of 1'280 objects per frame which is a big difference from what others probably meant by "hundreds."
Obviously you can see that the rows load in like an image from the 90s. Thankfully this is just the initial prototype and will be improved greatly as the game continues to progress. If you look closely, you can also notice that the seams between tiles are gone. This was a texture filtering setting within Godot that really shouldn't be enabled by default.
~SweptThrone •.-