On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Fungustober

2
Posts
1
Followers
A member registered Feb 28, 2024 · View creator page →

Creator of

Recent community posts

(2 edits)

I did some digging around after the submission, and I'm not completely sure what causes it because there's some weirdness to it, but I have some guesses. It's definitely not a Time.deltaTime issue, seeing as I'm using Microsoft's WPF for this and not Unity, but the most likely cause is that WPF's Opacity feature is horribly optimized, combined with me using Grid elements for positioning (if you see an element anywhere on screen, it's likely wrapped in 2-3 layers of grids, and some buttons have text on them which requires yet another grid for margins), which also have fairly bad performance compared to other controls that I could have used instead (I wish I had learned this a while earlier, but alas).

The transition times were set to about 1-2 seconds in general, but a confluence of issues I didn't notice until far too late made it so that every time it attempts to fade something, it causes a massive lag spike. It isn't even like a "oh, if I changed this one thing, it magically clears up" kinda thing, it's "my methodology around the UI was so completely wrong that fixing it would take significantly longer than I had time for." I learned this at the last minute because for some reason, the "XAML Hot Reload" setting in Visual Studio being on while testing made the issues not happen at all, which made me think there weren't any issues. I still have no idea why XAML Hot Reload causes those issues to disappear. I have some idea of what causes the lag, but I genuinely have no fucking clue why XAML Hot Reload being on stops the lag from happening. It baffles me to no end. Some of this is due to the architecture I was using not really being meant for games (Microsoft's Windows Presentation Foundation), some of this is due to me not being familiar with it when I started this, and a good amount of it is honestly just due to me being a complete dumbass. I'm sorry for wasting your time.