Logic World Wednesdays: The Zoomy Edition

by @JimmyDeveloper2 years ago

I haven’t heard from Felipe all day, so it’s just me this LWW. Assuming he’s not dead, you will hear about what Felipe worked on this week in next week’s LWW.

Zoom - Jimmy

I’ve added the ability to zoom in your view by holding down a key.


Standing Displays - Jimmy

As a compliment to Panel Displays, I’ve added Standing Displays with 2, 3, and 4 input pegs.

standing displays.jpg

Panel Displays are meant for being formal outputs for your circuits; screens, control panels and the like. On the other hand, Standing Displays are meant to be used in the circuits themselves, as status indicators and debug utilities.

Compile Time Optimizations - Jimmy

When you write code, you write it as human-readable text, and then the computer turns that into machine-readable ones and zeroes. This process is known as compiling. After writing some code, you have to wait for it to compile before you can test it.

Logic World’s compile time has been steadily growing as the project has gotten more complex, and this week I’ve buckled down to improve it. Often when you’re testing complex functions, you’ll need to compile 40-50 times before you get it right. By speeding up the compiling process, we not only save time, we make development much more pleasant.

The main way in which I’ve been reducing compile times is splitting up the massive codebase into many smaller assemblies. An assembly is essentially a collection of code which is contained within the larger codebase. An assembly’s code can be used by code in other assemblies. But the most important thing: when code inside an assembly changes, we only need to recompile that assembly and any assemblies which use its code. Other assemblies can use the binary from the last time they were compiled.

The Logic World client is now split up into 33 separate assemblies. In addition to speeding up compile time, this has forced me to restructure the project into many decoupled sections with clear dependencies, which makes for neater code overall. The process of organizing this was much more difficult and time-consuming that I expected it to be. But I’m really glad I did it, as all work on Logic World will be much smoother going forwards.

On my machine, compile time has dropped from 12 seconds to 4 seconds. I’m quite pleased with this; working on the game is so much faster now. I think I might be able to shave off another second or two with better organization of assemblies.

Biweekly Off-Topic Discussions

Logic World has attracted a community full of intelligent and interesting people, most of it over on our Discord, which has over 200 members now. We think it would be fun to leverage this awesome community for group discussions. Starting this week, Philosophy Phridays and Miscellaneous Mondays will be joining Logic World Wednesdays in our weekly lineup. These will be scheduled discussions of fun topics like consciousness, existentialism, aliens and superpowers.

Philosophy Phriday #1 will be this Friday, October 3rd at 19:00 UTC&) in the Logic World Discord. Hope to see you there!

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

@Vykori2 years ago

It pleases me greatly that the code base is cleaner than it used to be! And a 3x improvement in compile time is super impressive.
Still, I’m surprised it was only 12 seconds before, I guess that’s because most of the code from the unity engine itself wasn’t getting recompiled every time?

I appreciate the time zone converter link too, haha.

@JimmyDeveloper2 years ago

Yeah, it’s partly because Unity does a lot of the compile time optimizations for me, but it’s also because I specifically built my computer for game development. I have 32GB of RAM and 16 CPU threads. Compilers love RAM and threads.