Viewing post in Gain Factory Reloaded comments
I have not experienced the bug with not being able to talk to the goddess, does it still happen if you make a new world?
The UI scaling I'm not happy with either, but I haven't figured out a good way to fix that.
The down arrow doesn't skip to the bottom, so you can use that one if you want to read through. I included a button that skips to the bottom so that people can skip through dialogue easier.
I think the engine doesn't draw stuff if it is offscreen. I think the reason why there isn't much difference between the zoom levels could be that after v9.8, the game no longer swaps textures a couple times for every structure, so drawing more of them isn't much heavier than drawing a few, but I'm not exactly sure.
Old worlds should be compatible with newer versions, so you should be able to just load it and it should be fine. Some issues could still arise, some recipes have been changed in newer versions, so if you have a world with a crafter you placed in the first version, when loading it into a newer version, the recipes stay the same until it is destroyed and placed again. There could be other problems that come from loading old worlds into new versions, but I have tried my best to preserve compatibility.
About the rendering, as far as I've tested, it does only 4 texture swaps every frame (6 if goddess is on screen), where before it did between 2 and 4 for every structure (depending on the structure). Texture swaps are slow, and the performance impact of 40 texture swaps every frame is a lot more than drawing 40 sprites. The engine only renders stuff on screen, so it doesn't swap textures for off screen stuff. So in old versions it performs worse when zoomed out because it needs to swap a lot more, not only because it needs to draw more sprites.
You are right that when zooming out, it should be slower, and in old versions it is a lot slower because of texture swaps, but after v9.8 it performs about the same on all zoom levels, because the main difference in performance between zooms is no longer there. Drawing more sprites itself has almost no impact on performance in comparison to other things the game does, so you won't notice it between zoom levels.
It doesn't really need to swap the whole texture page, it does get all the sprites from the same page. It only swaps for the goddesses which I put on a separate page because the sprites are very large and they wouldn't fit on the main page.
The reason it was doing a lot of swaps before v9.8 was because I was using the built in draw_rectangle function which swaps textures to a built in page that contains only a white pixel which it uses to draw the rectangles (I wasn't aware of this). Rectangles were used for progress bars on structures, so it had to swap a few times for every structure that had a progress bar. The way I fixed it was using a white pixel I had on the main page, and just making my own rectangle function.
The progress bar is already not a part of the structure sprite, and the game does draw the rectangle above the structure. I don't know if calculating and rendering vertices is faster in this engine, maybe it is, but it's fine now. The rectangle function that I made uses a white pixel on the texture page that is already loaded, and stretches and recolours it to make a rectangle for things like the progress bar, so there are no swaps (basically works the same as the built in rectangle function, but without swapping pages). Drawing more sprites doesn't impact performance that much, so it's fine.
If I should optimize, it would be other parts of the code at this point. The crafters for instance start at the top of an array containing the recipes in the form of arrays of items, and check every one of those arrays against their inventory until they find an array whose items the inventory contains (and then they start the crafting countdown). This is really inefficient, and is probably having a much larger performance impact than the same structure drawing an additional sprite as a progress bar.
Conveyors do already use a shader to swap colours.
I hope I'm understanding your points properly, and not speaking past you. If you want you can add me on discord, it could be easier to talk there.