1. Logic World
  2. News

Logic World News

Logic World Wednesdays: A Big Ball of Inverters

Framerate go brrrrr - Jimmy


I've spent the last several weeks working on major performance improvements for Logic World update 0.91. The primary goal of these improvements is to enable much bigger builds by shortening loading times, increasing framerates, and lowering RAM usage for worlds with a very high number of components.

I'm finally at the stage where I can demo these performance improvements in-game! Here's a video showing off a test save that contains 1,000,000 inverters and 10,000 wires -- something that would be completely impractical in 0.90.

[previewyoutube][/previewyoutube]

I was almost at this point last week, but I ran into two major roadblocks, the tales of which I will presently regale you with.

Annoying roadblock #1: shadows not working properly

I spent forever getting my instancing shader to render shadows, as I showed off last time. Imagine my dismay when I integrated the shader with Logic World and the shadows broke. After extensive investigation, the issue turned out to be with using multiple meshes. Instancing a single mesh many times, as I was doing in my demo scene where I developed the shader, would result in correct shadows. However, as soon as you introduced a second instancer with a different mesh, the shadows would break.

This made no sense and was extremely confusing. I'm still new to working with shaders & general graphics tech, so trying to fix a bug this outrageous was a daunting task. Nevertheless, I took the plunge; I read up on how shadowmaps work and tried everything I could think of to make them look normal again. After three days of this I had eliminated dozens of potential solutions, but was no closer to understanding the cause of the issue. Then, on a whim, I updated Unity to the latest patch release... and the bug was fixed!!!

ALL ALONG IT WAS A UNITY BUG AND NOT A JIMMY BUG. Three days trying to fix it when it was completely out of my hands, and all I had to do was press "update". Well, lesson learned: in the future, when my code doesn't work, I'll be much quicker to blame someone else.

Annoying roadblock #2: invisible thumbnail renders

Logic World renders thumbnails for the items on your hotbar. This thumbnail-rendering system broke when I made the switch to GPU instancing. The world renders itself using Unity's Graphics.DrawMeshInstancedIndirect function, but this unfortunately is incompatible with Camera.Render, which is what we were using to render the thumbnails. Camera.Render executes in the middle of a frame, but DrawMeshInstancedIndirect only actually instances the meshes at the end of a frame. Therefore, those instances couldn't be seen by Camera.Render, and all the thumbnails were empty images.

I did some reading, and I figured out that I should be able to instance the mesh during Camera.Render using something called camera command buffers. I wrote the code to do this, but it didn't work. I did some more reading, and it turns out that camera command buffers are not compatible with Unity's Scriptable Render Pipeline, which Logic World uses.

So instead I started mucking around with Scriptable Render Features, which as far as I can tell are the only way of executing command buffers during Camera.Render in SRP. I did get the mesh instancing to work with this, but I couldn't figure out how to make it work with any lighting, so all the thumbnail renders were dark and ugly.

Finally I gave up on doing things in a good clean way and implemented a crappy hacky solution. The only way I have of properly rendering the objects is with Graphics.DrawMeshInstancedIndirect, but that doesn't work until the end of the frame. So, we'll simply wait until the end of the frame to render the thumbnail. This unfortunately means that there will be one frame of delay between when we request a thumbnail and when it gets rendered; it also means that we can only render one thumbnail per frame, as otherwise the two items would overlap in the render. However, I believe I can mostly work around these issues by beginning thumbnail renders as soon as the game starts, so that every thumbnail you need is already rendered by the time you load into a world.

Overall it took about two days to fix all the issues with thumbnail renders. Bleh. While I was there, though, I took the opportunity to up the quality: thumbnail renders are now anti-aliased. It's a subtle change, but a nice one. You might be able to notice the difference in the above video; the edges are much softer and less jagged.

What's next?

After I'd finished with the above two issues, it's thankfully been relatively smooth sailing to integrate the new rendering tech with Logic World. I've carefully checked everything, and all the visuals in 0.91 are now identical to the visuals in 0.90, down to every channel of every pixel. Objects look exactly the same, but they're much faster to render in large-world scenarios.

I've still got a few more things to finish up with the optimizations, but I'm finally almost done with them. Once they're finished, I'll do a hefty round of bugfixing, and then I finally get to work on new features again!

The hardest part of 0.91 is finished, and the update will be in your hands soon.


---------------------------------------------


View this post on logicworld.net

More Logic World Wednesdays

https://store.steampowered.com/app/1054340/Logic_World/

Logic World Wednesdays: Season Premier

It's been sixteen wednesdays exactly since the previous LWW, and we're very excited to be back! Logic World update 0.91 development is underway, and we've got lots to talk about this week.


