Hearing you guys talk about Innoxia's code made me think her code is horrendous in some way, but looking at it now it looks pretty normal to me. Like, okay, there's that check every turn if prologue is finished or nullchecks with typechecks for characters, but those aren't the reason for major lagging. They are a sign of bad structure as you want your variables to be of proper type when you pass them, not check them for their type after they are passed into somewhere.
Game class with all those IsPlotDiscovered and IsPrologueFinished is bad to look at, but it shouldn't cause any lags, it's just a generally hard to maintain code, performance isn't affected. endTurn method there does a lot of things, but it's the same thing as for that whole 4k lines long class. MainController is worse look-wise, and I think most of the bugs come from being lost in here. EventListeners called from there check by string comparison, now that's a way to start lagging. RenderingEngine is the worst. There's a lot of StringBuilder optimisation all over the place, though.
It's from rebuilding whole interface and all text every button press, isn't it? Does Java have coroutines? I don't think I saw any sign of delayed loading of text/icons when I played, it's all simultaneous. Pretty sure that's the main reason, StringBuilder is great and all that, but it's still a lot of memory juggling, when you do this kind of rebuilding whole screen it's just faster to split execution into multiple frames.
Game class with all those IsPlotDiscovered and IsPrologueFinished is bad to look at, but it shouldn't cause any lags, it's just a generally hard to maintain code, performance isn't affected. endTurn method there does a lot of things, but it's the same thing as for that whole 4k lines long class. MainController is worse look-wise, and I think most of the bugs come from being lost in here. EventListeners called from there check by string comparison, now that's a way to start lagging. RenderingEngine is the worst. There's a lot of StringBuilder optimisation all over the place, though.
It's from rebuilding whole interface and all text every button press, isn't it? Does Java have coroutines? I don't think I saw any sign of delayed loading of text/icons when I played, it's all simultaneous. Pretty sure that's the main reason, StringBuilder is great and all that, but it's still a lot of memory juggling, when you do this kind of rebuilding whole screen it's just faster to split execution into multiple frames.