1. Logic World
  2. News

Logic World News

Logic World Wednesdays: The Thursday Edition IX

Wednesday is a state of mind.

Fancy new inputs - Jimmy

I’ve added two features to the input system that have been on my wishlist for a while: there’s now proper support for gamepads or other analog input, and MIDI inputs now Just Work™ as if they were keyboard keys.

[previewyoutube]{% youtube oiH68X_cVbs %}
[/previewyoutube]

Building Enhancements - Jimmy

I’ve made a few additions to the building mechanics that help with the mass placement of components and wires.

[previewyoutube][/previewyoutube]

Yet Another Flag Video - Jimmy

I really love Flags, and I couldn’t resist adding one or two more features to them…

[previewyoutube][/previewyoutube]

Texture Optimization - Jimmy
Last week I mentioned that I was hoping to optimize the loading of Flag textures by converting them to DDS. Well, I decided to go a different route and use dynamic texture loading. Instead of loading all textures on startup, the game now loads textures only when they’re actually needed. The fastest texture is no texture. Tiny thumbnail images are loaded for the menu where you select a flag texture, but the full-size images are now loaded into memory only when you place a flag that uses them.

The RAM usage, VRAM usage, and startup time of the game is now almost identical to before I added 400 hi-res flag textures to the game files. In fact, it’s a little smaller. I am pleased.

Save file error handling - Jimmy

I’ve completed the work I started three weeks ago on an overhaul of the save loading code and UI. The game can now detect and deal with errors in save files before they’re loaded.

Saves with issues have little notification symbols on them, which you can hover over for more information. I’ve also added a UI in to explain when a save cannot be loaded due to an error.



And finally, I’ve added UI for when a save can be loaded, but there might be problems with it. I’ve furthermore added the code for dealing with those problems when you decide to load the save anyway.



Back That Save Up - Jimmy

You might have noticed in the above image that the button says “backup and load”. Well, that meant I had to code a proper backups system this week. It works like this:
  • Both sandboxes and saved boards are automatically backed up
  • Backups are stored in a unique folder for each item that can be backed up
  • There is a configurable number of backups to keep per item before old backups of that item start getting deleted -- by default this number is 10
  • Backups of deleted items will be kept for a while, then deleted. By default, backups of deleted items will be kept for 50 days.
  • Sandboxes are automatically backed up while you’re playing in them; by default this happens every 5 minutes
  • Saved boards are backed up if they are being overwritten with a new saved board of the same name
  • Sandboxes and boards are backed up before they are deleted
  • Sandboxes and boards are backed up before they are loaded if there was a potential issue detected before loading

A proper backups system has been on my todo list for literally over a year, so I’m very glad to finally get it done. I know my code isn’t perfect, and it’s just a matter of time before it corrupts somebody’s hard work. When that happens, the auto-backups will be there to save the day.

Still alive - Felipe

Hey guys, just checking to let you know I’m still here. I started school last week so I haven’t had as much time or energy for LW lately. Regardless, I’ve been working on improving the networking of the game (yet again), and I’ve also been thinking about the modding tutorials, which we’ll be starting on soon. Unfortunately I don’t have anything to show off to you this week, but I’ll be back soon with fun stuff!

Bugs Fixed This Week
  • Fixed not being able to place things very close to the top of Flags
  • Fixed flag hotbar rendering being based on the wind direction at time of render
  • Fix unnecessary lag while grid-placing Chairs
  • Fixed incorrect grid placing dimensions on Inverter, XOR Gate, D Latch, Oracle, Relay, 3-way AND Gate, and 4-way AND gate
  • Fixed sandbox title input field sometimes being way too small
  • Fix sandbox list order not updating when sorting by title and renaming an item
  • Fixed build pipeline being broken in several ways


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

We'll keep releasing these weekly updates right up until the game comes out. To make sure you don't miss them, you can sign up for our newsletter or join the official Discord, and of course you can wishlist and follow the game right here on Steam.

More Logic World Wednesdays

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

Logic World Wednesdays: The Short Edition

Hello, it’s me, Jimmy! I forgot to get Felipe’s section before he went to bed, and it took me the entire #$@& day to make a script for mass-exporting flag SVGs to PNG which left me no time to finish the two other features I wanted to talk about in this blog post. We’ll be back with a full-sized post next Wednesday, but today we have just the one lil section on Flag improvements. Hope you enjoy!

Flag Fun - Jimmy

This week I polished up Flags and gave them a use beyond decoration: they can now be used as teleport waypoints!

[previewyoutube][/previewyoutube]
I was quite surprised by the journey that Flag development took me on. Flags touch on many different areas of the codebase: this includes various UI stuff, component resizing, component initialization (for the random flags on placement), player teleportation, the ExtraData system (described here, used for storing the order of Flags in the teleport list), the code for indexing and searching for items in a menu, and more. When I visited each of these areas, I stopped to make enhancements and fixes and clean up the code.

