1. Logic World
  2. News

Logic World News

Logic World Wednesdays: The Kronky Edition

Oh yeah, it’s all coming together.

Logic World is nearing completion. All the various parts of the game are coming together to form a complete product, and we couldn’t be more excited about it.[/size]

Overhauled Display Menu - Jimmy

This week I’ve finished the new Display Menu; you can now save and load configurations for displays, making it easy to create multiple displays with the same color scheme.[/size]

[previewyoutube][/previewyoutube]

The completion of this menu marks a significant milestone: it is the last new menu for editing a component. Previously I’ve made menus for:
[/size]
Since even before we announced Logic World, “make a menu to edit component [x]” has always been somewhere on my todo list. And now they’re all done.[/size]

Integrated Server - Felipe

The Logic World game client doesn’t have any logic at all, it’s all handled by the server, which means that the client by itself can’t really do much. This server is a standalone .NET Core 3.0 project, which means that it compiles into its own executable. Logic World’s singleplayer mode is based on an integrated server, like Minecraft, which boots up every time you want to load a world.

This week I’ve finished the work of integrating the server with the client. The client can now spin up instances of the server and connect to them. This is an important milestone towards shipping the game - now, you can actually play it without starting up a separate server program in the background.

Sandbox Menu - Jimmy

Now that the integrated server is working, I’ve been working on menus for using it in singleplayer. The Sandbox Menu uses the same code as the Save Board and Load Board menus, so each world can have a title, a description, and a series of tags for sorting it. The list of saved games can also be searched.



This menu is still a WIP, you’ll see a video with it next week![/size]

Intro animation - Jimmy

I’ve made a fancy animation with our logos that plays when the game starts up.[/size]

[previewyoutube][/previewyoutube]

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

If you’d like to receive an email each time we post one of these blogs, you can sign up for our newsletter. Be sure also to join the official Discord and follow @LogicWorldGame on twitter.

See you next Wednesday!

View this post on logicworld​.net. More Logic World Wednesdays

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


Logic World Wednesdays: The Thursday Edition III

Welcome back to another Logic World Wednesday! Logic World grows closer to completion every day. This week, we've got a preview of the Logic World Theme, a look at the Main Menu and Languages Menu, and a story about the Bug from Hell.

The Logic World Soundtrack

Logic World is going to have a full original soundtrack, and today we’re excited to announce that the Logic World Theme is complete.

The theme is written by the incredible David Housden, whom you might know from his work on titles like Thomas Was Alone, Volume, and Q.U.B.E. Our game’s theme is a beautiful composition that captures the wonderment and complexity of digital logic. You can hear a preview in the video a little later in this post.

Logic World will also have an extensive suite of music that plays in the background during gameplay. These pieces will be written by a different composer. We’re not quite ready to talk about these pieces yet, but you’ll be hearing about them soon.

Main Menu and Languages Menu - Jimmy

This week I finally started work on Logic World’s main menu! I also added a menu for switching the game’s language.

[previewyoutube][/previewyoutube]

I didn’t realize before I made this menu how much the game was missing it. With a main menu in place, Logic World feels much more complete and polished. The game is finally really coming together, and I am so excited to be working on it!!

Felipe Martínez and the Bug from Hell

Programmers squish bugs all the time; it's part of the job. But once or twice in a career, we face a bug so evasive yet hostile, so powerful yet so unknowable, that it threatens the very sanity of the programmer. These are the bugs of nightmares. These are the Bugs from Hell.

This week, I faced one such bug.

It all started one lazy Sunday morning. I sipped my morning cup of coffee and stretched my fingers, preparing for another long day of work. I was expecting to spend the day working on SECCS and LICC, but as I started to write the first lines of code I noticed something was off. Out of nowhere came some bizarre exceptions, seemingly at random. I could only sit there and watch as the console flooded with red lines of text indicating how bad of a programmer I was. My heart started to pound as I wondered what the silicon slices in my CPU had prepared for me on this damned day.

I took a step back. “No, this can’t be right. My IDE must be messing up”, I foolishly thought to myself. I tried restarting the vessel of horror. As soon as it came back up I was once more greeted by the hundreds of errors. I could feel them glaring down at me. I frantically flipped through the pages of code, trying to find the source of these horrors. “Where are you hiding, you little bastard?” Something, somewhere, was eating chunks of data.

As you may already know, Logic World uses SECCS to read and write packets of data to and from the network. SECCS is composed of a number of type formatters that each take care of one or more types, and they operate with raw bytes. Each field of the object that you want to serialize is written one after the other by its corresponding formatter.

