1. Logic World
  2. News

Logic World News

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/

Logic World Wednesdays: Resizable Everything

More Resizables and More Displays - Jimmy


A while ago I was experimenting with making labels resizable. This is a followup to that: I’ve implemented a full, proper resizable components system that can allow you to resize almost anything. Of course, this system is open to modders: if you make a mod to add a component, you can very easily make that component resizable.

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

Also shown in the above video are the new displays! Logic World now has displays with 1, 2, 3, 4, 6 and 8-bit color depth. I can’t wait to see what you draw with them :)

The Logic World Store - Felipe


Logic World will be sold on Steam and other third-party stores, but we’ll also be selling the game ourselves on logicworld.net. We announced this store on a previous LWW, and this week I’ve been continuing to work on it. This is how it looks like right now:





The Logic World Store is being built to sell the game itself, but in the future we may also sell physical merchandise here!

Automated website testing - Felipe


If you’ve been following us for more than a couple weeks you have probably experienced some issues with the website like the inability to post or delete comments. I try to make every deployment of the website as stable as I can but sometimes I miss something. Therefore, this week I have been adding unit and integration tests that must succeed before deploying, using the Atata framework. Unit tests are pretty boring, but integration tests involve actually performing actions on a browser which makes for a pretty cool show:

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

(Side note: only the first part of the video is sped up, the actions are performed at that speed!)

Integration tests will automatically do all the common actions a user can do (right now only registering and logging in, but the goal is to add actions like commenting, posting, editing comments, etc).

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

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: Orange Orbs of Joy

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

Multiplayer


We thought it was time to show off some multiplayer gameplay!

https://www.youtube.com/watch?v=pshtA-Bi6LM

This week we’ve made it so you can see other players. Previously they were ghosts; you could see their effect on the world, but not the players themselves.

The smiling orange ball - affectionately dubbed “Bobby” by our discord - is just a placeholder. The final game will have actual art :P

Logic World Wiki - Felipe


A game like Logic World must have a place where all the knowledge about modding and other details is stored, and thus the Logic World Wiki was born! It’s empty right now, but when the game comes out this is where we’ll host modding tutorials and documentation, in both written and video form.

New Player Controller - Jimmy


This week I’ve overhauled the player’s movement code. Here are all the features it has:

  • walking
  • running
  • crouching
  • flying
  • flying can be with or without a locked Y axis
  • optional & adjustable movement smoothing
  • optional & adjustable mouse smoothing


Best of all, the player controller is super moddable. You can change the way my code works, or even replace it entirely with your own code.

You can see the new controller in action in the Multiplayer video above.

Dynamic Components - Jimmy


Each component in Logic World has what we call a ‘prefab’, information which defines how the component looks. This includes the number of blocks, the shape of those blocks, the number and positions of its inputs and outputs, and several other things.

Previously, component prefabs were static. Each instance of a component would look exactly the same. But this week I’ve been overhauling the way the game handles prefabs so that a component can change its appearance. Among other things, this means we can make many more components resizable in the same way boards are.

I had really hoped to show this off today, but it was much harder than I expected and the system isn’t done yet. Next week you can expect to see Dynamic Components in action - there’s a lot of cool stuff I plan to do with them.

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

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/