Configurable simulation speed - Jimmy


Logic World launched with the ability to change the simulation speed using console commands, but this was an awkward and unwieldly process. I've been working on a proper user interface for changing the speed, which also allows you to pause the simulation and then advance it step-by-step.

[previewyoutube][/previewyoutube]

Shoutout to @LOOPS99 for building the Fibonacci machine shown in the video. You can check out that build here.


Soundtrack publication


In case you missed it: this week, the Logic World Original Soundtrack was published on internet music websites! You can read more about the soundtrack, and find links to all your favorite music places, in this blog post.

[previewyoutube][/previewyoutube]

Since the initial soundtrack launch, there have been a few updates. First, the Logic World Theme is now available on Bandcamp and Soundcloud. Second, we've started working to get the soundtrack published as a Steam DLC. Thank you to the folks who've requested that; we hear you, and it is coming!

A few words from Logic World composer Markku Wainman on the soundtrack launch:

> A big thank you to those who have been listening to the album. The reception has been amazing and I really appreciate all the kind words.


Revamped changelog - Jimmy


You may not know this, but Logic World has an in-game information page to display the changelog. In 0.90.3 this is a simple, single page of text, like the Credits and Roadmap pages.



However, after just three updates, it's clear that this approach scales poorly. First, there's the performance issue: in 0.90.3, when you open the Changelog page, there is a lag spike as Unity converts the 13,000 characters into a single mesh for rendering. Second, there's the usability issue: a single-page giant block of text is not fun to navigate!

We make a lot of changes to Logic World, and our changelogs are very detailed, so these problems were only going to get worse with time. Thus I've remade the Changelog page from scratch. Starting in 0.91, the individual changelogs for each version can be expanded and collapsed by clicking on the headers. The giant block of text is no more, which fixes both issues described above.

[previewyoutube][/previewyoutube]


Better handling of exceptional SUCC - Jimmy


If you've gone digging around in the Logic World game files, you've probably encountered some files with the extension `.succ`. These files contain data formatted as text that is easy for humans to read and edit. They are generated and read using my custom data serialization library, SUCC.

Previously, a significant limitation of SUCC has been its poor error messages. When something went wrong, there were very few clues about what exactly that thing was. Well, this week I've finally added good error handling to SUCC! When something goes wrong, SUCC will now provide:
  • A description of the error
  • The path of the file in which the error occurred
  • The line number on which the error occurred

This change won't affect most players, but if you're a modder or tinkerer it will probably improve your life at some point. When you accidentally screw up your SUCC formatting, the new error messages will tell you exactly where to go and what to fix.

If you're a big nerd and want to look at these changes in more detail, you can check out the pull request here.


Optimization work - Jimmy


I've started working on some serious optimizations for Logic World. These will drastically improve loading times for large worlds, and significantly improve framerates while playing in large worlds.

This work is in the early stages and I don't have anything to show for it just yet, but things look very promising, and I expect to have more concrete news soon. Stay tuned :)


---------------------------------------------

That's all for this week, but we'll be back next Wednesday with another juicy blog post. To make sure you don't miss it, you can sign up for our newsletter. Consider also joining the official Discord.

See you next Wednesday!

View this post on logicworld.net

More Logic World Wednesdays

https://store.steampowered.com/app/1054340/Logic_World/

The Logic World Original Soundtrack is now available to stream and download!

You've played the game, you've loved the music. You've wished you could keep listening to the music even when you're not playing the game. Well, today that wish comes true: the Logic World Original Soundtrack is now available on all your favorite internet music websites!

[previewyoutube][/previewyoutube]

Where can I get it?


Wherever you get your music, Logic World is there!

If you like DRM-free video games like Logic World, you'll probably like DRM-free music. While most of the above platforms are streaming-only, you can purchase a DRM-free, ultra-high-quality download of the soundtrack at Bandcamp. It's the best way to directly support Markku and his work!


Wow that album art is beautiful! Tell me more about it!


The gorgeous artwork you see on the album cover was specially commissioned for this soundtrack. It was created by the insanely talented Michael Yoshimura. You should definitely check out michael's website, and follow him on instagram @yoshimura_mike. And if you need some art made, commission him!

You can get the album art in ultra high quality here, and you can get a clean version without the foreground text here.




Wait, I thought you said this would happen next Friday, on the 11th?


That we did, discerning one! But in the immortal words of the great Alanis Morissette, life has a funny way of sneaking up on you. Why did this happen a week early? We don't know! We're just reacting to it. Enjoy the early release!



Ok music is cool and all but when are we getting news about game updates


Our development blog, Logic World Wednesdays, will return next Wednesday, February 9th!


---------------------------------------------------


