itch.io is community of indie game creators and players

Devlogs

Logic World Wednesdays: Console Scripting and Configurable Input

Logic World
A downloadable game for Windows, macOS, and Linux

View this post on logicworld.net

Advanced Console Functionality - Felipe

Last week I talked about LICC, a common console framework for the client and server that takes care of registering and running commands defined by mods or by the game itself. This week I’ve been extending LICC by adding LSF (LICC Scripting File), a scripting language heavily inspired by Bash. It’s got functions, variables and if, for and while statements, as well as most of the usual math and boolean operators (including the ternary operator). Here’s a sample file:

LSF is completely integrated into LICC, meaning that you’ll be able to use the same script file on both the client and the server!

You can run any script file at any time with the exec command and in LSF files you can also import other script files, allowing you to reuse code. LICC will also automatically run a script called called autoexec.lsf on startup if it exists, allowing you to modify settings or run maintenance tasks.

Input System Overhaul - Jimmy

I spent most of this week working on a total overhaul of Logic World’s input system. The input system is what translates your controls in real life, like clicking the mouse or pressing a keyboard key, into actions in the game. I’ve focused on customizability with the new system. I want everyone to be able to configure the game’s controls to how they want them, or - in the case of people with motor disabilities - how they need them.

Here’s an overview of how the system works:

  • each action the game can interpret - walk forwards, jump, place item, etc - has one or more bindings that can trigger it.
  • bindings can reference direct input like key presses or other bindings. For example, the jump action is bound to space, and the fly up action is bound to jump.
  • bindings can reference multiple direct inputs or other bindings, requiring you to press both of them to trigger the action
  • bindings which can be held down have two options: actually hold them down, or tap once to toggle on and tap again to toggle off
  • bindings can reference double or triple taps/clicks

In addition to being far more personally configurable, the new input system has several advantages over the old one:

  • a much greater variety of input devices are supported, and adding new supported input devices is much easier
  • the bindings can be edited at runtime
  • mods can add and use custom bindings
  • the new system is significantly more performant
  • binding data is stored in an easily-editable file next to the game executable, rather than in the registry

Unfortunately I didn’t have time this week to make the in-game menu for editing the controls, but you can expect to see that next week. In the meantime, you can check out the bindings file - all 79 of our configurable controls.


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.

See you next Wednesday!

Read previous Logic World Wednesdays

Download Logic World
Leave a comment