Logic World Wednesdays: Chairs, Consoles, and More

by @MouseHatGames 2019-08-29

Welcome back to another Logic World Wednesday! This week Logic World passed 4,000 wishlists on Steam. Thank you to everyone who has wishlisted, that number is just crazy!!!

Chairs and Better Keys - Jimmy

I’ve made a number of enhancements to Keys, and added placeable Chair objects to go along with them.

I think Chairs are a really nice system. You place one down then lay out a bunch of Keys in front of it, and now sitting in the chair is like sitting down in front of a keyboard.

LICC: Console Backend - Felipe

If you’ve ever played games like Minecraft you probably know that there are commands. Commands are a way of telling the game what to do, for example to quit the game or kick a player.

Right now the client uses a different method of registering and handling commands from the server, meaning that sharing commands between them is practically impossible. That’s why we decided to make a library that handles everything for you, from parsing user input to registering and executing commands. Now, with a single method, a mod can register a command that will work on both the client and the server.

Here’s an example of a command in the code:

[Command]
public static void Say(string what)
{
    LConsole.WriteLine(You said:  + what);
}

As you can see, all you have to do to register a command is to add the [Command] attribute to a static method.

You may have noticed that we are using LConsole.WriteLine instead of Console.WriteLine, this is because we need to provide a way of outputting text that works regardless of where the command is running on. On the client it will output to the console window, and on the server it’ll write to the regular console output.

Because of this, LICC* is split into two parts: the backend and the frontend. The backend is shared and provides the base functionality like command registering and executing, while the frontend takes care of interacting with the user: receiving input and sending output.

This is a little demo of the console frontend:

demo.gif

LICC also supports variables, similar to those in Bash (and less powerful (for now)):

console demo 2.png

  • LICC: Library for Implementing C# Commands
Fancy Pants Console Frontend - Jimmy

Using the wonderful backend code Felipe wrote, I’ve made a slick in-game interface for the LICC console.

The new console will speed up developing and testing, but most importantly it will let power users go wild with hotkeys and scripts.

Search All the Things - Jimmy

A while ago I added searching to the Selection Menu. This week I’ve abstracted the code for searching components and reused it in a number of places. You can now search:

  • the Selection Menu
  • your Saved Boards
  • the list of Singer instruments
  • the list of Drum instruments
  • messages in the new Console (shown above)

The searching code is really easy to reuse now, so all future menus that are a list of things (like your list of multiplayer servers) will have searching :D

Sound Effect Randomization - Jimmy

I’ve updated our system for playing sound effects so that there is a slight random variation in pitch and volume each time a sound is played. This helps the sound effects to feel more natural, since it’s not exactly the same sound every time.

Monospaced Labels - Jimmy

For all the Master Hackers out there, I’ve added an option to labels for making their text monospaced.

before.png

after.PNG

Miscellaneous Website Tweaks - Felipe

This week I’ve made various tweaks to the website, however they’re too small to warrant their own section:

  • Comment likes now count towards your profile’s total likes
  • Timestamps are now updated in real time
  • You can now automatically quote comments by selecting some text and pressing “reply”
  • You will now get a notification when someone mentions you in a comment or post (this can be adjusted in your account settings
  • Now there are breadcrumbs in all forum pages, for example: after.PNG
  • Collapsed comments are now more collapsed: Before: after.PNG After: after.PNG
  • The comments section now has some more space and a comment counter: Before: after.PNG After: after.PNG

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 next Wednesday!

Read previous Logic World Wednesdays


38 comments
@sgalatis 2019-09-02

you could look at how a lot of creative minecraft servers partition the landscape into ‘plots’ (via a bukkit plugin) where each user gets their own plot, say 64x64 tiles, 100x100 , etc. users are free to do whatever they want to do inside their own plot, including adding other people to the plot so they too can build. The plugin has other features like merging plots together to form larger ones…tie in an economy system where users can ‘buy’ plots with ingame currency, points gained by time playing on the server, points for up-voting the server, etc. you get the idea ;)

the ‘usual’ format i’ve seen on minecraft servers is 1) a pvp or survival world 2) a creative world that is free for all 3) a plot world where people have their own areas to build in 4) sometimes a ‘learner’ area, like most redstone servers have…you have to prove yourself in the learner area by building something ‘simple’ like a 4bit cpu, a 16 bit alu, perhaps a simple game (tictactoe, simon, connect 4) before they let you loose on the plots. great way to filter out the bad ones ;)