This bug consisted of a rogue formatter that was writing more bytes than it was reading, which means that the formatters that came after it encountered the wrong data. At this point anything could happen, as the data wasn’t correct, so some fields were set to be null when they really weren’t.

It turned out the issue was with how Logic World was using SECCS to read a certain LW class. Specifically, it was the type we use to index a circuit peg within the world. I’d accidentally left the code for doing this the same as it was before we switched to using SECCS for networking. It was reading bytes from the stream that it shouldn’t have been, which messed up everything that read the stream afterwards.

The result of 4 days’ work:



At last, the bug was conquered. It was a painful and arduous task, but the reward was undeniably worth it.

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

If you’d like to receive an email each time we post one of these blogs, you can sign up for our newsletter. Be sure also to join the official Discord and follow @LogicWorldGame on twitter.

See you next Wednesday!

View this post on logicworld​.net. More Logic World Wednesdays

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

Logic World Wednesdays: Bits and Bobs

(this blog was originally posted 2019-11-13)

Display Configurations - Jimmy
Displays allow you to configure which color they are in each possible state of their inputs. This week I’ve been working on the ability to save and load these configurations, so you can quickly set up displays that will be the same color when their inputs are in the same state.



On the top are graphics depicting the possible states of the display’s inputs - from 0000 to 1111 - and the color the display is in for each state. On the left are various saved configurations for displays with four inputs (and 16 states).

This feature isn’t quite done yet, so you’ll see a full video showing it off next week.

Cloud mod compilation - Felipe

As we discussed last week, in order to share a mod on logicworld.net you will need to upload the mod’s source code, which will then get compiled for you on our servers. This is what I’ve been working on this week: I’ve been developing a sort of CI system that automatically compiles the mod’s solution and outputs the mod’s code as DLLs. The system relies on Docker containers to run the build, which means that they run completely isolated from the rest of builds and with the same starting environment every time. Using Docker also means that we can aggregate multiple cloud server instances and create more as demand for compilation power goes up, allowing us to meet the demands.

SUCC v1.1 - Jimmy

SUCC is an open source library I’ve developed for Logic World for saving and loading data as text. We use it for saving user settings, metadata about world saves, localizations, game data like the list of components, and more. I’ve spent some time this week making improvements to SUCC, including adding some features we need for Logic World’s modding system.

There’s too much to talk about here, but you can check out the list of changes over on the 1.1 release page.

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

If you’d like to receive an email each time we post one of these blogs, you can sign up for our newsletter. Be sure also to join the official Discord and follow @LogicWorldGame on twitter.

See you next Wednesday!

View this post on logicworld​.net. Read previous Logic World Wednesdays

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

Logic World Wednesdays: We’re Back!

Welcome back to another Logic World Wednesday. After a three week hiatus, we are back!

If you haven’t been keeping up with us on Discord, the break has been because we were reorganizing Logic World’s 50,000 lines of code. That work is finally done, and your regularly scheduled Wednesdays have returned!

New Menus - Jimmy

I’ve added three new menus to Logic World this week! We now have a pause menu, and buttons and keys have gotten menus for editing those components.

[previewyoutube][/previewyoutube]

MIDI Input Support - Jimmy

Thanks to the release of Minis by Keijiro Takahashi, Logic World’s extensive input system now supports MIDI input! You can now use your pianos to control the game. MIDI bindings can be used for regular game actions like walking and jumping, but I expect they’ll mostly be used with Keys to make in-game music machines :D

New Game State System - Jimmy

Logic World uses a complex state machine to govern the flow between game states. For example, you’re allowed to transition to the in chair state from the building state, but you’re not allowed to transition to the *in chair* state from the multi-wire placing stage 2 state.

Previously, we defined the rules of the state machine all in a single file. This week I’ve built a new system and transitioned all our game states to it. Under the new system, the rules of the state machine are distributed throughout many files. The rules for one state are now right next to the code for what actually happens when the game is in that state.

When we’re working on a game state, this makes it easy to see that state’s relationships with other game states. But more importantly, this means that mods can now add their own game states, since they’re not all defined in one master file.

Server architecture & networking refactor - Felipe

This week I’ve been working on refactoring the server’s codebase, adhering to the Inversion of Control principle. This means that I went through every single class, converted it to non-static, determined the classes that it depends on and injected them on its constructor, while creating an interface for it. This results in highly testable and modular code that’s a lot easier to maintain and extend.

I’ve also been refactoring the networking code: previously each packet type was composed of two methods: one for writing the packet and one for reading it. These methods operated directly on the network stream and they didn’t have an explicit structure, as it was determined by the order and type of read/write calls. After the refactor, each packet is its own class, we have SECCS serialize and deserialize it, so we don’t have to write any code that manipulates the network stream directly. Another benefit is that packets are clearly defined and, again, easier to maintain and extend.

