Browsed by
Month: October 2019

Bug and performance patch!

Bug and performance patch!

Hello!

The new build will be up soon! Like the previous two weeks, I have focused most of the time this week on fixing recurring issues with performance and also bugs, but I have also managed to get the second density of mid scale residentials in:

w41a.png

This is the maximum density for the mid scale residential zones. They generally demand less utilities and aren’t as demanding when it comes to nearby buildings like parks, schools and clinics, so they can be a good way to fill out narrow arreas with little room for anything else.

w41b.png

The above image shows the low, lower mid and mid tiers mixed in with some full scale buildings.

On the performance side of things, I’ve finally managed to resolve the bug that caused major slowdown when buildings grow and in particular when many buildings are destroyed at once. One of the issues was checking for nearby buildings. Way back, all buildings were on the same layer, so buildings were fetched and then the type was tested. If a residential building was next to an industrial building, it would get an efficiency penalty (fewer residents). Over time, buildings have been separated to several layers, but all layers have still been checked. However, residential and commercial buildings (for example), never need to check for other residential or commercial buildings. So depending on the type of building performing the vicinity check, layers are adapted so only relevant buildings are checked. This speeds things up dramatically, as fewer colliders need to be checked.
Also, this is all now performed with NonAlloc, to speed things up further.

w41c.png

Another improvement using NonAlloc, is when buildings have either been placed, or grown. When checking for a nearby road tile to “attach” to, buildings now use NonAlloc, preventing FPS-hickups further.
There’s also been a recurring issue with buildings registering a nearby “bad” building, despite there not being one. This should now have been fixed completely.

w41d.png

I’ve also tweaked economy and found a few areas of optimization. In doing so I also found an issue where, specifically industry, could get efficiency levels that were too low and also too high (in the range of 6 to 300%). This has now been fixed and industry will rarely go below 60% unless an input (water, power or labour) is missing. Further tweaks to economy will be done in the upcoming version.

I’ve also fixed a bug where loading cities was bugged out on Mac, and while doing so also found a null ref that was fixed on Mac as well.

w41e.png

As for overall progress, I am slightly behind on inflation, currency and wages, due to a heavy focus on bug hunting and optimization. I do think, however, that I will be all but caught up come next update!

Performance and bug fix patch

Performance and bug fix patch

Hello!

This week marks one year of posting (near) weekly devlogs in this kind of five image + text format! So lots of progress has been made I feel. By this time last year I was working my way towards getting a stable enough build for Dreamhack Winter. I had just cut the block size and started adding roads, the carbon pressurization plant and police station buildings had made it into the game and I was also working on merging blocks to create a shadow casting volume to keep down the amount of shadow casters.
Although there’s still a lot to be done in the game, it’s nice to see that it has come as far as it has.
The devlog can be seen here for those interested in a blast from the past: https://www.indiedb.com/games/atmocity/news/progress-update-5-atmocity

To update on current matters though. This week has been almost solely focused on squashing bugs and optimizing the game. With the amount of new things added over the past few months, it’s been high time to take a step back on feature additions and trying to fix some old and annoying bugs.

Change log:

– City hall building added.
– Halloween prop added. More time specific props will be added over time.
– New vactrack icons.

– Fixed bug where sometimes loading a city from the main menu would stall.
– Fix for bug where roadtiles on bridges would not connect to road network on loaded cities.
– Fix for bug where destructed bridges would leave surrounding road tiles unaffected.
– Fix for bug where buildings would sometimes not connect to roads when loading cities. This might still occur in rare situations.
– Bug where notices would not move out smoothly fixed.
– Fix for building props not being removed correctly when demolishing.
– Further optimization when demolishing several buildings at the same time.
– Minor slowdown from sound stopping when demolishing a building playing an ambient sound fixed.
– Performance when deregistering cars when owner building has been demolished improved.
Known issues: Traffic is being optimized and a few bugs are being ironed out, so there’s unexpected behaviour at times.

One issue has been with bridges not registering road tiles properly and messing up buildings registering to a road network. There’s still an issue that sometimes buildings will still not connect to a proper road network, but it should be all but fixed now.

Here’s an image of my test build, fittingly featuring lots of bridges:

w40_a.png

The city hall building has been added. Currently it doesn’t do anything except swallow some mid skilled workers, but it will be given a proper function fairly soon. As can be seen in the following images, I’ve also added a bit of a halloween theme (temporary of course):

w40_c.png
w40_d.png

Another bug that has been fairly tricky to find a solution to was that sometimes cities would not load, instead the game would freeze on the loading screen. This has finally been fixed. I’ve also found some sources of performance issues, among them fading out sounds when buildings are demolished and deregistering cars that belong to demolished buildings. These issues are now fully fixed, which cuts down lag when destroying buildings, especially when destroying many at a time. I’ve also managed to fix the multi destruct bug that was particularly noticable when destroying many mini zones.

w40_e.png

Traffic still shows off some odd behaviour, which will be given some time next week. Hopefully I can improve performance further too, although it is pretty performant as is. Next week I will also go back to working on inflation, currency and wages, getting a proper implementation in. This will be a stepping stone towards adding some new policy options and adding more economic management options. Until next time!

w40_b.png