In particular, Flags forced me to have a really close look at the way Logic World loads textures from disk into GPU. Now that there are hundreds of flag textures, I can't get away with the original shoddy code; it's just too slow. So this week I spent a lot of time learning about textures, and at the end of it all I've improved texture RAM usage by about 70%, texture VRAM usage by about 90%, and the time to load textures by about 50%. I think I can get the texture load time down another 75% or so by storing the textures in .dds format, which minimizes the work the GPU has to do when converting the data into a format it can use.

I expected Flags to be a quick side-thing, but they ended up being one of my main projects this week. And I'm glad they did -- as a result, the entire codebase is more robust and solid.

Bugs Fixed This Week
  • Fixed the back side of Flags rendering without lighting
  • Fixed OrganizedList search results not updating when an item was added/deleted/edited
  • Fixed custom search tags not working due to outdated localization keys
  • Fixed NullReferenceException and glitchy behavior when trying to resize after reloading a save
  • Fixed timing issues with setting player rotation during teleport


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

We'll keep releasing these weekly updates right up until the game comes out. To make sure you don't miss them, you can sign up for our newsletter or join the official Discord, and of course you can wishlist and follow the game right here on Steam.

More Logic World Wednesdays

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

Logic World Wednesdays: The Alphabetically Sorted Edition

Super Sexy Sandbox Selector - Jimmy

I’ve added a whole bunch of features and improvements to the Sandbox List menu!

[previewyoutube][/previewyoutube]

As I often do with UI design, I sketched the new Sandbox List menu on paper before I started making it in Unity. I thought it might be fun to show the sketch side-by-side with the finished product.



Networking Abstraction - Felipe

This week I’ve been working on abstracting the networking layer that the game uses, which is currently Lidgren. This makes the code much easier to maintain and, possibly, replace, since the code that actually uses the networking stuff doesn’t need to know what’s actually carrying your precious bytes between the server and the client. For instance, the networking could now potentially be replaced with a backend that uses far less bandwidth, at the expense of higher latency and CPU usage.

I’ve already talked about this in a Previous LWW, .However the route that I took back then involved some code that was making existing code even more complex, so it ended up stalling until I returned to it earlier this week. Now I’m using cleaner and better code practices which, combined with last week’s refactor, makes for a great system.

Lightning fast MessagePack packets - Felipe

For some time we’ve been using our homegrown SECCS library for writing and reading packets to and from their binary representation. This library was based on the use of reader and writer methods like the ones the Lidgren library we are using provides. However, when doing the networking refactor, I found that it was hard to decouple SECCS from Lidgren, and at the same time I realised that my reasons for making SECCS didn’t really hold up anymore. After lots of consideration, we’ve moved away from SECCS, and all network packets are now serialized with MessagePack.

This library, as they describe themselves, is "like JSON, but fast and small." That sums it up pretty well, since its purpose is to take an object and spit bytes out that can be used to reconstruct the original object. The difference from SECCS is that, as I mentioned, SECCS made use of Lidgen’s messages, which made it more efficient (or so I thought at first) but indirectly tied it to Lidgren.

I wasn't able to get benchmarks on SECCS vs MessagePack for this week, but I'll try to have them for next Wednesday :)

Bugs Fixed This Week
  • Fixed weird behavior on Windows when editing the description of an OrganizedList item
  • Fixed OrganizedList categories not being deleted when they're emptied
  • Fixed missing hover tag localization on "add new tag" button
  • Fixed Flags hanging from the wrong side


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

We'll keep releasing these weekly updates right up until the game comes out. To make sure you don't miss them, you can sign up for our newsletter or join the official Discord, and of course you can wishlist and follow the game right here on Steam.

More Logic World Wednesdays

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

Logic World Wednesdays: We’re Back!

Hello Logicians! We are back from our break, and so are our Wednesdays. We’re more excited than ever to be making your game, and we’re hard at work on the remaining features and polish needed to get it into your hands.

We don’t have anything to announce right now with regards to Logic World’s release date. Please be patient with us; as soon as we know, you will know as well.

Balance at Last - Markku

Hello, all! Great to be back with some more music for the Logic World OST. This piece of mine is for solo piano and it is called 'Balance at Last'. It is about the mental clarity and fulfillment that we experience after overcoming something difficult. I hope you enjoy, and that you all are doing well.

[previewyoutube][/previewyoutube]

Better Delayers - Jimmy

Delayers are components that allow you to intentionally insert delay into a circuit, for clocks and for precise timing logic. When I’ve previously shown them off, delayers used a peculiar system: the length of a delay was chosen as a multiple of some constant coefficient. There was a delayer that delayed in increments of 10 ticks, a delayer that delayed in increments of 100 ticks, and a delayer that delayed in increments of 1000 ticks.



However, after extensive playtesting by myself and our testers, I’ve realized that this system just isn’t fun.

With every mechanic I add to Logic World, my goal is to enable possibilities. I want to create many different pathways for solving a given problem, each with its advantages and disadvantages. I want to open the door for people to find inventive solutions. When you’re playing Logic World, I want each little part of your contraption to be a meaningful and interesting decision.