@Jimmy 2019-09-02

Interesting, thanks for the suggestion. We won’t be launching with complex server management tools like this, but perhaps after 1.0 we’ll add them.

@Nerd 2019-08-31

I have a question about servers. Either the players will have different privileges (press other players buttons, delete other players blocks, etc.) and groups (Administrator, moderator, user, etc.), as well as the possibility of private.

@Jimmy 2019-08-31

Our intention with multiplayer is that it’s between small groups of friends, so there probably won’t be building privileges, at least not in vanilla. Servers can either be public where anyone can join or use a whitelist.

@Nerd 2019-08-31

If everyone can join, then griefers may appear

@Jimmy 2019-08-31

That is true and I expect most people to use a whitelist.

Perhaps we should have a privileges system where you can’t modify the world, only view it, until you’ve been approved by an operator.

@Nerd 2019-08-31

I would prefer that on the server can allocate zones for each player, where he can build and destroy anything in his area.

But I think that this is not suitable for a vanilla.

@Jimmy 2019-08-31

That’s a good idea, and something we may add after 1.0.

@Ry 2019-08-30

They Did! HOORAY!

@Ry 2019-08-30

Did They Fix It?

@Ry 2019-08-29

I Have A Suggestion , Can You Make A Key That Has An Output Peg On The back Of The Board Like Panel Displays So You Can Make A Keyboard With No Visible Wires? Also Can You Make Adjustable key lengths? I Think it looks kinda weird to have a tiny space key ,And It Will Make Keyboards Look More Realistic

@Jimmy 2019-08-29

I Have A Suggestion , Can You Make A Key That Has An Output Peg On The back Of The Board Like Panel Displays So You Can Make A Keyboard With No Visible Wires?

This is already a thing! You can see them in the video from last week.

Also Can You Make Adjustable key lengths? I Think it looks kinda weird to have a tiny space key

I agree it’s kind of weird, I may look into this.

@Ry 2019-08-29

OK. Also Theres A Bug When you edit a comment and reload,the thing next to your name will say something like this:

25 minutes ago just now

just so you know

But It only happens when your post is atleast 1 minute old

@Ry 2019-08-29

Heres A Photo : Bug

@Nik 2019-08-29

Those chairs are amazing. Personally I think you never replace that chair model, it can become a staple of this game. Also if there was some kind of rough track system to move the chairs around, that’d be sick! maybe like waypoints that the chair will fly between.

@Jimmy 2019-08-29

if there was some kind of rough track system to move the chairs around, that’d be sick!

I agree, that would be sick! Moving parts and robotics will be one of the first major updates we do to Logic World post-release, and you’ll definitely be able to build something like this when that happens.

@Ry 2019-08-29

Also Just Curious Will There Still Be LWWs After The Game Releases

@Jimmy 2019-08-29

I’m not sure right now. At the very least there will be a few weeks’ break after launch. But I’ve very much enjoyed preparing these posts every Wednesday… we shall see!

@Ry 2019-08-29

Ok. Also How Do You Do The light grey thing where you resay something?

@Jimmy 2019-08-29

like this
which becomes
like this

Also, if you select some text on the page and then press the reply button, that text will automatically be quoted in your reply. A fancy new feature this week :)

We’re planning on adding a page to logicworld.net that lists all the formatting options, but for now this guide is very similar to what we use here.

@Ry 2019-08-29

like this

Thanks For Telling Me

@Nik 2019-08-29

That is extremely exciting.

@Nik 2019-08-29

I’m not sure if making all the keys unable to be pressed if they’re not on-screen is a great idea, as a huge strength of them was that they were global. So if you wanted to debug some huge contraption, you can use a key on 1 end of it, while you’re standing and watching the other end. I like Shamus030’s suggestion to have some kind of setting to make them global if you need it.

As far as commands to add to the game, I come from the SourceRuns speedrunning team for Source games like half-life and portal, so I’m super used to some particular commands from that engine. Alias (to combine lots of commands into 1 custom command, for easy control of lots of actions), Bind (for making a keyboard button execute a command quickly), Noclip, host_timescale, host_framerate, max_fps, startmovie, and various commands to increase graphics settings far beyond what’s normally reasonable. These are all things that are used all the time when viewing/analyzing speedruns, and making recordings of them :D. If equivalent commands were available in logic world, that’d be sick. I’d like to show off my creations in style, of course!

