(this blog was originally posted 2019-12-18)
Welcome back to another Logic World Wednesday! This is our last post before the holidays, and weve got some real goodies for you this week.
Draggable Colors and More - Jimmy
Logic Worlds color picker is something I keep coming back to and tweaking, but this week I think Ive finally settled on its final form. Ive shifted the menu elements around so that the HSV wheel is bigger, and Ive packed the sliders together more closely to save space. Ive 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.
Ive 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:
[previewyoutube=9GoQYYBJ8xg;full][/previewyoutube]
Mod Hooking - Felipe
This week Ive 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 mods 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, youll 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 doesnt 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 Ive continued that work this week. Unfortunately, I didnt finish in time for LWW, but most of the architectural groundwork is now laid.
---------------------------------------------
Thanks for reading! Were 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.

If youd 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.
More Logic World Wednesdays
https://store.steampowered.com/app/1054340/Logic_World/
[ 2020-01-08 23:44:19 CET ] [ Original post ]