But in the case of the old Delayers, there was no decision-making or problem-solving. There was a single, objectively best way of creating a desired delay: stack up delayers in decreasing magnitude until you had the total length you wanted. This was tedious, uninteresting, and frankly it created some ugly circuitry.

I’ve been thinking on the problem of delay for a while, and I think I’ve settled on a good solution. I’ve removed Long Delayers and Very Long Delayers, and regular delayers can now have a delay length of anything between 10 and 100 ticks -- they are no longer locked to multiples of 10.



The tedium of chaining together delayers of different types has now been streamlined, as you can now easily set the precise delay length you want. For short, precision-timing delays of just a few ticks, Short Delayers (1 tick each) are generally the ideal solution. And for the longer delays of many seconds and beyond, you’re now incentivized to build some kind of counter circuit.

In my playtesting I’ve found this to be infinitely nicer than the old system. The time I spend fiddling with delay lengths is minimized, which means I spend more time doing the interesting, fun parts of circuit building.

Server refactoring - Felipe

After coming back from my break, I decided that the server’s code was too ugly, so I decided to refactor a lot of it.

Since the server is made up of many more-or-less individual parts (for example, a save manager, a simulation manager, a network manager, etc), I set on to use Microsoft.Extensions.Hosting. This library is regularly found on ASP.Net Core, and it is used to manage many of an application’s aspects, from startup to shutdown. It also comes with a Dependency Injection utility, which allows us to join the previously mentioned parts of the server together, while keeping them decoupled to allow for easy replacement and testing.

Another perk of the new system is that the server can now generate a graph of the inner relationships between services:



(Dashed lines represent that the dependency is lazy in order to prevent cyclic dependencies)

Visualizing our architecture helps us to understand where things are messy and need better organization.


Saving Refactoring - Jimmy

When I removed Long Delayers and Very Long Delayers (see above), I was faced with a problem. The game had no support for the removal of existing components. If you tried to load a save that contained component types that were missing from the game files, it would stubbornly refuse, insisting that you must be missing a mod. I had to add an option to load the save anyway, and in doing so delete all components of the offending types.

However, as I dug into the code for loading saves, I was faced with an unfortunate reality: that code sucked. It was messy, it was tightly coupled, it was hard to read and hard to extend. There was also a lot of repeated/copied code between the server-side Load Sandbox functions and the client-side Load Board functions. I realized that I could either hack this new feature into the existing messy saving code, creating headaches and probably some bugs, or I could rewrite the whole damn thing.

Well, I decided to rewrite the whole damn thing. What was formerly one of the smelliest parts of our codebase is now clean and shiny and easy to use. Among the benefits of this rewrite are:
  • Faster save load times, particularly on machines with slower hard drives
  • We can now check if a save file is corrupted before loading it
  • Without loading the save, we can now extract various metadata, such as the number of components/wires in the save
  • Save format converters (discussed [here](https://logicworld.net/view/pst-000f007e/logic-world-wednesdays-selfreflection#save-converters-jimmy)) now also work with saved boards, in addition to worlds

So now that that’s done with, I can add that feature I was talking about in paragraph one. I’ll also be able to do a number of save-related things that have been on my wishlist for a while -- check back next week for those things :)

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

See you next Wednesday!

More Logic World Wednesdays

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

Logic World Wednesdays: The Vexillological Edition

Quick and Easy Multiplayer - Felipe
Last week I talked about a system that lets players play online hassle-free, and this week I’ve been working on integrating that system with the existing friends system. Now you can easily join a friend’s game through a couple clicks in the friends menu.

[previewyoutube][/previewyoutube]

Flags - Jimmy

I’ve added a new decoration component: the Flag!

[previewyoutube][/previewyoutube]

Transparent Resizing UI - Jimmy

At the suggestion of our beta testers, I’ve made the resizing arrows partially transparent, so you can see what’s behind them.






Bugs Fixed This Week
  • Fixed not being able to bind Keys to a key that would close its menu (i.e. the Escape key with default bindings)
  • Fixed the resizing arrow on Mounts pointing sideways instead of up
  • Fixed the Console being unavailable while on loading screens
  • Fixed the Console rendering underneath popups
  • Fixed closing the console by pressing Escape also closing some menus if they were open under the console


Upcoming Hiatus

Hi, Jimmy here. There’s some changes happening in my life that will have a big effect on Logic World’s development. I won’t be working on this game for the next few weeks, and as such, Logic World Wednesdays will be taking a hiatus. It will hopefully return in late August. Logic World’s release is also delayed, again. I don’t know when to.

I’m sorry that this is happening, and I’m sorry that I can’t tell you more right now. I will fill you in and give a full update on Logic World’s future when things are stable and I know what’s happening. Rest assured that all three of us remain very committed to Logic World, and it WILL be released.

This week’s edition is, I suppose, a season finale for Logic World Wednesdays. Thank you for all your support and love over the past two and a half years. I’ll catch you on the flippity flip.


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

More Logic World Wednesdays