1. Logic World
  2. News

Logic World News

Logic World Wednesdays: The Reorderable Edition

Reorderable Lists - Jimmy

I’ve added a slick new system for reordering a list of items using click and drag.

[previewyoutube][/previewyoutube]

Heavy UI Polish - Jimmy

While implementing the reorderable lists, I noticed many small inconsistencies and annoyances with Logic World’s menus. Elements that were misaligned by a few pixels; scrollbars that had a tiny amount of slack where they should be fully expanded; state flows that required more mouse movement than I would like; buttons in inconvenient or ugly places. Because I’m a crazy perfectionist, I spent about a day going through my list of grievances and fixing many of the issues.

I’m pretty happy with the improvements. To me, at least -- because I know what to look for -- the UI is noticeably nicer to use.

I’m rewriting the website again lol - Felipe

I have decided to rewrite the logicworld.net website completely from scratch one more time.

To help you understand how I arrived at this decision -- and how The Vuening will be superior to all the iterations before it -- let me tell you the story of my journey as a web developer...

[h2]The History of Logicworld.net[/h2]
Way back before we even announced Logic World (around October 2018), I started writing the logicworld.net website for the first time. I made it in C# using the ASP.NET Core framework and plain old server-side HTML templating. The server was completely monolithic, meaning there was a single executable that handled everything, from storing data in the database to sending the site to the users. The more I worked on it though, the more I was becoming limited by the technology I was using: the HTML pages were littered with Razor interpolations, and it was very ugly. For this and some other reasons, I decided to rewrite the site, this time using an SPA framework called Vue.js on March 21, 2019.

SPA means “Single-Page Application”, and you can read in-depth about them on Wikipedia. A typical website has many separate pages, each of which must be loaded independently by the browser. SPAs, on the other hand, load a single page and then dynamically update that page’s contents based on what the user is doing.

The new, SPA-based logicworld.net was much nicer, the code was cleaner and everybody was happy, however the backend was still the same as the original. That code was also getting quite unmaintainable (after all, this was only the second web project I’d ever done!), so the need of rewriting that as well was quickly growing.

[h2]The Kubening: The Final Form of Logicworld.net[/h2]
At this point, I scrapped every single line of code I had written for the website and started on a fresh new repository. I knew I wanted to go with a microservice architecture, since I started using it on the previous version (albeit too late) and I quite liked it, so a core part of the new system would be Kubernetes. Kubernetes is sort of a “competitor” to Docker Swarm, which is the service we were using previously and that took care of managing containers and spreading the workload over multiple machines. Docker Swarm is built-in to Docker, while Kubernetes is a completely separate system, and they both have one thing in common: their job is ultimately to create and destroy Docker containers.

This new system, with Kubernetes being very scalable and “modular”, allowed me to start writing the many services that would make up our cloud infrastructure (which were of course written in Go). When I started to write the main web service, I was faced with a decision: should I use an SPA framework like the old site, or a pure HTML based solution?

I started to contemplate the pros and cons of each solution and, as you might already know, ended up choosing the pure HTML way. It was not an easy, straightforward decision, but I chose pure HTML for the following reasons:
  • SPA sites are heavier on the first load than HTML sites. Since the main use for the site (at least right now) is to read LWWs you are unlikely to navigate much around the site, so the SPA’s benefits of only loading assets once doesn’t give it an advantage over plain HTML, and in fact makes it a bit worse.
  • Some people have JS disabled on their browsers (usually for privacy reasons), which makes an SPA completely unusable.
  • An SPA is a bit overkill for a game’s website.
  • An SPA communicates with the server via an API, which also has to be developed and maintained.

So, I got to work on the new site with plain old HTML and a Go backend. As time went on though, I found development on the site to be really slow, and the HTML templates were getting as complicated as they were in the very first C# version of the site. The user experience also wasn’t very good, with the page reloading for every action you wanted to take. This brought me to reconsider the reasons I decided to go for the HTML solution.

