1. Logic World
  2. News

Logic World News

Logic World Wednesdays: Console Scripting and Configurable Input

Advanced Console Functionality - Felipe


Last week I talked about LICC, a common console framework for the client and server that takes care of registering and running commands defined by mods or by the game itself. This week I’ve been extending LICC by adding LSF (LICC Scripting File), a scripting language heavily inspired by Bash. It’s got functions, variables and if, for and while statements, as well as most of the usual math and boolean operators (including the ternary operator). Here’s a sample file:



LSF is completely integrated into LICC, meaning that you’ll be able to use the same script file on both the client and the server!

You can run any script file at any time with the exec command and in LSF files you can also import other script files, allowing you to reuse code. LICC will also automatically run a script called called autoexec.lsf on startup if it exists, allowing you to modify settings or run maintenance tasks.

Input System Overhaul - Jimmy


I spent most of this week working on a total overhaul of Logic World’s input system. The input system is what translates your controls in real life, like clicking the mouse or pressing a keyboard key, into actions in the game. I’ve focused on customizability with the new system. I want everyone to be able to configure the game’s controls to how they want them, or - in the case of people with motor disabilities - how they need them.

Here’s an overview of how the system works:


  • each action the game can interpret - walk forwards, jump, place item, etc - has one or more bindings that can trigger it.
  • bindings can reference direct input like key presses or other bindings. For example, the jump action is bound to space, and the fly up action is bound to jump.
  • bindings can reference multiple direct inputs or other bindings, requiring you to press both of them to trigger the action
  • bindings which can be held down have two options: actually hold them down, or tap once to toggle on and tap again to toggle off
  • bindings can reference double or triple taps/clicks


In addition to being far more personally configurable, the new input system has several advantages over the old one:


  • a much greater variety of input devices are supported, and adding new supported input devices is much easier
  • the bindings can be edited at runtime
  • mods can add and use custom bindings
  • the new system is significantly more performant
  • binding data is stored in an easily-editable file next to the game executable, rather than in the registry


Unfortunately I didn’t have time this week to make the in-game menu for editing the controls, but you can expect to see that next week. In the meantime, you can check out the bindings file - all 79 of our configurable controls.

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

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: Chairs, Consoles, and More

Welcome back to another Logic World Wednesday! This week Logic World passed 4,000 wishlists on Steam. Thank you to everyone who has wishlisted, that number is just crazy!!!

Chairs and Better Keys - Jimmy


I’ve made a number of enhancements to Keys, and added placeable Chair objects to go along with them.

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

I think Chairs are a really nice system. You place one down then lay out a bunch of Keys in front of it, and now sitting in the chair is like sitting down in front of a keyboard.

LICC: Console Backend - Felipe


If you’ve ever played games like Minecraft you probably know that there are commands. Commands are a way of telling the game what to do, for example to quit the game or kick a player.

Right now the client uses a different method of registering and handling commands from the server, meaning that sharing commands between them is practically impossible. That’s why we decided to make a library that handles everything for you, from parsing user input to registering and executing commands. Now, with a single method, a mod can register a command that will work on both the client and the server.

Here’s an example of a command in the code:


[Command]
public static void Say(string what)
{
LConsole.WriteLine("You said: " + what);
}


As you can see, all you have to do to register a command is to add the [Command] attribute to a static method.

You may have noticed that we are using LConsole.WriteLine instead of Console.WriteLine, this is because we need to provide a way of outputting text that works regardless of where the command is running on. On the client it will output to the console window, and on the server it’ll write to the regular console output.

Because of this, LICC* is split into two parts: the backend and the frontend. The backend is shared and provides the base functionality like command registering and executing, while the frontend takes care of interacting with the user: receiving input and sending output.

This is a little demo of the console frontend:



LICC also supports variables, similar to those in Bash (and less powerful (for now)):



* LICC: Library for Implementing C# Commands

Fancy Pants Console Frontend - Jimmy


Using the wonderful backend code Felipe wrote, I’ve made a slick in-game interface for the LICC console.

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

The new console will speed up developing and testing, but most importantly it will let power users go wild with hotkeys and scripts.

Search All the Things - Jimmy


A while ago I added searching to the Selection Menu. This week I’ve abstracted the code for searching components and reused it in a number of places. You can now search:

  • the Selection Menu
  • your Saved Boards
  • the list of Singer instruments
  • the list of Drum instruments
  • messages in the new Console (shown above)


The searching code is really easy to reuse now, so all future menus that are a list of things (like your list of multiplayer servers) will have searching :D

Sound Effect Randomization - Jimmy


I’ve updated our system for playing sound effects so that there is a slight random variation in pitch and volume each time a sound is played. This helps the sound effects to feel more natural, since it’s not exactly the same sound every time.

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

Monospaced Labels - Jimmy


For all the Master Hackers out there, I’ve added an option to labels for making their text monospaced.



Miscellaneous Website Tweaks - Felipe