edit: oh and please have some doc in-game or online to have a quick explanation of each command, because that’s always been a pain point of source games

@Jimmy 2019-08-29

I’m not sure if making all the keys unable to be pressed if they’re not on-screen is a great idea, as a huge strength of them was that they were global. […] I like Shamus030’s suggestion to have some kind of setting to make them global if you need it.

One of the main reasons I nixed global keys, which I forgot to mention in the video, is that they’re awkward with multiplayer. With local keys you only need to worry about the players who are closeby to you. But if you’re playing with ten other people spread throughout the map, any of them could at any point trigger any key, which I think would just be weird.

If we have global keys in vanilla I don’t think it’ll be an option accessible via gui, but something you need to use commands to access.

edit: oh and please have some doc in-game or online to have a quick explanation of each command, because that’s always been a pain point of source games

Each command has a brief description of how it works, and you’re able to view that description with help [commandname].

Command suggestions

Alias (to combine lots of commands into 1 custom command, for easy control of lots of actions)

LICC supports script files, where there’s a file on disk with one command per line. One of these script files is automatically run when the game starts up, and you can execute any script file at any point with the exec command. Would this suit your needs?

Bind (for making a keyboard button execute a command quickly)

We will definitely have this! Overhauling the game’s input system is on my list for this week, and I’ll be adding a bind command when I get to that.

Noclip

Overhauling the player controller is another thing on my list for this week, and I’ll be sure to add a noclip command!

host_timescale

There will definitely be a command to change the simulation rate.

hostframerate, maxfps

These are graphics settings and we will have commands to change all settings

startmovie

Is this like playing an mp4 file from in-game? Like a cutscene?

and various commands to increase graphics settings far beyond what’s normally reasonable.

I will make sure you can do this using the aforementioned commands to change settings!

@Nik 2019-08-29

[global keys] are awkward with multiplayer. With local keys you only need to worry about the players who are closeby to you.

Maybe you could optionally link keys to chairs, so players could resolve that? other players across the map won’t affect those linked keys, but guests visiting your contraption can sit in the chair and take control, without needing the keys on-screen.

LICC supports script files, where there’s a file on disk with one command per line. One of these script files is automatically run when the game starts up, and you can execute any script file at any point with the exec command. Would this suit your needs?

First off, that’s awesome. But to answer your question, there are some use cases where aliases are more useful, but maybe having a better scripting system would fix this in a more elegant way too. I say that because I’m not used to having variables in Source, which is going to be a godsend for me. Currently a use for using an alias in a source game, is to later modify that alias with different scripts. Without this ability, some scripts might be a lot larger, and with many script files. Like scripts that cycle your crosshair color through different colors every time you press W, so it’s easier to see. (used a lot in TF2)

Unrelated, but the source engine console also allows sending multiple commands together in 1 line using a semicolon to separate commands. This allows you to do stuff like Bind H command1; command2 to make H do 2 things without a script file, and this could also allow for extra flexibility in scripting. That way if you want W to move forwards and also trigger something, you don’t need to bind W to exec forward.cfg which is a little strange, and may make it more difficult to understand if you’re new to scripting.
Source’s scripting also allows you to make + commands, and corresponding - commands. Let’s say you make an alias called +custom and -custom, then you bind W to +custom. Now, pressing W will run +custom, and letting go of W will run -custom. It’s a messy implementation, but it’s useful to be able to run stuff when you let go of keys. Especially for movement commands.

Is startmovie like playing an mp4 file from in-game? Like a cutscene?

Well the use-case for this command is niche these days, but startmovie in Source games will start exporting every rendered frame as an uncompressed image to a specified path, until you execute stopmovie. This is especially useful with host_framerate, which will make the game render a specified amount of frames-per-in-game-second (ignoring real time, so the game might run hyperspeed, unless you have an fps cap), and allows you to export an uncompressed video with perfectly consistent frame timing, zero stutter. Usually only used when playing back replay files, and with maxed-out graphics settings. Maybe HUD disabled. Also sometimes people render at insane framerates, then combine many frames together in editing to get realistic motion blur. Here’s an example if you’re curious! I’m not sure if this is worth implementing, especially considering the time crunch for V1.0. Speedrunning usually has large quick movements where consistent frame times and motion blur are really helpful to see what’s happening, but this game doesn’t really. Unless somebody makes a parkour course out of boards!! Somebody should do that.

Sorry for rambling! Hopefully this was useful for you.

@pipe01 2019-08-30

