Dec. 17th, 2017 Nightly Build
Alright, yes, I know, this one's out WAY earlier than usual. It isn't even night time yet. Well, it's evening, so that counts, I guess. Anyway, in the previous devlog I said this build would be all about optimization and improving framerates and CPU usage and all that stuff. I'm releasing this build because, at least for now, I have done all the optimizations I can do and am EXTREMELY happy with how it all turned out.
Special thanks to Matt Trobbiani (aka the Hacknet guy) for playing a role in helping out with the optimizations. Basically he reminded me of Visual Studio's CPU performance profiler.
Anyway, let's get to the changelog.
Features and enhancements
- Removed the Debug Console and associated commands. It had barely any usefulness, and used A LOT of CPU.
- Added CPU usage counter to the performance meters at the top of the screen. You have RogueAI to thank for that.
- UI element invalidation has been reworked. UI elements can be invalidated, but no longer have to fully repaint every time. Invalidating a control notifies its parents recursively, causing a re-render of the affected UI elements' backbuffers. You can still request a repaint of your control's surface buffer to get the previous behaviour of invalidation. The new behaviour uses far less CPU.
- Removed global string texture caching. This cuts down on RAM and CPU usage as well as increases the framerate. There is virtually no need for global text caching, in fact it causes more issues than it solves.
- Controls skip rendering if their opacity is 0, regardless of the "Allow Transparent UI Elements" setting. Why render something that you can't see? This also affects mouse events as controls with 0% opacity ignore click events completely. Slight improvement in framerate.
- Various improvements with switching between control surfaces and the game render target. This was pretty much the bulk of the performance issues in the previous build.
- UI engine falls back to Windows Forms text rendering if Pango rendering isn't available. Slightly faster and less old than GDI+. And it looks better in my opinion.
- FPS counter updates every second as opposed to every frame. Less responsive to the actual framerate, but now it doesn't actually AFFECT the framerate as it updates. Again, you have RogueAI to thank for that.
- FINALLY, I fixed the bug that caused UI elements to disappear randomly.
- Removed the code that causes a control's backbuffer to be reallocated EVERY TIME the control is invalidated. Even more performance improvements with that one.
- Fixed bug with mouse location pulling in Slider Bars.
- Fixed Peacegate bootup sequence issues with "Disable Transparent UI Elements" setting being on.
- The following UI elements now only recalculate their size if vital properties are changed: List View, List View Item, Check Label, Panel, Scroll View, Label, Button
- Terminal no longer properly responds to incoming text in the stdout stream.
- Mouse click events are fired to the bottom-most control in a stack of overlapping controls that share the same parent, instead of being fired to the top-most control.
- Mouse move events are registered by controls even if they are completely covered by other controls or can't be seen by the player.
- UI elements still render and update even if they are completely covered by other UI elements (and thus you can't see them.)
4 known bugs..that's a record. Anyway, these optimizations are definitely going to come in handy. Still need to work on ui element culling. That one's a biggy.
Leave a comment
Log in with itch.io to leave a comment.