1. Logic World
  2. News

Logic World News

Logic World Wednesdays: The Grabby Edition

Grabbing Rotations - Jimmy

You can now easily move objects around, and their rotations are all handled properly.

[previewyoutube][/previewyoutube]

This is part 1 of 2 in my Grand Plan to Make Rotating Boards Less Awful and Difficult. You should be seeing part two next week.

Generalized Packet System - Felipe

To send data between the client and server, we use packets. These are small bits of data that the game uses for communicating things like when a player has placed a component. Previously, these packets were hard-coded, meaning that whenever we wanted to add a new packet type we needed to manually register it.

A big issue with this approach is that mods were not able to add their own packet types. For this reason, I’ve made this system more expandable: instead of packets having their own hard-coded ID they will be assigned an ID when the game starts. This will be very helpful for mods, as they will be able to send and receive their own data, independent from the rest of the game.

Fancy Circuit Optimizations - Felipe

This week I’ve also been working on optimizing the code that does all the circuit simulation, namely the clusters system and the circuit states system. The most interesting one is probably the clusters one, since it involved more thinking rather than coding.

Clusters are an internal structure we have within the simulation. A single cluster represents a group of pegs and wires all connected together. Since everything in the group will turn on and off at the same time, they can be treated as one object rather than several.



Previously the clusters that needed to be updated were stored on a simple list, which stored references to all of those clusters. This worked just fine, however it wasn’t the most efficient approach.

Since we only ever iterate through the clusters one after the other, we do not need the ability to get, for example, the fifth cluster in the list. Instead, we only really need to know which cluster is updating first, and which one is updating after it. This is very similar to the concept of a linked list, since each cluster just has to store a reference to the next cluster. This is much more efficient than using a list, since all the operations we need are O(1) (which basically means it always takes the same amount of time, no matter how many clusters there are) on a linked list.

There’s also a distinction between a doubly linked list and a singly linked list: an item in a singly linked list only stores the reference to the next item, while a doubly linked list’s item also stores a reference to the previous item. In theory we would need a singly linked list since we only ever go forward when updating, however using one would mean that we wouldn’t be able to remove an item that’s not the first or the last one (for example when you remove a component and we need to remove it from the list, it’s very likely it’s in the middle). For this reason, we need to go with a doubly linked list.

We could use C#’s generic LinkedList class, however it could introduce more overhead with unnecessary features and end up actually being slower than our old way of doing it. For this reason, clusters will instead build their own linked list of sorts, manually storing the previous and next clusters that are updating. When we want to update all of them we simply get the first one, update it, then check which cluster is next and repeat until we’ve reached the end.

I was going to make a cool graphic diagram to demonstrate the concept, but unfortunately I’m far from a graphics designer so if you’re interested I’ve made a text document detailing what happens when you add or remove a cluster.

This should also drastically improve the performance of Relays, as those components work by creating and destroying clusters. However, we haven't been able to get numbers on that yet.

Bugs Fixed This Week


  • Fixed vertical flying controls getting "stuck" when Lock Flight Y Axis is off
  • Fixed Color Picker often opening by default to a white color
  • Fixed Gridlands worlds by default being created as pure white
  • Fixed boards flying away like a butterfly if you grabbed them at an angle that didn't immediately provide a reference location
  • Fixed crazy errors next time you load a save if you quit to main menu while placing a component
  • Fixed Edit Label Menu not doing "select all" when it's opened
  • Fixed fatal error when spamming the rotation key on buttons and keys


PLUSHIE BOBBY

The amazing @Marutzo -- whom some of you might know as NITRO -- has made a gosh darn plushie of Bobby, Logic World’s beloved protagonist and mascot.



Click here for another photo!

This is pretty much the best thing ever and it has absolutely made our week!

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

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 Buggy Edition

Devilish Details #2 - Jimmy

It’s been one of those weeks where I’ve combed through the game and added tons of small details and polish. I felt it was time for another video compilation of these :)
[previewyoutube][/previewyoutube]

Benchmarks - Felipe

This week I’ve been working on some performance improvements in the circuit code, but quickly I realised that I had no proper way of testing whether or not my changes actually made a speed difference. For this reason I’ve made a simple framework for us and mods to add different benchmark cases. A single case is an interface with a method in it that does a single “iteration” of work (for example, creating a component), and the framework takes care of running a ton of iterations and measuring how long each one takes, then reporting that to the user.

This framework is accessed by the user through two commands: 'benchmark' and 'stress'. The first command will run iterations in about 1 second “groups”, then average the time each group took and calculate the time each single iteration takes. This is fine for long jobs, but for jobs that are very quick to finish (like changing the state of a wire), the time per iteration is so small that it becomes cumbersome to measure and compare. That’s why there’s the second command, which will instead run as many iterations as it can in 5 seconds and report how many iterations per second it achieved.

These benchmarking tools will be invaluable in the coming weeks as we get serious about speeding up Logic World.

