1. Logic World
  2. News

Logic World News

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/

Logic World Wednesdays: The Thursday Edition II


Sorry for the late post. Programming is hard!

D-Latches - Jimmy


By popular and passionate request, I’ve added D-Latches to the game!

https://www.youtube.com/watch?v=3yc_-BV-tc0

The D-Latch is the first of many new logic components we will be adding to Logic World. Stay tuned :)

Board Saving Menu - Jimmy


Last week I showed off Board Saving, but it didn’t have a menu yet. I’ve been working on the user interface for that feature.

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

This is the most complicated user interface I’ve ever programmed. It was definitely worth my effort, though: I expect many people will have hundreds of saved boards, and they need to have a good way of organizing them.

Form validation - Felipe


If there’s something that’s annoying to both users and web developers, it’s form validation. Most if not all user input needs to be checked, for example to make sure a user’s email is a valid email address.

Every form in our website corresponds to a class in the server, for example the login page gets transformed into an object with two fields: string Username and string Password (this will be relevant later). In this case there’s not much to verify, other than that neither fields are empty, but in more complex forms like the register form you may have to verify the email format, the username length, the password complexity, etc. These requirements have to be verified with the same criteria on the front end (for a smooth and instant response), and on the back end (in case the client fails to verify the data).

As you may or may not already know, the website is made of different technologies for the front and back side, each with their respective languages (C# and Typescript in this case). This means that validation criteria have to be defined on both the back and the front end and in ways appropriate to each language.

ASP.NET Core (the technology used in the back-end) has support for decorating the members of the aforementioned data class with attributes, which makes for a smooth and clear indication of the requirements of the form’s inputs. For example, this is how a register form could look like:



The problem is that in order to enforce these same rules on the client, you’d have to manually check the username’s length, use a regex for the email, etc. Ideally these same rules would be transferred to the client and automatically applied, so that you’d only have to specify the requirements once. This is exactly what my new library vue-aspvalidate does! It allows you to validate inputs on the client and the server while only writing the requirements a single time on the server class.

This will save you a lot of time since you won’t be writing duplicate code, while also making it less buggy and, perhaps most importantly, making sure that the server and client agree on their requirements. It’s also very extensible, letting you define your own rules with client and server logic.

Board Save Format - Jimmy


Last week when I showed off Board Saving, saved boards and saved worlds used a different file format. This week I’ve unified the systems so that boards and worlds are saved with the same logic. This means less code, which is always a good thing!

There is also now a debug option to save boards as text data instead of binary data, in case you need to edit the files manually.

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

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: The logicworld.net Store

The logicworld.net Store - Felipe


We’ve decided we want to sell Logic World on our own store in addition to third party stores like Itch. When you buy through logicworld.net, you’ll be able to download the game completely DRM-free and straight from our website. Additionally, 100% of your money will go to us. We are planning to support payments through PayPal, Stripe, and PaySafeCard. In the future we might also sell physical merchandise on our store.

We’ve updated our Terms of Service and Privacy Policy to reflect this new way of purchasing Logic World.

Saving Boards - Jimmy


I’ve been working on a system to save circuit boards you’ve built stuff on. Often in Logic World you need to use a circuit many different times, so now you can save your circuits and load them again whenever you need them.

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

In the future you’ll be able to upload and share your saved boards on logicworld.net.

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

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/