Logic World Wednesdays: The Ephemeral Edition

by @MouseHatGamesDeveloper1 month ago (edited4 weeks ago)

Feature Flags - Felipe

The logicworld.net website used to have a very rudimentary authorization scheme: users had roles which were simple strings and services checked those roles, that’s it. However, I’ve always wanted to have a more granular control over what a certain user can or cannot do.

Recently I discovered Flagsmith, which is an open source feature flags platform that lets us define multiple “switches” for things like “can this user create a comment”, then we can segment the users and enable or disable certain switches for users that, for example, have a “moderator” trait.

It can be used for more than just user permissions though, it can also modify site-wide behavior. For example I have added an “enable SSR” switch that lets me disable SSR instantly and on the fly if a serious bug has been discovered, making sure that the website is still usable while I fix the issue. Flags can also be used for combating spam or other crises; for example if someone keeps spamming the site with new accounts even as we ban the old ones, we can disable account creation while we sort the situation out.

We hope that logicworld.net will see a surge of traffic and activity when the game launches, so we will be ready for that to happen!

Ephemeral messages - Felipe

I’ve implemented what I call “ephemeral messages”, which are like notifications except that they are only shown to you once, after which they get deleted. This is currently being used for showing you a message when you confirm your email and go back to the website, and in the future I can see it being used for site-wide notices, e.g. maintenance or big events.

Input system upgrades - Jimmy

Logic World has a fairly extensive custom-built input system that allows for very customizable controls. This week I’ve been working on some upgrades to the system, with two important new features: Contexts and Mod Support.

First up is Contexts. For a given game control trigger, such as Walk Forward, that trigger is used in some contexts (on foot) but not in others (in pause menu). This idea of “contexts” is now used explicitly within the input system; an input trigger can belong to one or more contexts, or it can be a “global trigger” that is always available in all contexts (such as the open debug console trigger).

This is handy when writing code, as instead of asking for input data about a specified and hardcoded set of triggers, I can now just ask for data about all the triggers in a given context. But more importantly, it allows the game to check for and inform the user about conflicting bindings. Triggers within the same context shouldn’t be controlled by the same button, but triggers in different contexts can be controlled by the same button without issues. Now the game can detect the difference, and inform the user when they should change one of the bindings.

Logic World has at time of writing 96 control triggers, and that number is growing. Contexts help to organize all that, both on the backend for us coders and on the frontend for players customizing their controls.

The second major new feature is mod support! Previously, the list of input triggers has been hardcoded. If a modder wanted to add a custom action, they usually couldn’t use a rebindable control, but would have to hardcode which button is used to trigger their action. Now, however, modders can add new custom Triggers and Contexts. Their custom triggers will appear in the control rebinding menu and generally function exactly like built-in controls do.

So, the backend for these input system upgrades is mostly complete, but I still need to add the frontend parts for displaying binding conflicts and a few other UI tweaks for controls. That should all be done shortly. This upgraded input system is one of the last pieces I need to fit all the new building mechanics together, which will mark feature-completeness for Logic World’s first Early Access version. As such, we’ll announce a release date as soon as that work is done.

Exciting times ahead.


We write a blog like this one every week, keeping you updated on Logic World development. To make sure you don’t miss the next one, you can sign up for our newsletter. Be sure also to wishlist Logic World on Steam and join the official Discord.

See you next Wednesday!

More Logic World Wednesdays


2 comments
@Anne1 month ago

Nice :)

@Ecconia1 month ago

Sweet, I kind of like that I can related to all the issues listed here.

  • 1. The first one sounds handy, oha another external framework. The LWWebsite how we know it, (semi-ish working) framework madness :D
  • 2. Heh, I know where these one-time messages come from. A certain someone complained, that there is no email confirmation message (when clicking on the confirmation link in the email). Imagine not being on the website for some time, and then getting 10 of these notifications - what might happen? Hehehehe.
  • 3. I heard from some beta tester, that the keybindings do fight for each other, like its is not quite scoped. I also added something like this to the TUNG clone, each tool has its own keybindings, which do not fight with any other tool - its super amazing once one has it. Needs a generic framework though.