Modding System Progress - Felipe

I’ve also been rethinking the existing modding architecture, and this time I’ve decided on a file structure that looks like this (not final):

  • assets/
    • my_image.png
    • my_mesh.obj
    • my_unityassets.assetbundle
  • data/
    • components.succ
  • lib/
    • MyLibrary.dll
  • manifest.json
  • server.dll
  • client.dll
  • shared.dll


The mod as a whole is comprised of two parts: the server and the client. As their names suggest, the server.dll will only be loaded on the server startup and the client.dll will be loaded on the client startup, while the shared.dll will be loaded on both and can be used to share code between them. It’s worth mentioning that all of these DLLs are regular .NET Standard 2.0 libraries generated by Visual Studio projects.
A mod can have any combination of these 3 DLL files, that’s to say, a mod can have a server.dll, a client.dll or both, in which case it can also optionally have a shared.dll.

The assets folder contains different assets that the client-side mod will be able to load at runtime. Right now the supported types are .png, .obj (.mtl will probably come too) and .assetbundle, and I’d also like to add support for audio files. The asset bundle files must be generated using the same Unity version as the game, which will be made known when the game is released. These asset bundles can contain any complex assets that you may need, like Unity scenes or prefabs.

The data folder currently only contains the SUCC file defining the components that your mod has, whose format you may already have seen in previous LWWs.

The lib folder can contain any external libraries your mod uses, and the manifest.json file defines the mod’s properties, like its name, author, and unique ID used to identify the mod in-game.

Finally, the mod as a whole can be stored in one of two ways: in a .lwmod file (which is just a renamed .zip file), or in a plain folder. The former is how mods downloaded from logicworld.net will be stored, while the latter is especially useful when developing mods as you can just copy the files over without any worries.

You will be able to upload and share mods on logicworld.net, but you must upload its source code, which will get compiled for you. This is in order to enforce open source code and transparency. It protects against mods with malicious code, and it helps people learning to make mods, since they can see the sources of existing ones.

An Early Phriday

For the past few weeks, we’ve been holding biweekly off-topic discussions on the Logic World Discord. This has been a lot of fun and we’ve had some very interesting talks. Some people have lamented that these discussions are not at a good time for them, so we’re experimenting with different times. This week’s Philosophy Phriday willl be 2 hours earlier than usual, at 18:00 UTC.

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

If you’d like to receive an email each time we post one of these blogs, you can sign up for our newsletter. Be sure also to join the official Discord and follow @LogicWorldGame on twitter.

See you next Wednesday!

View this post on logicworld​.net. Read previous Logic World Wednesdays

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

Logic World Wednesdays: Delay

Welcome back to another Logic World Wednesday!

If you haven’t already heard, we have made the difficult but necessary decision to delay the release of Logic World. The game will be released in February 2020. More information can be found here.

Adjustable Delay - Jimmy


Sometimes you need to introduce a delay into your circuits, and that’s exactly what Delayers are for. Previously, each Delayer type had a set delay length, but this week I’ve made it so their delay can be adjusted.

https://www.youtube.com/watch?v=rFW34K0lZmc

Resizable Mounts - Jimmy


Mounts are a component to help you fit your circuits into tight spaces. They’re shaped like little pillars, and you can place any component on top of them.

This week I’ve made Mounts resizable, so you can adjust their height to whatever you need. This reflects a new feature of the Resizable Components system I showed off last week: the ability to resize stuff on the vertical axis.

https://www.youtube.com/watch?v=0SDyFKmKUWQ

Rainbow Keys - Jimmy


You can now change the color of Keys and the label on top of them.



Labeled Buttons - Jimmy


All pressable Buttons can now have text written on them.



Client/Server integration - Felipe


Logic World is composed of a client (the game itself) and a server. In order to play on a world, a client must connect to a server. Previously, the client and server were totally separate applications, which means that you must run a separate server and then connect to it even if you want to play on single-player mode. This week I’ve been working on adding an integrated server to the client, which will automatically be spun up when the game starts without you even noticing.

“Singleplayer” in Logic World is actually just multiplayer with the server running on your machine. Because the game works like this, you’ll have the ability to hop right into your friends’ singleplayer games.

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

If you’d like to receive an email each time we post one of these blogs, you can sign up for our newsletter. Be sure also to join the official Discord and follow @LogicWorldGame on twitter.

See you next Wednesday!

View this post on logicworld​.net. Read previous Logic World Wednesdays

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