Jarvi Makes a Mandelbrot, LIVE

Our brilliant and very handsome beta tester @TheWildJarvi has embarked on an epic quest: to build hardware for rendering the Mandelbrot set in Logic World.




Jarvi is livestreaming most of this process. If you’d like to see hours and hours of unedited Logic World gameplay from someone who knows a heck of a lot about digital logic, you should check out his streams! The first few are already up on youtube, and you should subscribe to his channel so you’re alerted of his future streams.

Bugs Fixed This Week

A member of our community recently suggested that we start including a list of bugs fixed each week in these blog posts. This week has been particularly bug-fix-filled, so it seems like a good time to try out the idea!

Bugs with components
  • Fixed Oracles generating a new value when their circuit network is updated, i.e. by adding or removing a connection to their input
  • Fixed "ghost" display configurations on picked-up Displays with deleted configurations
  • Fixed Buttons and Switches making extra sounds when they are placed, rotated, moved, and when the sandbox loads
  • Fixed Buttons and Keys getting stuck on if they are rotated or flipped while being pressed
  • Fixed held-down Buttons and Keys going up if another player joins the game while they're being pressed
  • Fixed being able to press Keys when you couldn't see the actual key part
  • Fixed Keys turning on but not moving and not making sound when a different player presses them
  • Fixed being able to press Keys when they are visible only via their reflection in SHINY BOBBY


Bugs with building
  • Resizing components: fixed holding shift to snap to square size not working properly\
  • Fixed wire ghosts sometimes having a different rotation from the wires they create
  • Fixed multi-wire placing outlines sometimes being the wrong color


Bugs with the player controller
  • Fixed player jump sounds always coming from the world origin, rather than the position the player jumped from
  • Fixed players sticking to the ceiling when they jump into one
  • Fixed players falling at an inconsistent, and usually too fast, speed when walking off the edge of a platform
  • Fixed players decelerating in the direction they're facing instead of the direction they're moving
  • Fixed players accelerating too slowly when the game is lagging


Bugs with the user interface
  • Fixed hover tags rendering behind popups
  • Fixed visual artifact on settings sliders when set to minimum value
  • Fixed terrible glitchy behavior when clicking on scroll bars
  • Fixed incorrect hover tag text localization key on "Add New Tag" button
  • Linux: fixed resizable menu custom cursors being gigantic and taking up half the screen


Other bugs
  • Fixed positional sounds not getting quieter with distance
  • Fixed client's 'quit' command hard locking the application
  • Fixed component registry not properly detecting the error when a mod adds duplicate component IDs


Please let us know what you think: is this list interesting to you? Would you like to see it return next week?

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

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: Loggy Loggy Log Log Log Glog Glog

Time and Science - Markku

Hello everyone! I hope you enjoy my piece for the Logic World OST called 'Time and Science'.

[previewyoutube][/previewyoutube]

In addition to writing new music, I've recently been working on polishing some of my previous pieces for this soundtrack. I'm now completely done with 20 minutes of music for Logic World. The full soundtrack will be 40 minutes, so we're officially halfway finished! I'm looking forward to the next half and I hope that you're there with me on Logic World Wednesdays to hear some new tunes!

Loggy Loggy Log Log Log Log that’s fun to say out loud - Felipe

This week I’ve been working on making the game log the stuff it’s doing. Right now all the game’s output is printed directly to the in-game console (or the server console), meaning that if you, for example, wanted to print an error, you’d have to explicitly specify the message’s color every time you print it. I’ve been working on a system that abstracts this, instead it lets you say “print an error”, and it will automatically print it to the console with the appropriate color, as well as to a file on disk. Mods will get their own dedicated logger, which means that it will be easy to distinguish between mods’ log messages. This is what the logs in the server look like:



Knowing the message’s “importance” level (trace, debug, information, warning, error or fatal) also lets us write some pretty logs to a file:



I’ve added a command that lets you change the log level (which by default is the information level), so that you can see the tracing messages that are hidden by default.

Now that we have a proper logging system, it will be much easier to diagnose and fix bugs and crashes. Logs should also be a big help to modders who are trying to fix their mods.

In-game mods menu - Felipe

I’ve also been working on a menu that shows all loaded mods. It’s not complete yet, currently it shows you some details about the mod like its name, ID, version and priority:



(The artifacts you see in the details panel are just some Unity Editor shenanigans)

Logic Maker progress - Felipe

I’ve also been progressing on Logic Maker, the tool you will be able to use when working on your own mods. I’ve decided to drop the GUI option (at least for 1.0 release), since I think it won’t be necessary as the CLI app is very easy to use.

I spent a while looking for a library for parsing command line arguments, but none managed to quite convince me. The closest one was Fluent Command Line Parser, however it still doesn’t fully support subcommands (like [code single]git fetch -a, for example). This is the reason I am developing Yaclip (Yet Another Command LIne Parser), a library for parsing arguments with a completely fluent interface. It’s also able to automatically generate pretty help messages, this is Logic Maker’s help message (so far):



