1. Logic World
  2. News

Logic World News

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/

Logic World Wednesdays: Singers

Welcome to another Logic World Wednesday! This week, logicworld.net passed 10,000 unique page views. Woohoo!!!

Singers - Jimmy


Digital logic is great, but it’s only useful when it can control devices. Before today, the only output we had in Logic World was displays, which change color when you power them. Introducing Singers!

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

I may have gotten a little carried away with the demo for these. That’s the main reason this post is so late. I hope you think it’s as cool as I do :)

Board uploading - Felipe


Once Logic World is released you’ll be able to upload your boards to logicworld.net and browse everyone else’s, and this week I’ve been working on the system that will allow you to do this straight from in-game.

As you may remember from previous LWWs, the game utilises an RPC connection to logicworld.net in order to do stuff like logging in and interacting with friends, which means that I’ve already got a connection to the logicworld.net server through which I can send the board file. The game will split up the board file in 10kB chunks, export the board’s model as a .obj file and calculate the hash of the entire file, all of which will get sent to the server as soon as you press “Upload” on a board. Once the server has received all the data and has checked that the hash matches, you’ll be directed to logicworld.net/Upload, where you’ll be able to adjust your board’s title and description and upload some good-looking pictures.

You may have noticed that when you press the Upload button on the client you’re not obligated to follow up and publish the board on the site, in which case the server will keep the board file indefinitely while not being public. This is less than ideal, as over time the disk would be full of forgotten board files that never ended up being published. To overcome this, each board you upload will be assigned an ID as soon as you press the button, which will be stored in the database along with the time at which you started the upload. Every hour we check for uploaded board files that are older than 4 hours, which will be deleted from disk and from the database.

My goal with this system was to make it easy and quick to share your boards from inside the game, while being flexible by completing the publication from the website so that I can expand it to allow for the uploading of worlds as well.

UI Refactoring - Jimmy


I spent a lot of time this week going over the code for the various menus in the game. I’ve been cleaning it up and abstracting the systems so they’re easy to use in future menus. I’ve also made significant performance improvements to a lot of our UI.

This stuff isn’t super fun to talk about, but it’s a necessary part of the process of making a game.

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

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.

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

Logic World Wednesdays: Board Models Component Resizing


Welcome back to another Logic World Wednesday! This week, Logic World surpassed 3,000 wishlists on Steam. Thank you to everyone for your support!

Board Models - Jimmy


I added interactable 3D models to the board menu! Now you can see what your saved circuits look like before you load them.

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

Sometime in the future I'd like to let you 3D print these models. I would love to have a little circuit for my desk, that would just be so cool.

Resizable Components - Jimmy


I’ve been working on a system for resizing components in the same way you can resize boards. This will eliminate the need for having many different components that are just the same component resized.

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

This feature was suggested last week by @ForLoveOfCats. Thanks, Cats!

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

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.

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

Logic World Wednesdays: Labels Grids

Label UI - Jimmy


Labels are blocks with editable text on them. I added them to Logic World a while ago, but there hasn’t been an in-game way of editing them. This week I finally added that menu, as well as the ability to change the labels’ color!

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

Grid Placing - Jimmy


Grid Placing is a new feature that lets you quickly place many components in a grid.

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

One of my goals with Logic World is to make the building mechanics fast and easy to use, and Grid Placing is a big part of that!

C# to JS - Felipe


I'm finally back from vacation! Unfortunately I'm going to have less time for LW stuff as I'll be busy with school, however this week I did have time to add something to my vue-aspvalidate library: as you may remember from my last LWW section in order to, say, validate an email there has to be a snippet of C# code that validates it in the back-end and a snippet of JS that validates it on the front end, which meant writing duplicate code for each kind of validation. This is obviously less than ideal as you’re writing everything twice, so I set on to find a way to take C# code and translate and send it to the client.

I arrived at a solution using the wonderful LINQ Expressions API in C# that lets you pass a method a lambda (i.e.value => value.Length > 10) and then go through it using an ExpressionVisitor, which lets you see the lambda as a regular C# object of a type derived from Expression. For example, the previous example would call the VisitBinary method on your visitor, which in turn lets you visit the left and right sides of the > operator and so on.


This means that a single-line validator like value => value[2] == ‘@’ && value.StartsWith(“lol”) || Regex.IsMatch(value, “.*?%$”) gets translated to the JS code value => value[2] == “@” && value.startsWith(“lol”) || new RegExp(“.*?%$”).test(value). As you can see, some BCL methods get translated to their JS counterparts, allowing me to write complex validators without worrying about writing any JS code!

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

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.

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