Enjoy the soundtrack! Stream it, add it to your playlists, tell all your friends about it. We're very proud of this music, and we're so happy to be sharing it with you today.

Logic World v0.90.3 is now available

Last week we released version 0.90.2 with lots of updates and fixes. Unfortunately, that version inadvertently introduced some new bugs, so today we’re releasing version 0.90.3 to squish them.




0.90.3 Changelog


  • Fixed ExtraData being reset every time a save was loaded. This caused impersistence of all the systems stored in ExtraData, such as Display configurations, the Flag order, and custom Gridlands settings.
  • Fixed volume slider values not being applied on game startup
  • Removed the secret settings regarding max audio voices, as making these values configurable is what caused the above bug
  • Fixed error screen when changing the number of pegs on a Panel Display when there are wires attached to it
  • 1x1 Panel Displays are now limited to a maximum of 3 pegs
  • Fixed servers allowing the placement of some invalid component types
  • Servers now have additional checks to ensure that components being placed are valid
  • Server-side checks now disallow making a component a child of its own children

Logic World v0.90.2 is now available

Logic World released in Early Access four weeks ago today. In those four weeks, more than THREE THOUSAND people have bought and played the game. Thank you all so much, words can't express our gratitude for your enthusiasm and support.

But maybe updates can! We've got a big juicy update for you today, full of improvements and fixes.




0.90.2 Changelog


Building
  • Improved performance when grabbing/cloning very large structures by skipping the intersection tests on most frames
  • Added secret setting to configure the specifics of the intersection test skipping: MHG.Secret.GrabbingIntersectionTestsSkipConfiguration
  • Overhauled the algorithm that determines the default wire rotation. Wires in general should look better now.
  • Added setting: "Outline Connected Peg Wires". If enabled, when you look at a peg, all wires connected to that peg will be outlined as well.
  • When resizing a component, the colliders are no longer disabled
  • When resizing or grabbing causes wires to be deleted, these wire deletions are now properly recorded as part of the same undo action instead of separate undo actions
  • Fixed error screen when you multi-delete items that are connected by a wire
  • Floating point errors in component position/rotations take significantly longer to accumulate to noticeable levels
  • Fixed erroneous red outlines when multi-grabbing items and moving them around quickly
  • Removed an erroneously included debug statement that would occasionally spit numbers into the console while placing boards
  • The minimum wire length is now slightly shorter


Components
  • Changed the minimum Delayer length from 1 tick to 2 ticks. One-tick delayer functionality can be done with Buffers.
  • Fixed being unable to adjust the delay length of Delayers in some circumstances where you should be able to
  • Fixed text rendering breaking on some Linux systems when toggling a Label's monospace on or off
  • Fixed error screen that could occur when moving many Sockets at once
  • Fixed not being able to rotate Buffers without grabbing them first
  • Fixed errors when changing the peg count of Displays that have wires between their pegs
  • Fixed music components making awful clicking noises when they come into our out of the render distance range
  • Removed the "applause" sound effect instrument from Singers, as it caused various bizarre issues


Modding
  • Overhauled LogicScript. There are a lot of changes, for the new documentation see https://github.com/pipe01/LogicScript/wiki
  • You can now edit ComponentList files while in-game, and your changes will be hot-reloaded


Worlds
  • Gridlands and Grasslands: changed the angle of the world light source to align with the location of the sun
  • Gridlands: fixed boards being fine-placed on the ground sometimes having inverted fine placement point axes
  • Test world: fixed not being able to press the big clicky button


User Interface
  • Added setting: "Help Menu Starts Open"
  • Moving the mouse on the main menu now twirls the background camera a little
  • Added several secret settings related to the main menu background camera; they all start with the prefix MHG.Secret.MainMenuBackgroundCamera
  • Edit Display Configuration Menu: The "Set All States" UI is now only shown for configurations with more than one peg
  • Create Sandbox Menu: hitting the Enter key when typing in the Title textbox will now create a new sandbox
  • The console will now automatically clear when it exceeds 400 messages. This limit is configurable with the secret setting FancyPantsConsole.MessageLimitBeforeAutoClearing. This is just a temporary solution to prevent lag; we'll do a proper overhaul of the console soon.
  • Removed crosshair options that look like weapon scopes


OBJ export
You can now export your builds to the .obj file format. If you use Blender, use the plugin https://github.com/Red-3D/ObjFix to make your exports look correct.
  • Added command: objexport.world [int textResolution]
  • Added command: objexport.allworlds [int textResolution]


