Logic World Wednesdays: The Short Edition

by @MouseHatGamesDeveloper1 year ago

Hello, it’s me, Jimmy! I forgot to get Felipe’s section before he went to bed, and it took me the entire #$@& day to make a script for mass-exporting flag SVGs to PNG which left me no time to finish the two other features I wanted to talk about in this blog post. We’ll be back with a full-sized post next Wednesday, but today we have just the one lil section on Flag improvements. Hope you enjoy!

Flag Fun - Jimmy

This week I polished up Flags and gave them a use beyond decoration: they can now be used as teleport waypoints!

I was quite surprised by the journey that Flag development took me on. Flags touch on many different areas of the codebase: this includes various UI stuff, component resizing, component initialization (for the random flags on placement), player teleportation, the ExtraData system (described here, used for storing the order of Flags in the teleport list), the code for indexing and searching for items in a menu, and more. When I visited each of these areas, I stopped to make enhancements and fixes and clean up the code.

In particular, Flags forced me to have a really close look at the way Logic World loads textures from disk into GPU. Now that there are hundreds of flag textures, I can’t get away with the original shoddy code; it’s just too slow. So this week I spent a lot of time learning about textures, and at the end of it all I’ve improved texture RAM usage by about 70%, texture VRAM usage by about 90%, and the time to load textures by about 50%. I think I can get the texture load time down another 75% or so by storing the textures in .dds format, which minimizes the work the GPU has to do when converting the data into a format it can use.

I expected Flags to be a quick side-thing, but they ended up being one of my main projects this week. And I’m glad they did – as a result, the entire codebase is more robust and solid.

Bugs Fixed This Week

  • Fixed the back side of Flags rendering without lighting
  • Fixed OrganizedList search results not updating when an item was added/deleted/edited
  • Fixed custom search tags not working due to outdated localization keys
  • Fixed NullReferenceException and glitchy behavior when trying to resize after reloading a save
  • Fixed timing issues with setting player rotation during teleport

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


9 comments
@shamus0301 year ago (edited1 year ago)

it took me the entire #$@& day to make a script for mass-exporting flag SVGs to PNG

I’m curious, what made this such a complex task? If you’re going to be doing more image manipulation in the future I’d recommend ImageMagick. If you were literally just converting SVGs to PNG it could have been one line in bash:

for f in *.svg; do magick convert "$f" "${f%.*}.png"; done

@JimmyDeveloper1 year ago

Hey, sorry for not responding earlier, I totally missed this comment! ImageMagick looks awesome, thank you for the suggestion.

As I recall, the main thing that took forever was finding an SVG export library with the particular featureset I need:

  • Able to automatically scale exported image to have a given height, and scale the width appropriately for the file’s aspect ratio
  • Support for SVG2

But in addition to that it was just one of those times when you’re writing code and everything goes wrong. Oh well, it’s done now ¯\_(ツ)_/¯

@shamus0301 year ago

Yep, ImageMagick can handle the scaling properly. Not sure about SVG2 but I bet it works.

it was just one of those times when you’re writing code and everything goes wrong.

Oh boy, I wish I could say I don’t know what that’s like!

@Daniel1 year ago

That Daniel guy sounds super cool! I’d love to meet him!

@AIdude1 year ago

What is a Daniel?

@Ry1 year ago (edited1 year ago)

According to https://www.behindthename.com/name/daniel:

“From the Hebrew name דָּנִיֵּאל (Daniyyel) meaning “God is my judge”, from the roots דִּין (din) meaning “to judge” and אֵל (‘el) meaning “God”. Daniel was a Hebrew prophet whose story is told in the Book of Daniel in the Old Testament. He lived during the Jewish captivity in Babylon, where he served in the court of the king, rising to prominence by interpreting the king’s dreams. The book also presents Daniel’s four visions of the end of the world. Due to the popularity of the biblical character, the name came into use in England during the Middle Ages. Though it became rare by the 15th century, it was revived after the Protestant Reformation. Famous bearers of this name include English author Daniel Defoe (1660-1731), Swiss mathematician Daniel Bernoulli (1700-1782), and American frontiersman Daniel Boone (1734-1820).”

@JimmyDeveloper1 year ago

You definitely should sometime he is uber rad

@Ecconia1 year ago (edited1 year ago)

I liked the video today. While its also super tasty to have point on feature showcases.
The “new style” is fine, but one shouldn’t overdo it. I do check the videos to get a particular information, which would be difficult with longer videos. But this video style is also a lot of fun

@JimmyDeveloper1 year ago

In contrast to most of the LWW videos I do, today’s video was fairly relaxed; I didn’t write a script, and it was much longer than usual. Please let me know what you think of that style. Would you like to see more videos like this?