HomeGamesUpdatesPricingMethodology
Steam News21 December 20205y ago

Update v.1.12 - Huge Optimizations!

So I was working on making a cool promo video for Zen Trails featuring some complex designs, and I noticed that the framerate really starts to suffer if I get too many segments on screen at once.

Full notes

Full Zen Trails update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes0 additions3 changes0 removals
  • UI and audio
  • Store
  • Balance
changedTurns out, that was a bad idea. Unity doesn't like to have hundreds of UI panels in play and it was dramatically slowing down the game. Even with object pooling, and even while they're completely inactive, it was a mess.
changedSo I basically had to revamp the entire save structure of the game, and the way segments store their own data, but the end result was well worth it. Now there is only ever one single info panel, shared among all segments.
changedFiles that previously took 15 seconds to load now pop in instantaneously. The game can run 1,000+ segments without dropping a frame. It's like a breath of fresh air.

So I was working on making a cool promo video for Zen Trails featuring some complex designs, and I noticed that the framerate really starts to suffer if I get too many segments on screen at once.

This struck me as weird cause they're just lines and dots, and not even moving. I mean it should be able to handle thousands on even the cheapest computer, but I was getting less than 20fps with a mere 200 segments on screen. Not cool. On top of that, some saves were taking 10-20 seconds to load, and they're less than 40KB!

So I spent the last week or so digging into this. Some things that make perfect sense when you start developing a game/app are completely non-sensical by time you're done. When I first started putting Zen Trails together I figured it would be smart to have every segment have its own info panel where all of its relevant info is stored(ie, speed, length, etc). That made sense at the time.

Turns out, that was a bad idea. Unity doesn't like to have hundreds of UI panels in play and it was dramatically slowing down the game. Even with object pooling, and even while they're completely inactive, it was a mess.

So I basically had to revamp the entire save structure of the game, and the way segments store their own data, but the end result was well worth it. Now there is only ever one single info panel, shared among all segments.

Files that previously took 15 seconds to load now pop in instantaneously. The game can run 1,000+ segments without dropping a frame. It's like a breath of fresh air.

Also, I revamped the UNDO/REDO functionality for a third and hopefully final time. Aside from being more reliable, you now get a little pop up notification telling you exactly what was un-did. Neat!

Thank you all so much for playing Zen Trails. MacOS version coming soon!

Source

Steam News / 21 December 2020

Open original post

Changelog.gg summarizes and formats this update. How we read updates.