Logic World Wednesdays: The Christmas Eve Eve Eve Eve Eve Eve Eve Edition

by @MouseHatGames 2019-12-19

Welcome back to another Logic World Wednesday! This is our last post before the holidays, and we’ve got some real goodies for you this week.

Draggable Colors and More - Jimmy

Logic World’s color picker is something I keep coming back to and tweaking, but this week I think I’ve finally settled on its final form. I’ve shifted the menu elements around so that the HSV wheel is bigger, and I’ve packed the sliders together more closely to save space. I’ve also removed the ability to hide blocks of sliders; dynamically resizing the menu was causing some issues, and I literally never used the option anyway.

I’ve also added a number of new features to the color picker, including the much-requested draggable saved colors. You can see them all in this video:

Mod Hooking - Felipe

This week I’ve been working on the hooks system for mods. Hooks provide a way for mods to listen to game events, like placing a component or a wire, and optionally cancel it or modify it. Right now hooks are implemented through “handler” classes, which are abstract classes that contain a virtual method for each hook. Mods can then make classes that inherit a specific handler class and then implement any hook methods that they want.

This is an example of how a mod’s handler class may look like:

public class MyHandler : WorldHookHandler
{
    private int Counter;

    public override void OnPlacingComponent(PlacingComponentEventArgs args)
    {
        bool cancel = Counter++ % 2 == 0;

        if (cancel)
            args.Cancel();

        LConsole.WriteLine($A user is placing a component of type {args.ComponentType.TextID}, cancel: {cancel});
    }
}

This hook would stop the player from placing a component every second time they tried to. Handy for annoying your friends.

Player Identification - Felipe

Up until now players in the server were identified only by a username they choose. While this works fine, if someone was to connect with the same username as you they would be able to impersonate you. Now players are instead identified by their logicworld.net user ID, which is unique to your account. You can sign in to the game with your logicworld.net account, and in the Steam version, you’ll be automatically logged in to logicworld.net with Steam.

Servers will also have the option to turn on “offline mode”, reverting back to the username identification system. This is useful in case logicworld.net goes down, as an offline server doesn’t need to verify the players’ identities.

Yet More Unexciting Code Work - Jimmy

Last week I spoke of two very cool features I was working on, and I’ve continued that work this week. Unfortunately, I didn’t finish in time for LWW, but most of the architectural groundwork is now laid.


Thanks for reading! We’re going to take a two week break over the holidays, during which time we intend to start beta testing. Logic World Wednesdays returns January 8.

a very logical christmas

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 wishlist Logic World on Steam and join the official Discord.

See you in 2020: the year Logic World releases!

More Logic World Wednesdays


4 comments
@Stenodyon 2019-12-19

Christmas-hat-wearing Bobby is adorable

@Nerd 2019-12-19

By the release of the game, you can make different wallpapers, some developers do it.

@Jimmy 2019-12-19

That’s a great idea!