Audio
  • When many components and wires are placed at once (i.e. when a large assembly is cloned), only one sound will now play. Previously you'd get insane sound playage, with one sound effect per component or wire created during the operation. You can revert to the old behavior by turning off the new secret setting MHG.Secret.RestrictCrazyBuildingSounds
  • Added support for loading MP3 and AIFF sound files
  • Removed the legacy Exclusive Peg sound effects from the game files
  • Added an unused sound effect for resizing components
  • Added secret setting: MHG.Audio.Secret.MaxVirtualVoices
  • Added secret setting: MHG.Audio.Secret.MaxRealVoices
  • Tweaked how Barrier sounds propagate in 3D space, and fixed being able to hear them at infinite distance


Music
  • Added setting: "Music Frequency"
  • Updated the secret settings under MHG.Secret.GameplayMusicTiming for the new Music Frequency system
  • All music tracks have been updated to fade in gradually so they don't spook you when they start playing
  • All music is now shipped as 320kbps .mp3s in the game files. These are much smaller than the old .wavs, and the smaller file size should fix the game lurching when music starts to play on older hardware.
  • Endless Curiosity: added a new instrument to the intro
  • Endless Curiosity: tuned some instruments that were out of key
  • Endless Curiosity: adjusted frequencies and relative volumes across the piece
  • Time and Science: adjusted frequencies in the 6kHz-12kHz range
  • Fixed game music not playing until the game was paused/unpaused if a music component was played and "Music Components Stop Game Music" was enabled


Localization
  • Simplified Chinese now correctly identifies itself as "简体中文", instead of "普通话"
  • Simplified Chinese now uses correctly localized glyph styles for CJK characters
  • Fixed Slovenian localization being mislabeled as Slovak and using Slovak sample text
  • Added a scrollbar to the list of translators in the language credits, so the list doesn't get cut off if there are too many translators. Shoutout to the huge and awesome German translation team for being the first language that needed this!
  • Fixed not being able to scroll down to view more languages if there were enough languages in the languages list
  • Added WIP Romanian translation
  • Updated translations & translator credits for Chinese (Simplified), Croatian, Czech, Dutch, French, German, Polish, Portuguese (BR), Russian, Swedish, and Ukrainian


Servers and Multiplayer
  • Fixed the infamous "cuddle bug", where you'd be shoved around by other players while someone was in the process of joining the server
  • The server will now reject building requests with component types not installed on the server (i.e. modded components on an unmodded server)
  • The server will now reject building requests for dynamic components with peg counts that are outside the server limits. Server limits can be configured from the new componentrestrictions.succ configuration file.
  • Fixed servers getting crazy errors if a connected player attempts to run an admin command when there are no admins on the server
  • Previously, the server config value for timeout was called PlayerTimeoutMilliseconds and had a default value of 25000. However, this value was actually in
  • seconds*, so connected players would effectively never timeout. The value has been properly renamed, and the default timeout value is now 60 seconds.
  • Fixed the integrated server not starting when there are no network interfaces available


Misc. Settings
  • Fixed real-time reflection settings not working in some circumstances
  • Fixed "See Your Own Shadow" being stuck on after turning it off, until you reload the world
  • Fixed footstep sounds playing when you toggle "See Your Own Shadow"
  • Fixed your footstep sounds getting louder and louder the more you toggle "See Your Own Shadow"
  • Changed "Crouch Time" max value from 5.0 to 1.0
  • Changed "Max Inverse Coyote Time" max value from 5.0 to 1.0
  • Changed "Player Gravity Scale" min value from 0.0 to 0.1
  • Fix typo in some graphics setting descriptions (refelctions -> reflections)
  • Fixed typo in a setting description (hobar -> hotbar)


Miscellaneous
  • CJK characters will now be displayed in non-CJK languages with Simplified Chinese styling instead of Japanese
  • Added secret setting: LogicUI.Secret.CjkDefaultFontStyle, only used for non-CJK languages
  • Add secret settings to control clipping planes: MHG.Secret.PlayerCamera.NearClipPlane and MHG.Secret.PlayerCamera.FarClipPlane
  • Fixed ExtraData files being created with no value in the Data field
  • More information is now logged for some errors



What's Next


Unless any major critical bugs are discovered with 0.90.2, this will be the last 0.90.x version. After the insanity of launch, we badly need a rest. We're going to take a vacation now, but we'll be back in about a month to work on update 0.91, which should be out in January. That update will include many highly-requested features, like the ability to save subassemblies and load them in other worlds.

This next year is going to be fantastic for Logic World. Throughout 2022 we'll be releasing several major and awesome updates, a whole lot of Logic World Wednesdays blog posts, and one or two very cool surprises. If you like Logic World today, then Logic World this time next year is going to blow your freakin' mind.

Thanks again for playing and for caring about our game. It really means the world to us. Until next time!

-Jimmy & Felipe