This week I’ve made various tweaks to the website, however they’re too small to warrant their own section:

  • Comment likes now count towards your profile’s total likes
  • Timestamps are now updated in real time
  • You can now automatically quote comments by selecting some text and pressing “reply”
  • You will now get a notification when someone mentions you in a comment or post (this can be adjusted in your account settings
  • Now there are breadcrumbs in all forum pages, for example: 
  • Collapsed comments are now more collapsed:
    Before: After:
  • The comments section now has some more space and a comment counter:
    Before: After: 


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

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: The Groovy Edition

Drums - Jimmy


Singers play sounds that have different pitches. But not all kinds of sound are like that. Drums are a new component, and they’re very similar to Singers except they play sounds (usually drum sounds) that don’t have different pitches.

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

Keys - Jimmy


Keys are new components that correspond to your physical keyboard. When you press a key in real life, that key is pressed in-game as well. You can use this for really fast and intricate input for your in-game circuits.

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

Post image uploading - Felipe


Some time ago I added the ability to embed images to your post directly from the website, but the UI was very rough. This week I’ve been working on polishing the process of uploading and adding images to your post, this is what it looks like now:



When you add an image it will automatically get uploaded to the server and you’ll have the ability to insert the image embed by clicking on its preview.

Post visual editor - Felipe


In logicworld.net, Markdown is supported pretty much everywhere you can type. Markdown is a text-based language, so if you’re used to other WYSIWYG editors like Microsoft Word it can be somewhat uncomfortable to write Markdown. If this is your case, you’ll be happy to know that there is now a visual editor for posts based on StackEdit:



The revamped image uploading UI and this visual editor both contribute to our goal to make logicworld.net accessible to everyone and easy to use, as well as a great place to share your creations and discuss.

Input Animations - Jimmy


While working on Keys, I gave them sexy animations for going up and down. Rather than snapping between their up position and down position, they move smoothly between the two. I’ve added similar animations to the other two input methods, Buttons and Switches.

You can see this effect in the Keys video above. It’s a small detail, but it’s nice to look at.

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

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: The Web Edition

(this blog was originally posted 2019-08-14)

Hello everyone! This week Jimmy’s on vacation, so it’ll be just me and my web shenanigans.

Comment "soft"-deletion - Felipe


If you’re familiar with Reddit, you have probably seen something like this:



There, whenever you delete a comment it doesn’t disappear from the post, but rather its text and author get replaced with [deleted], which means that its children will be kept intact. That is exactly what happens in logicworld.net now when you delete a comment with children, like so:



Visits chart - Felipe


I love statistics charts, so I just had to make one for logicworld.net’s visits. It’s not visible to the public, but this is what it looks like:



Data prefetch - Felipe


I’ve implemented data prefetching in the forums, which basically means that the forums will be snappier when navigating. For example, the first post of a forum is prefetched when you visit a forum, that way when you click on that post the data will already be in your browser and it’ll load pretty much instantly!

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

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: The Tuesday Edition

(this blog was originally posted 2018-08-06)

Logic World Wednesdays on a Tuesday? What is the world coming to?

If you haven’t already heard, Logic World’s release has sadly been postponed to October.

Board Sharing - Felipe


As you may remember from last LWW, I have been working on a way to easily share your creations with the world in logicworld.net. This week I’ve been working on the board details page, which is the page that people will see when you upload something, like adding the model preview and a picture carousel. I’ve also contracted a zombie to record a video showing the whole process in action:

https://www.youtube.com/watch?v=7kkl7cVSchg

I have also made a little demo demonstrating what the board model in each board page will look like.

Comment rating - Felipe


A bit of a small one, but now you’re able to like comments like you can do with posts! This is how it looks like:



In the future expect a way to sort comments by score and date.

Singer Polish - Jimmy


I’ve made many improvements to Singers since you saw them last week.

Pitch Correction

If you have a keen ear, you might have noticed last week that the pitch of Singer notes was off by a little. Pachelbel’s Canon in D was actually Pachelbel’s Canon in D Sharp Plus 0.6 Semitones. This was caused by an oversight on my part: I was generating the audio at 44100Hz, but playing it at 48000Hz, meaning it was being played slightly faster than intended. This discrepancy has been fixed and Singers are pitch-perfect now.

Wave Instruments

In addition to high-level instruments like Violin or Piano, Singers now have access to the following simple mathematical waves:

  • Sine
  • Sawtooth
  • Square
  • Triangle
  • White Noise


This feature was suggested last week by @gdog1102.

Moddable Instruments

Singers (and now Drums) have access to a number of “instruments”. Each instrument is a set of rules for how to generate sounds. Previously, instruments were hardcoded into the game, but now they’re loaded from the game data folder and so mods can add instruments. Presently we support SFZ, Frequency Modulation, as well as the aforementioned mathematical waves. In the future I’d also like to support Sound Font.

Better Instrument Selection

Previously the list of instruments was all in one giant scroll view. Now - much like the Selection Menu for components - the instruments are divided into several scroll views, and further divided into categories within those. It’s much easier to find the kind of sound you’re looking for now.

Instrument Ranges

Previously the Piano menu for selecting the note of a Singer was static, ranging from C2 to C6. Now, the piano menu will dynamically resize to reflect the range of the selected instrument. The range of a violin is higher than the range of a cello, for instance.

3D Sound

Previously, a Singer would sing to you equally wherever you are in the world. Now they have proper 3D sound: as you get farther away, they get quieter, and they play more in the left or right speaker depending on where they are relative to you. Singer sound is significantly less 3D than other sounds in the game, though, so you can still build large, spread-out music contraptions that sound good.

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

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/