Logic World Wednesdays: The Thursday Edition III

by @MouseHatGames 2019-11-21

Welcome back to another Logic World Wednesday! Logic World grows closer to completion every day. This week, we’ve got a preview of the Logic World Theme, a look at the Main Menu and Languages Menu, and a story about the Bug from Hell.

The Logic World Soundtrack

Logic World is going to have a full original soundtrack, and today we’re excited to announce that the Logic World Theme is complete.

The theme is written by the incredible David Housden, whom you might know from his work on titles like Thomas Was Alone, Volume, and Q.U.B.E. Our game’s theme is a beautiful composition that captures the wonderment and complexity of digital logic. You can hear a preview in the video a little later in this post.

Logic World will also have an extensive suite of music that plays in the background during gameplay. These pieces will be written by a different composer. We’re not quite ready to talk about these pieces yet, but you’ll be hearing about them soon.

This week I finally started work on Logic World’s main menu! I also added a menu for switching the game’s language.

I didn’t realize before I made this menu how much the game was missing it. With a main menu in place, Logic World feels much more complete and polished. The game is finally really coming together, and I am so excited to be working on it!!

Felipe Martínez and the Bug from Hell

Programmers squish bugs all the time; it’s part of the job. But once or twice in a career, we face a bug so evasive yet hostile, so powerful yet so unknowable, that it threatens the very sanity of the programmer. These are the bugs of nightmares. These are the Bugs from Hell.

This week, I faced one such bug.

It all started one lazy Sunday morning. I sipped my morning cup of coffee and stretched my fingers, preparing for another long day of work. I was expecting to spend the day working on SECCS and LICC, but as I started to write the first lines of code I noticed something was off. Out of nowhere came some bizarre exceptions, seemingly at random. I could only sit there and watch as the console flooded with red lines of text indicating how bad of a programmer I was. My heart started to pound as I wondered what the silicon slices in my CPU had prepared for me on this damned day.

I took a step back. “No, this can’t be right. My IDE must be messing up”, I foolishly thought to myself. I tried restarting the vessel of horror. As soon as it came back up I was once more greeted by the hundreds of errors. I could feel them glaring down at me. I frantically flipped through the pages of code, trying to find the source of these horrors. “Where are you hiding, you little bastard?” Something, somewhere, was eating chunks of data.

As you may already know, Logic World uses SECCS to read and write packets of data to and from the network. SECCS is composed of a number of type formatters that each take care of one or more types, and they operate with raw bytes. Each field of the object that you want to serialize is written one after the other by its corresponding formatter.

This bug consisted of a rogue formatter that was writing more bytes than it was reading, which means that the formatters that came after it encountered the wrong data. At this point anything could happen, as the data wasn’t correct, so some fields were set to be null when they really weren’t.

It turned out the issue was with how Logic World was using SECCS to read a certain LW class. Specifically, it was the type we use to index a circuit peg within the world. I’d accidentally left the code for doing this the same as it was before we switched to using SECCS for networking. It was reading bytes from the stream that it shouldn’t have been, which messed up everything that read the stream afterwards.

The result of 4 days’ work:

changed files.png

At last, the bug was conquered. It was a painful and arduous task, but the reward was undeniably worth it.


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!

More Logic World Wednesdays


9 comments
@Nerd 2019-12-14

Maybe should make the flags in the localization menu the same width? It would look more beautiful.

@Jimmy 2019-12-16

The thing is, countries’ flags are not all of the same width. It feels wrong to me to squish and stretch the flags to the same width; I feel they should be displayed as they were designed.

@shamus030 2019-11-28

Man I relate so much to the debugging hell. There’s an old saying that for any project (programming or otherwise) 80% of the work takes 20% of the time, and vice versa. But I live for that shit. There’s nothing more satisfying than finding that needle in the haystack after four days of pain.

@pipe01 2019-11-29

Exactly, it’s all worth it when you finally realize what the bug was

@Nik 2019-11-21

You took a very poetic approach this week! It was fun to read and listen to the video 😄

The language of my people ( ͡° ͜ʖ ͡°) is finally inside ( ͡° ͜ʖ ͡°) my favorite game. Makes me excited ( ͡° ͜ʖ ͡°)

@pipe01 2019-11-22

I’m glad you liked it!

@Jimmy 2019-11-21

I’ve loved David Housden’s music for years, and working with him has been a dream come true. The theme he composed for Logic World is absolutely spectacular.

@Broyojo 2019-11-21

yes the music is very good and also the menu is good. it would be cool if you made the menu buttons have icons, maybe of logic world components. just would make it look cooler

@Jimmy 2019-11-21

That is a cool idea, thank you!