Closed vfrz closed 3 years ago
It's totally fine:D. You're overthinking it. As long as the performance is not an issue you really shouldn't bother with it. Instead of optimizing spend the time making better gameplay or more content. And you probably making a 2D game so performance really shouldn't be a problem at all;)
It's totally fine:D. You're overthinking it. As long as the performance is not an issue you really shouldn't bother with it. Instead of optimizing spend the time making better gameplay or more content. And you probably making a 2D game so performance really shouldn't be a problem at all;)
You're actually right. I had hesitated close the issue few days after posting it but then I kinda forgot about it.
Hello again, I've created a sample project based on one of your samples for testing the UI engine and I think the performance are not that great.
With a simple screen like this one:
I go from 13000+ FPS (without the Image) to ~10800 FPS (with the Image).
And with a more complete screen like this I get about ~5800 FPS:
A game with an intensive GUI will suffer from this problem. From what I've read in another issue on the project, the whole layout is recalculated and drawn each frame. Is it still the case? If yes maybe it could be improved.
I know it's hard to develop a perfomant and full-featured GUI engine, I've tried to write one myself with similar features (styling, data binding and xml based layout). I am willing to help.
Actually I don't know a lot about GUI engine programming so I don't have much ideas. One that is coming my mind right now would be to implement a dirty tracking pattern and update/draw only if needed, but it's pretty hard to implement at this state of the project. Maybe optimizations in the spritebatch are possible too?
What are your though?