[h2]The Vuening: The True Final Form of Logicworld.net[/h2]
After much consideration, I finally arrived at the following conclusions:
  • While it is true that the initial load time of an SPA is slower than a pure HTML site (sending 3-4 times the quantity of data), this advantage disappears once you’ve navigated to a couple more pages. Our envisioned future for logicworld.net is one where most people are doing a lot of page navigation, browsing forum posts and uploaded creations. When you consider that as the typical use case, the SPA actually wins for total data sent and total time spent loading pages.
  • Only a [very small percentage of people](https://deliberatedigital.com/blockmetry/javascript-disabled) have JavaScript disabled, so making such a huge decision to appeal to that small fraction of people does not make sense. While we support folks’ efforts to retain more privacy online, we ourselves are not actually stealing any data using JS, and the most important thing is that we have a functional website at all:
  • An SPA is
  • much* faster to develop new features for, see the below paragraph. I think that in the future when we introduce workshop features I will be very glad to be using one.
  • My worries about maintaining an API were partially extinguished when I decided to use GraphQL, which I will talk more about down below.

For these reasons, I decided to rewrite the site into an SPA using the new Vue 3 and GraphQL as the main libraries. To be clear though, this is only a rewrite of the *website* part of the whole system. Absolutely none of the other services (such as the forum database backend or the user account authentication service) had a line of code changed, which is a big part of the reason I was able to perform this rewrite so quickly. I wrote the new site *in less than a week* (I started shortly after publishing last week’s LWW). I was able to write the boilerplate code in a day and after that, progress was silky smooth, I had a functioning forum in a couple days. This is a huge deal, as it means we are now able to iterate on and improve the site very quickly, fixing issues in a much shorter time than before.

The new SPA does have some additional advantages, for example quicker navigation between pages and the future possibility of having new comments and posts appear in real time. Additionally, since we are now using a GraphQL API, third-party applications are now able to utilise it in case you *really* don’t like JS (keep in mind we won’t support them though).

We want logicworld.net to be a central hub for community discussions, with more depth and persistence than is possible with the real-time chat of Discord. We want it to be the best place to share your creations and mods with others. I’m feeling excited and confident that this new website architecture will allow us to achieve this vision.

Check out our shiny new website -- it really is quite awesome.

Bugs Fixed This Week
  • Fixed other players not affecting flag cloth physics
  • Fixed not being able to see your own reflection in SHINY BOBBY
  • Fixed the loading screen not displaying when connecting to an external server
  • Fixed the "Disconnected" screen becoming stuck on if you used the console to connect to a server while on the disconnected screen
  • LogicUI: fixed HoverButton still registering ClickBegin events when EnableButton is set to false
  • Fixed some color picker menus not playing nice with menu resizing
  • Fixed being able to set the size of the Edit Display Configurations menu to so small that the UI would glitch out

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

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.

View this post on logicworld.net

More Logic World Wednesdays

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

Logic World Wednesdays: The Formal Edition

Multiplayer Settings - Jimmy

I’ve added a bunch of settings to control your appearance in multiplayer!

[previewyoutube][/previewyoutube]
This also marks the introduction of Formal Bobby. Formal Bobby is a smoother looking Bobby skin that is available as an option alongside the classic Casual Bobby. Let me know what you think of this new look!

It’s a particularly special moment for me because this is the last tab of the Settings Menu that I needed to make. For months and months, the multiplayer tab has been empty save for giant text that says “todo make this page”. But now, Logic World’s settings menu -- the menu that I’ve poured so much time and effort and love into -- is feature-complete, with no more placeholders!

These settings are the first in a series of several multiplayer-focused features I’m working on. Watch out for two or three more next Wednesday :)

The Logic World Original Soundtrack is complete - Markku

Hello everyone. This week I finished producing Logic World’s OST. It has been an incredible experience to write this score and I cannot wait for you all to hear the finished product in its entirety alongside the game.

