View Issue Details

IDProjectCategoryLast Update
0016457Stars Beyond ReachGraphical BugMay 21, 2015 11:02 am
Reporterptarth Assigned Tokeith.lamothe  
Status resolvedResolutionfixed 
Product Version0.808 
Fixed in Version0.824 (Graphical Performance Caching) 
Summary0016457: Shift+Click placements leads to oddities in the building drop effect
DescriptionWhen I shift+click to place multiple buildings, the building appears briefly mid-screen then teleports to its position. It may be due to the size of the city as the point.
TagsNo tags attached.

Activities

Chris_McElligottPark

Apr 30, 2015 9:56 pm

administrator   ~0040377

Which type of building? If you turn on the FPS display (under display in the settings), what sort of framerate are you having at the time? Is there a general freeze in your system for a moment when it places? It sounds like a brief lag spike, but that it's only happening when shift is held down is interesting.

ptarth

Apr 30, 2015 10:09 pm

reporter   ~0040380

Shrines, Apartments, Malls, Cheap Dining Halls all do this. My FPS is around 60 at start screen, 20-30 in a small city, 15-20 in large city, 8-12 when placing in a large city. When I place terraformed terrain is also gives a slow for a half second or so. The mouse still moves but clicks do not register until the new terrain is placed.

I plan to start drawing some screen refreshes by hand to help out in the future.

Chris_McElligottPark

Apr 30, 2015 10:26 pm

administrator   ~0040383

Okay, most likely that's just lag then. Bear in mind that most of that has had only a rudimentary optimization pass thus far. Later with various more complex and time-consuming techniques applied, it should be way smoother.

The trick at the moment is that we don't want to waste that time if something about the current implementation shifts in the meantime. Optimizations like that tend to be very specific, so redoing a mechanic is redoing the optimization, and the whole project bogs down, etc.

Right now we're pretty much classing the performance in the mid and late game as "good enough not to rage, but not remotely enough for 1.0." Each week we're doing a bit more to help that anyway, but there will also be a big push for that prior to 1.0. Today has seen a number of shifts, though not in FPS in general -- but the lag spikes you are having there are not related to draw performance, they are some form of calculation that's taking too long.

If you have a particular savegame where you can give us steps to reproduce that, it's something that Keith could profile and see where the ms are all running away to. ;) Depending on what it is, it might be something we can optimize sooner than later, or it might not. But we should be able to at least figure that out with a specific reproducible case in a save.

ptarth

Apr 30, 2015 10:29 pm

reporter   ~0040384

For me, its the same save series that took 18+ seconds for you to run last time. I've not been bothered by it, just adding to the list of issues as with other things.

Chris_McElligottPark

May 1, 2015 8:48 am

administrator   ~0040388

Got it -- thanks!

Chris_McElligottPark

May 1, 2015 8:52 am

administrator  

toodamaged.save (763,185 bytes)

Chris_McElligottPark

May 1, 2015 8:58 am

administrator   ~0040390

Notes for Keith: In the attached save, placing shrines in the upper right corner of his city on top of the evuck terraformed land causes a notable lag spike, but only when shift is held down to place another building.

My first thought was that moving the terraformed land might be having some performance issues on a city that size (which might well be true), but it looks like it might actually be an issue with the recalculation of valid placement locations.

To some extent that lag might be unavoidable, and on first selecting a new building type for placement on a large city, it's not really that noticeable. That said, when it comes to placement of MainCityBuilding and NextToFriendlyBuilding structures, it seems like we could do a partial-dirty of the "can be placed here" state, rather than a full dirty. None of those have any impact except on their own tile and adjacent tiles, so recalculating everything else is a waste.

Definitely an edge case performance optimization, but I wonder about approaching both the base thing (not sure if that's using the new rollups?) and the partial-dirty idea.

keith.lamothe

May 21, 2015 11:02 am

administrator   ~0041030

For 0.824:

* Moved the "what tiles are eligible to build/attack/etc" logic to a separate thread so it doesn't cause jerkiness in the animation of shift-placing buildings, and also lowers the load on the main thread in general.
** Many gui computations have also been moved there, which should help keep the framerate more steady (though not necessarily improving the overall framerate).

Thanks :)

Issue History

Date Modified Username Field Change
Apr 30, 2015 9:29 pm ptarth New Issue
Apr 30, 2015 9:56 pm Chris_McElligottPark Note Added: 0040377
Apr 30, 2015 9:56 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Apr 30, 2015 9:56 pm Chris_McElligottPark Status new => feedback
Apr 30, 2015 10:09 pm ptarth Note Added: 0040380
Apr 30, 2015 10:09 pm ptarth Status feedback => assigned
Apr 30, 2015 10:26 pm Chris_McElligottPark Note Added: 0040383
Apr 30, 2015 10:29 pm ptarth Note Added: 0040384
May 1, 2015 8:48 am Chris_McElligottPark Note Added: 0040388
May 1, 2015 8:52 am Chris_McElligottPark File Added: toodamaged.save
May 1, 2015 8:53 am Chris_McElligottPark Assigned To Chris_McElligottPark => keith.lamothe
May 1, 2015 8:58 am Chris_McElligottPark Note Added: 0040390
May 21, 2015 11:02 am keith.lamothe Note Added: 0041030
May 21, 2015 11:02 am keith.lamothe Status assigned => resolved
May 21, 2015 11:02 am keith.lamothe Fixed in Version => 0.824 (Graphical Performance Caching)
May 21, 2015 11:02 am keith.lamothe Resolution open => fixed