Currently a use for using an alias in a source game, is to later modify that alias with different scripts. Without this ability, some scripts might be a lot larger, and with many script files.

Would functions like the ones in Bash be a replacement for this?

@Nik 2019-08-30

Ooh, yeah that would absolutely fix it. I didn’t realize you were willing to make LICC so detailed!

@Jimmy 2019-08-29

Maybe you could optionally link keys to chairs, so players could resolve that? other players across the map won’t affect those linked keys, but guests visiting your contraption can sit in the chair and take control, without needing the keys on-screen.

I’ve thought about this, but it feels like an unnatural solution. The mechanics of local keys very smoothly integrate with the mechanics of chairs. I’m also not sure how to design a UI for assigning keys to chairs.

Thanks for the writeup on desired console functionality, very interesting! Tagging @pipe01 so he sees.

Thank you also for the writeup on startmovie. The Portal 2 video you linked looks ridiculously smooth for 60fps... I’ll look into supporting this, I’m not sure how hard it would be. But I would LOVE for our next two trailers to be as silky smooth as the video you linked, and I would love even more for people like yourself to be able to make their own silky smooth videos.

Sorry for rambling! Hopefully this was useful for you.

No apologies necessary, thank you for rambling! It absolutely was useful, I’m always eager to know what people want from the game.

@shamus030 2019-08-29

PS - when I submitted my other comment, clicking the “Say it!” button didn’t clear the comment field and looked like it didn’t work, but it actually posted my comment twice. Not sure if the UI part was just my phone being janky, but an idempotency check for submitting comments might be good!

I’m on iOS version 12.4 using Safari

@Jimmy 2019-08-29

Yeah, this is a bug with the latest update to the site. Sorry about that. I’ve sent @pipe01 a message about it and he should be fixing it when he wakes up in 6 or so hours.

@Ry 2019-08-29

Happened To Me Too.

@shamus030 2019-08-29

Chairs! That was fast!

Do we have any visual indicators for when you’re in range of a key or not? Perhaps a command to see/change the activation range? I would still like a way to have a “global” key, or at least one that only depends on range and not line-of-sight. For example, when debugging a part of a circuit where the key isn’t quite in view, it would be nice to have a way to trigger something far away instead of dragging a few wires to where I’m standing.

The sound effect variation is a really nice subtle touch.

Custom commands are great too! I think the main command I would like to see is a way to set waypoints to teleport to a saved location. Maybe that might even be some sort of UI… do you plan on adding a map to the game?

@Jimmy 2019-08-29

Chairs! That was fast!

I kept building key-things and being frustrated by the lack of chairs, I just had to add them :)

Do we have any visual indicators for when you’re in range of a key or not?

Not at the moment, what do you think would be a good visual indicator? The range is fairly far, and I figure people will only be using them when they’re fairly close. Plus it’s literally one keystroke to test if you’re currently in the range.

Perhaps a command to see/change the activation range?

The activation range of Keys will definitely be configurable. Currently it’s set to the same distance the player can reach when interacting with the world i.e. building and clicking buttons, which is configurable. Do you think it would be better to have a separate value for key range?

I would still like a way to have a “global” key, or at least one that only depends on range and not line-of-sight. For example, when debugging a part of a circuit where the key isn’t quite in view, it would be nice to have a way to trigger something far away instead of dragging a few wires to where I’m standing.

Thanks for the feedback, I’ll think about this. I actually like the idea of having to build debugging setups, so I’m not certain I want to make them totally obsolete by adding global keys.

The sound effect variation is a really nice subtle touch.

Thanks! I first played around with it in a game jam I did last December. I figured it was about time to add that tech to Logic World.

Custom commands are great too! I think the main command I would like to see is a way to set waypoints to teleport to a saved location. Maybe that might even be some sort of UI… do you plan on adding a map to the game?

That’s a great idea! We’ll definitely have teleport commands where you input x/y/z coordinates, but being able to save specific locations would be fantastic. We’re not planning to add a minimap to the game, at least not for 1.0, so that’s probably better suited for mods.

@Ry 2019-08-29

Like My new Profile Pic?

@Jimmy 2019-08-29

It looks great!

@Ry 2019-08-29

Also Like The New Chair! Now you can make multiple keyboards

@Jimmy 2019-08-29

Thank you! Yes, Chairs combined with how you can only press keys you can see mean you can have multiple control stations throughout the world. It works really fluidly, I’m quite happy with it.