Logic World Wednesdays: The Felipe's Birthday Edition

by @MouseHatGamesDeveloper1 month ago

Multi-select, Multi-move, Multi-clone - Jimmy

After months of refactoring game systems to enable my vision for Logic World’s building mechanics, finally I’ve got something to show for it! The first implemented feature from the new building mechanics is the ability to select multiple components and perform building operations on them as a group.

Despite being way more complex, I cannot stress enough how much cleaner and nicer the building code is now. Not to mention faster! The new systems took a ton of my time and mental energy, but it’s all been worth it. I can build new mechanics very quickly now, so there will be much more to follow :)

Sentry - Felipe

Due to my imperfection and humanity, people using this website sometimes encounter issues with it. Previously, if you wanted to report one of these issues you’d have to manually write an email or Discord message to us, which is not ideal in terms of tracking issues. For this reason, I’ve implemented sentry.io error tracking into the website. When an error occurs, Sentry now logs the error message and all the information I need in order to fix it. It then sends me a message telling me to fix my website, and presents it all on a nice dashboard. Sentry also measures the time it takes for the page to fully load, allowing me to measure the improvement over time when I release some changes, or notice when a change has made things slower.

If you use an ad-blocker, it will most likely block the requests as it’s a common tracking service. If you do not use an ad-blocker and you want to disable the tracking, you can do so in the website settings page.

Application build time improvements - Jimmy

For years, Logic World has been pretty slow to build. (Building in this context is the process of compiling the development code and assets into a standalone application that you, the end user, can run on your computer). Felipe and I have always been annoyed by this, but it’s never been high priority enough to solve. Slow builds don’t really get in the way of our work; we can just do something else while the game is building. So we’ve mostly ignored the problem.

Well, this week I finally got fed up with the slow builds. I sat down and did some investigating and research and I figured it out.

The problem laid with Unity’s “Always-Included shaders” feature. When a shader is included in this list, every single variant of that shader will be compiled, compressed, and included in a build. Otherwise, Unity will only compile shader variants that it detects are being used in an asset. Always-included shaders can be useful if you’re generating graphics with code, so Unity can’t automatically detect that you’re using a certain shader.

For some reason, we had a built-in Unity shader called Standard (Specular setup) in our Always-Included shaders. Standard (Specular setup) has SO MANY VARIANTS, thousands and thousands of them; Logic World uses, like, two of them, but every single variant was being compiled, compressed, and packaged in the builds.

Once I’d found the likely culprit, I removed Standard (Specular setup) from the Always-Included shaders and saw an immediate improvement. On my machine, a clean build for one OS went from about 12 minutes to about 90 seconds. On the build server, that time went from about an hour to about 4 minutes. Much better.

As a bonus, this fix also makes the builds smaller in file size. Though it’s not as significant as you might expect; modern algorithms are really damn good at compressing shaders.

So, how did Standard (Specular setup) sneak its way into our Always-Included shaders? I sure as heck didn’t put it in there. Well, by combing through our version control history, I found that Unity automatically added it as part of the upgrade process when we updated Unity versions in February 2019. WHAT. THE. HELL. UNITY. I swear, someday I’ll make my own game engine, and then I won’t have to deal with this crap anymore.

Better finish the game first, though.

We’ll keep releasing these weekly updates right up until the game comes out. To make sure you don’t miss them, 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

@Ecconia1 month ago (edited1 month ago)


Nice! That looks promising already.

@Jimmy Imagine a scenario, where a user is new to LW and figure out how to use Multi-Placement, this to 100% results in a huge 2D area of components.
Now we have one or more huge fields of standing Displays and the other users want to get rid of them. The next logical choice is to select all of them.
This leads to the question: Which selection modes are there? Currently it looks like whatever your cursor focuses (except boards) will be selected.
The above described natural 2D-Component-Spam process gives a legit interest in a 2D selection process to get rid of such component areas. I do have a few ideas how to properly implement such mode, I bet you too :)
But I think also Line-Selection might be useful in some cases.
If you do not already have the ULTIMATE SELECTION TOOL, you probably would need a way to switch the selection tool, I fear you might not like this extra complexity though. One could probably dump the chooser into the radial menu (an old OpenTUNG idea), except you bound its purpose to only modding components and not general editing style.
Please dump your thoughts on this as a comment, I am all ears.

Website: if you wanted to report one of these issues

@pipe01 Sentry is good for logging developer bugs, given its not blocked by adblock - thanks for reminding us - mine is indeed blocking it!
However use-errors which code wise are perfectly fine cannot be logged by this tool. So my question is, will there be a proper Issue-Tracker for the website?
You know my attempt to log issues on that one thread. The problem is, it is messy, it does not highly the type and state of the issue. One has to handle it with extra care to keep it properly formatted. An issue tracker would make the life of you and the users reporting issues more easy. What are your thoughts on an issue tracker? In my opinion, especially in this early stage of the website it is needed. Maybe not later. There are currently major issues with the website and a bunch small ones, and I fear you might not be able to keep track of them - except you have your own list.

@pipe01Developer1 month ago

I have recently started working on a custom issue tracker for both the game and the website, so hopefully soon you will be able to redirect your reports there!

@JimmyDeveloper1 month ago (edited1 month ago)

Still working on better selection UIs. More playtesting is required. For now I’m focusing on the operations that you can do with many selected components; the better that mechanic is, the more benefit we’ll get out of each improvement to the selection UI.

@Quarter1 month ago

Will there be texture packs?

@JimmyDeveloper1 month ago

Mods will be able to alter pretty much every visual aspect of the game. I’m not sure exactly what you mean by “texture packs”; the components don’t have textures, they are solid color shapes.

@DaMastaCoda1 month ago

I believe he meant the ability to change the shape of components and add textures to them; This would have the benefit over a mod that it wouldn’t run untrusted code as it only contained images and geometry, and it also shouldn’t add any performance overhead to the simulator.

@JimmyDeveloper1 month ago

Ah. That’s not something we’re focused on adding explicit support for, but as I said it’s definitely possible with mods.

It’s not really something I want to encourage because I want everyone playing the game to have a consistent visual experience. You should be able to send your friend a picture of your circuit, and they should be able to quickly analyze it because they’re familiar with the shapes and colors. That doesn’t work so well if folks are used to components looking totally different.