In the coming weeks, we’ve decided to post tracks from the OST one-by-one leading up to the game’s release with blog posts about each piece. I’ll be talking about my compositional choices regarding instrumentation and harmony as well as sharing some early versions of the pieces to show how they evolved.

The soundtrack will be released on all streaming platforms on the same day as the game, and I hope that listening to it motivates you to revisit Logic World time and time again.

Talk soon!
Markku

Player Authentication - Felipe

This week I’ve been working on a system that allows game servers to verify the authenticity of the users that connect to it. This is important for things like whitelists and banlists; server owners need to know that connecting players are who they say they are.

Originally, I was going to use a system similar to what Minecraft (used to) use, however this method involved both client and server talking to our servers. Though it was doable, this would have introduced quite a bit more complexity. The issue that made us reject this system is that the servers would need to be uniquely identified. At first, I thought we could just use the server’s IP as this identifier. However, when I thought about it some more, I realised that this wasn’t feasible as there’s often more than one IP address that you can use to connect to a single server: the address on the local network is different from the external address, and servers can use custom domain names.

In the end, we’ve settled on a system that someone came up with 4 years ago on Reddit. In this system, when the client wants to connect to a server it first requests its challenge, which is a completely random string generated by the server. This code is then sent to our auth server, which generates a payload and signs it with a private key. This payload+signature pair is sent to the server, which verifies the signature with a public key. If the verification is successful, the server then parses the payload which contains the user’s info, including their username. This allows the server to be completely certain that the information that the user provided is legitimate, since it is signed using our auth server’s private key. It also ensures that the server never has access to any information that could be used to impersonate the user, so malicious server owners have nothing to abuse.

So, I’ve got the system all planned out, and over the next few days I’ll finish implementing it. I’ll see you on your servers -- and you’ll know for sure that it’s actually me ;)

Localization Updates - Jimmy

This week I’ve given some love to our translations, which I admit I’ve neglected somewhat since community translations began a few months ago.

On our community translation page, I’ve updated the localization keys from the most current version of the game files. There are over 350 new keys to translate, including new components, new settings, and a whole lot of translations for the controls menu. Also on our community translation page, I’ve added the languages Arabic and Belarusian, which were missing previously.

Next, I’ve updated the display metadata for all of our languages. This includes stuff like the flag texture, the ISO 631-1 code, and the sample text.

Finally, I’ve added an in-game button that links to the community translation page.



Thank you, so much, to everybody who’s helped translate. I and the rest of the team are stoked to be launching Logic World in so many languages. You guys absolutely rock.

If you’d like to help translate, please click here to begin! You’ll get your name in the game credits, and our eternal gratitude :)

Bugs Fixed This Week
  • Fixed being able to manually enter values to an InputSlider that are out of its range
  • Fixed glitches when setting the min/max of an InputSlider at runtime
  • Fixed not being able to place Flags in tight spaces
  • Fixed various weird issues caused by Flag cloth trigger colliders
  • Fixed Flag cloth being cut off for hotbar renders of flags with a short flagpole or a long cloth
  • Fixed not being able to flag-teleport into spaces occupied by wires
  • Fixed Chair colliders not lining up well with the visual geometry
  • Fixed player looking direction resetting when exiting a Chair
  • Fixed Sandbox List menu throwing an error and not generating if there is a sandbox present using an outdated save format version which has a valid save converter
  • Fixed missing rocket ship icon in Create Sandbox menu
  • Fixed none of the Settings Preview Images working
  • Fixed the flippy part of switches not showing up in SHINY BOBBY when realtime reflections are enabled
  • Fixed background of Pig Flag being transparent instead of a beautiful sky-blue
  • Fixed missing description for the Open Teleport Menu and Open Load Board Menu bindings
  • Fixed missing localization for Delayers
  • Fixed incorrect hover tag localization key on the "show/hide sliders" button in the Color Picker menu
  • Fix embarrassing misspelling in title/description of movement setting (Analogue -> Analog)
  • Fixed part of the Edit Bindings menu not being localized

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

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 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/