Currently, Logic Maker allows you to create new mod projects from templates that you will be able to provide, as well as a default template that allows you to configure what you want and don’t want to include in the mod. You’ll also be able to add new components to your existing mod, although this will probably be overkill for simple components.

Editable Display Configurations - Jimmy

Building on last week’s work on Global Display Configurations, this week I’ve added some fancy menus for editing those configurations!

[previewyoutube][/previewyoutube]

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

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 Sad Edition

Logic World’s Release Delayed… again.

[previewyoutube][/previewyoutube]
I felt it was appropriate to make a video about this rather than just writing a blog post. This is a major bummer, but it’s what’s necessary for the game.

Amazing New Displays - Jimmy

I’ve been working on an overhaul of Displays, to make them faster and easier to use. It’s not quite done yet, but I wanted to show it off in a video anyways.
[previewyoutube][/previewyoutube]
These new displays use the Extra Data system I described last week, and indeed they are the main reason for that system existing.

Cloud metrics - Felipe

This week I’ve been working on adding some metrics to our cloud architecture. Metrics is a generic word for anything that gives us information, which in our case is a set of applications.

First we have Traefik, which is the application that you connect to when you go to logicworld.net and that routes your connection to the back-end services. Traefik can produce some metrics, which Prometheus collects. Prometheus can be considered as sort of a metrics database, which stores the data it collects from the various sources and allows you to query it. Finally, we have Grafana, which is the front-end for all of this and allows us to create cool dashboards like these:

I’m also working on adding metrics tailored to the site itself, like comment count, post count, etc.

Extensible Menu Settings - Jimmy

Many menus in Logic World have a popup window to edit menu settings; you can see it in this recent video. Previously, all menus only had one setting, the scale slider, and the menu settings system was tightly coupled to the menu resizing system.

This week I’ve overhauled Menu Settings so that they’re more independent and open to extension. Any menu can add custom settings now.

Currently Menu Settings still aren’t being used for anything besides the Scale sliders, but I have plans for a few custom menu settings. You’ll likely see those next week :)

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

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 Thursday Edition VII

And So We Danced - Markku

Hello everyone,
I'm glad to be back for another LWW music update. I hope you enjoy this OST sample and that it finds you in good health. This piece is called 'And So We Danced'. Talk to you all again soon!
[previewyoutube][/previewyoutube]

Sandbox Menus & World Types - Jimmy

I’ve finally added a big missing feature: menus to create sandboxes and load your existing sandboxes! Each sandbox has a description box where you can write notes about it, and you can organize your sandboxes by tagging them.

Additionally, when you create a sandbox, you now have the ability to choose its world type, and to edit settings about that world type.

[previewyoutube][/previewyoutube]

New Epic Website - Felipe

As I mentioned on a previous LWW, I’ve been working on redesigning all the cloud infrastructure, including the main site. The current Logic World website is a Single-Page Application or SPA. This means that the site exists only on a single page, and the contents are updated using JavaScript. The new site, however, is being built to use JS as little as possible, and the entire site is guaranteed to work even when disabling JavaScript on your browser. If you do disable JS, you will only lose some QoL features, but the site will still be 100% usable.

You can try out the work-in-progress new site at https://logic.world/. Please let me know what you like and don’t like about it :)

LogicScript: Ludicrous Speed - Felipe

As I was adding features to LogicScript, its performance kept going down. Previously LogicScript was an interpreted language, meaning that scripts didn’t get compiled beforehand and were instead parsed and run. This has a high performance overhead, since we need C# code that’s reading the script and executing the instructions. For this reason, this week I’ve been working on making LogicScript code compile to CIL, which is the same kind of code C# runs as after being compiled. This means that when you load a script it first gets compiled in-memory, and when it gets run it is much, much faster (about 30 times so!).

Extra Data - Jimmy

This week I’ve added a very fancy and versatile system to Logic World, which I call Extra Data. Extra Data is a set of arbitrarily-typed data that is stored with each save file. Currently it is used to store world settings -- see above -- and I'm working on a few more exciting applications for it.

Extra Data is easy to use from code, but under the hood it’s enormously complex. Anybody connected to the server, as well as code running on the server itself, can update the Extra Data. When this happens, it has to be synchronized between all of the connected clients, as well as the server’s master copy saved to disk. The primary source of complexity is the fact that the data can be of any type: the system has to work for numbers, text, colors, lists of lists of six-dimensional vectors -- whatever you throw at it, Extra Data can handle it.

Extra Data is stored on disk as SUCC, so it’s all very nicely formatted and easy to edit if you’re the kind of person to muck about with save files.

Extra Data is fully accessible to mods.

This system was far more difficult to program than I anticipated. I initially budgeted six hours, but it ended up taking three very long and stressful days. This is the cause of this week’s record-settingly-late Wednesday. Sorry about that 😬

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

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/